public class ExpressionInstance extends ilog.rules.dt.expression.Expression implements IlrDTExpressionInstance, IlrDTExpressionSentence
ExpressionInstance represents an expression used as a
condition or an action in the DT model.
An ExpressionInstance object refers to an
ExpressionDefinition instance and a list of
ExpressionParameter objects.IlrDTExpressionInstance,
Serialized FormNILINSTANCE, TRANSIENT, VOLATILE| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Creates and returns a copy of this expression.
|
IlrDTExpression |
clone(IlrDTContext context) |
java.lang.Object |
cloneWithoutParameters()
Creates and returns a copy of this expression.
|
IlrDTExpressionDefinition |
getDefinition()
Returns the definition associated with this expression instance.
|
IlrDTContext |
getDTContext() |
IlrDTErrorManager |
getErrorManager()
This method returns the error manager associated to this expression
|
IlrConcept |
getExpressionConcept()
Deprecated.
|
IlrSyntaxTree.Node |
getExpressionSyntaxNode()
Returns the syntax node that represents this expression.
|
IlrSyntaxTree.Node |
getExpressionSyntaxNode(int index)
If this expression has a syntax tree, the syntax node corresponding to a
specific index is returned.
|
java.lang.String |
getExpressionText()
Returns the complete text of this expression.
|
IlrSyntacticRole |
getHolderRole()
Deprecated.
|
IlrConcept |
getHolderRoleConcept()
Deprecated.
|
IlrDTExpressionRole |
getHolderRoleExpression()
Deprecated.
|
IlrDTErrorManager |
getLocalErrorManager()
Returns the error manager used to store errors local to this instance.
|
IlrDTExpressionParameter |
getParameter(int index)
Returns the expression parameter at a specific index.
|
IlrSyntacticRole |
getParameterRole(int index)
Deprecated.
|
IlrConcept |
getParameterRoleConcept(int index)
Deprecated.
|
int |
getParameterRoleCount()
Deprecated.
|
IlrDTExpressionRole |
getParameterRoleExpression(int index)
Deprecated.
|
java.util.List<IlrDTExpressionParameter> |
getParameters()
Returns the list of expression parameters associated to this expression
instance.
|
IlrSentence |
getSentence()
Deprecated.
|
IlrDTSentenceContext |
getSentenceContext()
Deprecated.
|
IlrSyntacticRole |
getSyntacticRole(IlrDTExpressionParameter param)
Returns the syntactic role that corresponds to an expression parameter
instance.
|
boolean |
hasSyntacticErrors()
Deprecated.
|
boolean |
isExpressionValid()
Tests if the expression is valid.
|
boolean |
isValid() |
boolean |
reset()
Drops all references to vocabulary, and will requires parsing.
|
void |
setHolderRoleText(java.lang.String text)
Deprecated.
|
void |
setParameterRoleText(int index,
java.lang.String text)
Deprecated.
|
void |
setParameterText(int index,
java.lang.String text)
Sets the text of the expression parameter at a specific index.
|
void |
setSentenceContext(IlrDTSentenceContext sentenceContext)
Deprecated.
|
java.lang.String |
toString() |
getTimeStamp, setTimeStampaddProperties, clearProperties, clearVolatileProperties, getProperties, getProperty, setPropertyequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequalsaddProperties, clearProperties, clearVolatileProperties, getProperties, getProperty, setPropertygetTimeStamp, setTimeStamppublic IlrDTExpressionDefinition getDefinition()
IlrDTExpressionInstancegetDefinition in interface IlrDTExpressionInstancenull.public IlrDTExpressionParameter getParameter(int index)
IlrDTExpressionInstancegetParameter in interface IlrDTExpressionInstanceindex - This parameter corresponds to the index placeholder in the
expression definition.index is out of range,
null is returned.public java.util.List<IlrDTExpressionParameter> getParameters()
IlrDTExpressionInstancegetParameters in interface IlrDTExpressionInstancenull.IlrDTExpressionDefinitionpublic boolean isExpressionValid()
IlrDTExpressionText
The corresponding syntax tree for an invalid expression is either
null or in error recovery.
isExpressionValid in interface IlrDTExpressionTexttrue is
returned.public boolean isValid()
public java.lang.String getExpressionText()
getExpressionText in interface IlrDTExpressionTextpublic IlrSyntaxTree.Node getExpressionSyntaxNode()
getExpressionSyntaxNode in interface IlrDTExpressionTextpublic IlrDTErrorManager getErrorManager()
ilog.rules.dt.expression.ExpressiongetErrorManager in interface IlrDTExpressiongetErrorManager in class ilog.rules.dt.expression.Expressionpublic IlrDTErrorManager getLocalErrorManager()
IlrDTExpressionInstancegetLocalErrorManager in interface IlrDTExpressionInstancenull.public IlrSyntaxTree.Node getExpressionSyntaxNode(int index)
IlrDTExpressionInstancegetExpressionSyntaxNode in interface IlrDTExpressionInstancegetExpressionSyntaxNode in interface IlrDTExpressionSentenceindex - The place to retrieve the node from.public java.lang.Object clone()
clone in interface IlrDTExpressionclone in interface IlrDecorableElementpublic java.lang.Object cloneWithoutParameters()
public boolean reset()
IlrDTExpressionreset in interface IlrDTExpressionpublic void setParameterText(int index,
java.lang.String text)
IlrDTExpressionInstanceindex is out of range, nothing is done.setParameterText in interface IlrDTExpressionInstanceindex - The place in this object to set text.text - The text to set at index.public java.lang.String toString()
toString in class java.lang.Objectpublic IlrDTExpression clone(IlrDTContext context)
clone in interface IlrDTExpressioncontext - The context of the cloned expression.public IlrDTContext getDTContext()
getDTContext in interface IlrDTExpressionpublic IlrSyntacticRole getHolderRole()
getHolderRole in interface IlrDTExpressionSentencepublic IlrConcept getHolderRoleConcept()
getHolderRoleConcept in interface IlrDTExpressionSentencepublic IlrDTExpressionRole getHolderRoleExpression()
getHolderRoleExpression in interface IlrDTExpressionSentencepublic IlrSyntacticRole getParameterRole(int index)
getParameterRole in interface IlrDTExpressionSentenceindex - tTe position of the parameter.public IlrConcept getParameterRoleConcept(int index)
getParameterRoleConcept in interface IlrDTExpressionSentenceindex - The position of the parameter.public int getParameterRoleCount()
getParameterRoleCount in interface IlrDTExpressionSentencepublic IlrDTExpressionRole getParameterRoleExpression(int index)
getParameterRoleExpression in interface IlrDTExpressionSentenceindex - The position of the parameter.public IlrDTSentenceContext getSentenceContext()
getSentenceContext in interface IlrDTExpressionSentencepublic void setHolderRoleText(java.lang.String text)
IlrDTExpressionSentencesetHolderRoleText in interface IlrDTExpressionSentencetext - The new text of the holder role expression.public void setParameterRoleText(int index,
java.lang.String text)
setParameterRoleText in interface IlrDTExpressionSentenceindex - The position of the parameter.text - The new text of the parameter.public void setSentenceContext(IlrDTSentenceContext sentenceContext)
IlrDTExpressionSentencesetSentenceContext in interface IlrDTExpressionSentencesentenceContext - The new sentence contextpublic IlrConcept getExpressionConcept()
IlrDTExpressionTextgetExpressionConcept in interface IlrDTExpressionTextpublic boolean hasSyntacticErrors()
IlrDTExpressionTexthasSyntacticErrors in interface IlrDTExpressionTextpublic IlrSentence getSentence()
public IlrSyntacticRole getSyntacticRole(IlrDTExpressionParameter param)
IlrDTExpressionInstanceparam argument is mapped to the sentence.getSyntacticRole in interface IlrDTExpressionInstanceparam - The expression parameter to match.null is returned.© Copyright IBM Corp. 1987, 2017