Rule Execution Server API

ilog.rules.factory
Class IlrAssertAction

java.lang.Object
  extended by ilog.rules.factory.IlrBaseStatement
      extended by ilog.rules.factory.IlrAction
          extended by ilog.rules.factory.IlrAssertAction
All Implemented Interfaces:
ilog.rules.factory.IlrSourceElement, IlrStatement, Serializable

public class IlrAssertAction
extends IlrAction

This class represents an insert action of the rule language.

Warning: Serialized objects of this class will not be compatible with future releases. The current serialization support is appropriate for short-term storage or RMI between applications running the same version of IBM Decision Server.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class ilog.rules.factory.IlrAction
flag, statements, value
 
Constructor Summary
IlrAssertAction(IlrValue object)
          Constructs an assert action to represent an assertion of the object passed as an argument.
IlrAssertAction(IlrValue object, IlrStatement[] statements)
          Constructs an assert action to represent an assertion of the object passed as an argument.
 
Method Summary
 void addStatement(IlrStatement statement)
          Adds a statement to this action.
 Enumeration enumerateStatements()
          Returns an enumeration to visit all the statements of this action.
 Object exploreStatement(IlrFactoryExplorer explorer)
          Explores the action and returns an object as a result.
 IlrValue getObject()
          Gets the asserted object.
 int getStatementCount()
          Gets the number of statements in this action.
 IlrStatement[] getStatements()
          Gets the statements in this action.
 IlrValue getTimeExpression()
          Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.
 boolean isAssertEvent()
          Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.
 boolean isLogical()
          Deprecated. As of IBM Decision Server 8.0.1, truth maintenance system is deprecated
 void removeStatement(IlrStatement statement)
          Removes a statement from the statement list of this action.
 void setAssertEvent(boolean assertEvent)
          Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.
 void setAssertEvent(IlrValue timeExpression)
          Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.
 void setLogical(boolean flag)
          Deprecated. As of IBM Decision Server 8.0.1, truth maintenance system is deprecated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlrAssertAction

public IlrAssertAction(IlrValue object)
Constructs an assert action to represent an assertion of the object passed as an argument. The constructed assertion is not logical. It corresponds to an assert action without the event keyword.

Parameters:
object - The object to be asserted.

IlrAssertAction

public IlrAssertAction(IlrValue object,
                       IlrStatement[] statements)
Constructs an assert action to represent an assertion of the object passed as an argument. The constructed assertion is not logical. It corresponds to an assert action without the event keyword. The assert action is initialized with the statement block passed as an argument.

Parameters:
object - The object to be asserted.
statements - The statement block.
Method Detail

getObject

public final IlrValue getObject()
Gets the asserted object.

Returns:
The object to be asserted.

isLogical

public final boolean isLogical()
Deprecated. As of IBM Decision Server 8.0.1, truth maintenance system is deprecated

Tests whether the assertion is a logical assertion.

Returns:
true if the assertion is marked as logical, and false otherwise.

setLogical

public final void setLogical(boolean flag)
Deprecated. As of IBM Decision Server 8.0.1, truth maintenance system is deprecated

Sets the assertion to be logical or nonlogical.

Parameters:
flag - true to mark the assertion as logical, and false otherwise.

isAssertEvent

public final boolean isAssertEvent()
Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.

Tests whether the assertion corresponds to an assert action with the event keyword.

Returns:
true if the assertion has the event keyword, and false otherwise.

getTimeExpression

public final IlrValue getTimeExpression()
Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.

Returns the time expression if the assertion corresponds to an assert action with the event keyword and an explicit time expression. Otherwise, it returns null.

Returns:
The explicit time expression in an assert event action, or null.

setAssertEvent

public final void setAssertEvent(boolean assertEvent)
Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.

Sets whether the assertion corresponds to an assert action with the event keyword (with no explicit time expression) or not (the explicit time expression previously set, if any, is then disregarded).

Parameters:
assertEvent - true to mark the assertion as having the event keyword, and false otherwise.

setAssertEvent

public final void setAssertEvent(IlrValue timeExpression)
Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.

Sets the assertion to correspond to an assert action with the event keyword with an explicit time expression.

Parameters:
timeExpression - The explicit time expression following the event keyword.

addStatement

public final void addStatement(IlrStatement statement)
Adds a statement to this action.

Parameters:
statement - The statement to be added.

removeStatement

public final void removeStatement(IlrStatement statement)
Removes a statement from the statement list of this action.

Parameters:
statement - The statement to be removed.

getStatementCount

public final int getStatementCount()
Gets the number of statements in this action.

Returns:
The number of statements in this action.

getStatements

public final IlrStatement[] getStatements()
Gets the statements in this action.

Returns:
An array of statements. The array can be of length 0.

enumerateStatements

public final Enumeration enumerateStatements()
Returns an enumeration to visit all the statements of this action.

Returns:
An enumeration of the statements.

exploreStatement

public Object exploreStatement(IlrFactoryExplorer explorer)
Explores the action and returns an object as a result.

Parameters:
explorer - A factory explorer.
Returns:
An object, the result of the exploration, or null if the method does not return a value.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013