public class ExpressionDefinition extends ilog.rules.dt.expression.Expression implements IlrDTExpressionDefinition, IlrDTExpressionSentence, IlrDTSentenceContext
ExpressionDefinition is the concrete implementation of
IlrDTExpressionDefinition.IlrDTExpressionDefinition,
Serialized FormNILINSTANCE, TRANSIENT, VOLATILEACTION_SENTENCE_TYPE, CONDITION_SENTENCE_TYPE, UNKNOWN_SENTENCE_TYPE| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(IlrDTExpressionRole holderRoleExpression)
Deprecated.
|
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.
|
int |
convertParameterIndexToSentenceIndex(int parameterIndex)
Deprecated.
|
int |
convertSentenceIndexToParameterIndex(int sentenceIndex)
Deprecated.
|
boolean |
equals(java.lang.Object o)
Tests if two expressions are equal.
|
IlrDTContext |
getDTContext() |
IlrDTErrorManager |
getErrorManager()
This method returns the error manager associated to this expression
|
IlrConcept |
getExpressionConcept()
Deprecated.
|
IlrDTExpressionManager |
getExpressionManager()
Returns the expression manager in the context this expression was created.
|
java.lang.String |
getExpressionSentenceRoleText(IlrDTExpressionRole expressionRole)
Deprecated.
|
java.lang.String |
getExpressionSentenceText(IlrDTExpressionSentence expression,
IlrDTExpressionSentence defaultExpression)
Deprecated.
|
IlrSyntaxTree.Node |
getExpressionSyntaxNode()
Returns the syntax tree node corresponding to the expression.
|
IlrSyntaxTree.Node |
getExpressionSyntaxNode(int index)
Deprecated.
|
java.lang.String |
getExpressionText()
Returns the expression text.
|
IlrSyntaxTree.Node |
getHolderNode()
Returns the syntax node corresponding to the holder role if this
definition represents a top level sentence.
|
IlrSyntacticRole |
getHolderRole()
Deprecated.
|
IlrConcept |
getHolderRoleConcept()
Returns the concept of the holder role if this definition represents a top
level sentence.
|
IlrDTExpressionRole |
getHolderRoleExpression()
Deprecated.
|
int |
getHolderRoleSentenceIndex()
Deprecated.
|
java.lang.String |
getHolderText()
Returns the text of the holder role if this definition represents a top
level sentence.
|
IlrDTErrorManager |
getLocalErrorManager()
Returns the error manager used to store errors local to this definition.
|
IlrSyntacticRole |
getParameterRole(int index)
Deprecated.
|
IlrConcept |
getParameterRoleConcept(int index)
Deprecated.
|
java.util.List |
getParameterRoleConcepts(IlrConcept hrConcept)
Deprecated.
|
int |
getParameterRoleCount()
Deprecated.
|
IlrDTExpressionRole |
getParameterRoleExpression(int index)
Deprecated.
|
IlrDTExpressionPlaceHolder |
getPlaceHolder(int index)
Returns the placeholder at a specific position in this expression.
|
java.util.List<IlrDTExpressionPlaceHolder> |
getPlaceHolders()
Returns the placeholders in this expression.
|
IlrSentence |
getSentence()
Returns a sentence.
|
IlrDTSentenceContext |
getSentenceContext()
Deprecated.
|
java.lang.String |
getSentenceText()
Deprecated.
|
int |
getSentenceType()
Deprecated.
|
IlrSyntacticRole |
getSyntacticRole(IlrDTExpressionPlaceHolder placeHolder)
Returns the syntactic role corresponding to the given placeholder.
|
IlrSyntaxTree |
getSyntaxTree() |
boolean |
hasSyntacticErrors()
Deprecated.
|
boolean |
isExpressionValid()
Tests if the expression is valid.
|
boolean |
isValid()
Deprecated.
|
IlrSyntaxTree |
parse(IlrDTErrorManager errorManager,
java.lang.String text)
Deprecated.
|
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.
We assume if this is called on a definition it relates to a default value.
|
void |
setSentenceContext(IlrDTSentenceContext sentenceContext)
Deprecated.
|
void |
setSentenceText(java.lang.String text)
Deprecated.
|
void |
setSentenceType(int type)
Deprecated.
|
java.lang.String |
toString() |
getTimeStamp, setTimeStampaddProperties, clearProperties, clearVolatileProperties, getProperties, getProperty, setPropertyfinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddProperties, clearProperties, clearVolatileProperties, getProperties, getProperty, setPropertygetTimeStamp, setTimeStamppublic IlrDTContext getDTContext()
getDTContext in interface IlrDTExpressiongetDTContext in interface IlrDTSentenceContextpublic java.lang.String getExpressionText()
IlrDTExpressionText
For an IlrDTExpressionDefinition, the definition text is
returned with placeholders.
For an IlrDTExpressionInstance, the expression text is
returned and the placeholders are replaced by expression parameter values.
getExpressionText in interface IlrDTExpressionTextpublic IlrDTExpressionManager getExpressionManager()
IlrDTExpressionDefinitiongetExpressionManager in interface IlrDTExpressionDefinitionpublic IlrDTErrorManager getErrorManager()
ilog.rules.dt.expression.ExpressiongetErrorManager in interface IlrDTExpressiongetErrorManager in class ilog.rules.dt.expression.Expressionpublic IlrDTErrorManager getLocalErrorManager()
IlrDTExpressionDefinitiongetLocalErrorManager in interface IlrDTExpressionDefinitionnull.public IlrSyntaxTree getSyntaxTree()
public IlrSyntaxTree.Node getExpressionSyntaxNode()
IlrDTExpressionTextgetExpressionSyntaxNode in interface IlrDTExpressionTextpublic IlrSyntaxTree.Node getHolderNode()
IlrDTExpressionDefinitiongetHolderNode in interface IlrDTExpressionDefinitionnull is returned.public java.util.List<IlrDTExpressionPlaceHolder> getPlaceHolders()
IlrDTExpressionDefinitiongetPlaceHolders in interface IlrDTExpressionDefinitionnull.public IlrDTExpressionPlaceHolder getPlaceHolder(int index)
IlrDTExpressionDefinitiongetPlaceHolder in interface IlrDTExpressionDefinitionindex - The location of the placeholder in this expression.index. If index is
out of range, null is returned.public boolean reset()
IlrDTExpressionreset in interface IlrDTExpressionpublic 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 java.lang.Object clone()
clone in interface IlrDTExpressionclone in interface IlrDecorableElementpublic java.lang.Object cloneWithoutParameters()
public java.lang.String toString()
toString in class java.lang.Objectpublic IlrSentence getSentence()
IlrDTExpressionDefinitiongetSentence in interface IlrDTExpressionDefinitiongetSentence in interface IlrDTSentenceContextnull is returned.public IlrDTExpression clone(IlrDTContext context)
clone in interface IlrDTExpressioncontext - The context of the cloned expression.public IlrSyntaxTree.Node getExpressionSyntaxNode(int index)
getExpressionSyntaxNode in interface IlrDTExpressionSentenceindex - The parameter role index.public IlrSyntacticRole getHolderRole()
getHolderRole in interface IlrDTExpressionSentencepublic IlrConcept getHolderRoleConcept()
IlrDTExpressionDefinitiongetHolderRoleConcept in interface IlrDTExpressionDefinitiongetHolderRoleConcept in interface IlrDTExpressionSentencenull is returned.public java.lang.String getHolderText()
IlrDTExpressionDefinitiongetHolderText in interface IlrDTExpressionDefinitionnull is returned.public 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 IlrDTExpressionSentencegetParameterRoleCount in interface IlrDTSentenceContextpublic 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 boolean accept(IlrDTExpressionRole holderRoleExpression)
IlrDTSentenceContextaccept in interface IlrDTSentenceContextholderRoleExpression - Holder role expression to test.public int convertParameterIndexToSentenceIndex(int parameterIndex)
public int convertSentenceIndexToParameterIndex(int sentenceIndex)
public java.lang.String getExpressionSentenceRoleText(IlrDTExpressionRole expressionRole)
public java.lang.String getExpressionSentenceText(IlrDTExpressionSentence expression, IlrDTExpressionSentence defaultExpression)
public int getHolderRoleSentenceIndex()
public java.util.List getParameterRoleConcepts(IlrConcept hrConcept)
public java.lang.String getSentenceText()
getSentenceText in interface IlrDTSentenceContext<a number> is between <a number> and <a number>public int getSentenceType()
getSentenceType in interface IlrDTSentenceContextIlrDTSentenceContext.UNKNOWN_SENTENCE_TYPE,
IlrDTSentenceContext.CONDITION_SENTENCE_TYPE,
IlrDTSentenceContext.ACTION_SENTENCE_TYPEpublic void setSentenceType(int type)
public IlrSyntaxTree parse(IlrDTErrorManager errorManager, java.lang.String text)
public void setSentenceText(java.lang.String text)
public boolean isValid()
isValid in interface IlrDTSentenceContexttrue if the sentence context is valid.public IlrSyntacticRole getSyntacticRole(IlrDTExpressionPlaceHolder placeHolder)
IlrDTExpressionDefinitiongetSyntacticRole in interface IlrDTExpressionDefinitionplaceHolder - The placeholder pointing to the part of the definition
to check.null is returned.public boolean equals(java.lang.Object o)
IlrDTExpressionequals in interface IlrDTExpressionequals in class java.lang.Object© Copyright IBM Corp. 1987, 2017