Package ilog.rules.dt.model.expression
Interface IlrDTExpressionInstance
-
- All Superinterfaces:
Cloneable,DTTimeStampable,IlrDecorableElement,IlrDTElement,IlrDTExpression,IlrDTExpressionText,Serializable
- All Known Implementing Classes:
ExpressionInstance
public interface IlrDTExpressionInstance extends IlrDTExpressionText
IlrDTExpressionInstancerepresents an expression instance. An expression instance points to:- An expression definition which defines its pattern, that is an expression with placeholders.
- A list of expression parameters. These parameters contain the values of the definition placeholders.
In a DT model, an expression instance is used in a condition or an action. It is represented as a cell in a decision table, a condition link, or an action in a decision tree.
An expression instance is parsed in the context of its expression manager. If the expression is invalid, syntax and semantic errors are collected in the expression error manager or in the error managers of the expression parameter.
Do not implement this expression outside the DT framework.
- Since:
- JRules 7.0
-
-
Field Summary
-
Fields inherited from interface ilog.rules.shared.model.IlrDecorableElement
INSTANCE, TRANSIENT, VOLATILE
-
Fields inherited from interface ilog.rules.dt.model.expression.IlrDTExpression
NIL
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IlrDTExpressionDefinitiongetDefinition()Returns the definition associated with this expression instance.IlrSyntaxTree.NodegetExpressionSyntaxNode(int index)If this expression has a syntax tree, the syntax node corresponding to a specific index is returned.IlrDTErrorManagergetLocalErrorManager()Returns the error manager used to store errors local to this instance.IlrDTExpressionParametergetParameter(int index)Returns the expression parameter at a specific index.List<IlrDTExpressionParameter>getParameters()Returns the list of expression parameters associated to this expression instance.IlrSyntacticRolegetSyntacticRole(IlrDTExpressionParameter param)Returns the syntactic role that corresponds to an expression parameter instance.voidsetParameterText(int index, String text)Sets the text of the expression parameter at a specific index.-
Methods inherited from interface ilog.rules.dt.model.common.DTTimeStampable
getTimeStamp, setTimeStamp
-
Methods inherited from interface ilog.rules.shared.model.IlrDecorableElement
addProperties, clearProperties, clearVolatileProperties, getProperties, getProperty, setProperty
-
Methods inherited from interface ilog.rules.dt.model.expression.IlrDTExpression
clone, clone, equals, getDTContext, getErrorManager, reset
-
Methods inherited from interface ilog.rules.dt.model.expression.IlrDTExpressionText
getExpressionConcept, getExpressionSyntaxNode, getExpressionText, hasSyntacticErrors, isExpressionValid
-
-
-
-
Method Detail
-
getDefinition
IlrDTExpressionDefinition getDefinition()
Returns the definition associated with this expression instance.- Returns:
- The definition. This method cannot return
null.
-
getExpressionSyntaxNode
IlrSyntaxTree.Node getExpressionSyntaxNode(int index)
If this expression has a syntax tree, the syntax node corresponding to a specific index is returned.- Parameters:
index- The place to retrieve the node from.- Returns:
- A syntax node.
-
getParameters
List<IlrDTExpressionParameter> getParameters()
Returns the list of expression parameters associated to this expression instance. This object contains one expression parameter per expression definition placeholder.- Returns:
- The list of expression parameters. The list returned cannot be
null. - See Also:
IlrDTExpressionDefinition
-
getParameter
IlrDTExpressionParameter getParameter(int index)
Returns the expression parameter at a specific index.- Parameters:
index- This parameter corresponds to the index placeholder in the expression definition.- Returns:
- The expression parameter. If
indexis out of range,nullis returned.
-
setParameterText
void setParameterText(int index, String text)Sets the text of the expression parameter at a specific index. Ifindexis out of range, nothing is done.- Parameters:
index- The place in this object to settext.text- The text to set atindex.
-
getSyntacticRole
IlrSyntacticRole getSyntacticRole(IlrDTExpressionParameter param)
Returns the syntactic role that corresponds to an expression parameter instance. The syntactic role is returned if:- The expression definition represents a sentence.
- The
paramargument is mapped to the sentence.
- Parameters:
param- The expression parameter to match.- Returns:
- A syntactic role. If the criteria are not matched,
nullis returned.
-
getLocalErrorManager
IlrDTErrorManager getLocalErrorManager()
Returns the error manager used to store errors local to this instance.- Returns:
- The local error manager. This error manager does not contains
errors in the expression parameters. The returned value cannot be
null.
-
-