ilog.rules.dt.model.expression

Interface IlrDTExpressionDefinition

  • All Superinterfaces:
    java.lang.Cloneable, DTTimeStampable, IlrDecorableElement, IlrDTElement, IlrDTExpression, IlrDTExpressionText, java.io.Serializable
    All Known Implementing Classes:
    ExpressionDefinition


    public interface IlrDTExpressionDefinition
    extends IlrDTExpressionText
    IlrDTExpressionDefinition represents an expression used in a condition or an action definition in the DT model. This expression type represents a BAL expression with placeholders. It is used as a template for expression instance objects that provide values for placeholders. An expression definition is associated with a list of expression placeholder objects that represent the placeholders of a BAL expression.

    The BAL expression contained in this expression is parsed in the context of an expression manager. If the expression is invalid, syntax and semantic errors are collected in the associated error manager.

    Do not implement this expression outside the DT framework.

    Since:
    JRules 7.0
    See Also:
    IlrDTExpressionPlaceHolder
    • Method Detail

      • getExpressionManager

        IlrDTExpressionManager getExpressionManager()
        Returns the expression manager in the context this expression was created.
        Returns:
        The expression manager.
      • getPlaceHolders

        java.util.List<IlrDTExpressionPlaceHolder> getPlaceHolders()
        Returns the placeholders in this expression. Placeholders correspond to holes left in the definition expression. They are mapped to subcolumns in a decision table. Placeholder ordering matches the order in which they appear in the expression text.
        Returns:
        The placeholder list. The list returned cannot be null.
      • getPlaceHolder

        IlrDTExpressionPlaceHolder getPlaceHolder(int index)
        Returns the placeholder at a specific position in this expression. Placeholders correspond to holes left in the definition expression. They are mapped to subcolumns in a decision table. Placeholder ordering matches the order in which they appear in the expression text.
        Parameters:
        index - The location of the placeholder in this expression.
        Returns:
        The placeholder at index. If index is out of range, null is returned.
      • getSentence

        IlrSentence getSentence()
        Returns a sentence. The sentence is returned if:
        • The definition represents a top level sentence.
        • The role of this definition is mapped on placeholders.
        Returns:
        A sentence. If this definition does not represent a top level sentence, null is returned.
      • getHolderRoleConcept

        IlrConcept getHolderRoleConcept()
        Returns the concept of the holder role if this definition represents a top level sentence.
        Returns:
        The vocabulary concept. If this definition does not represent a top level sentence, null is returned.
      • getHolderText

        java.lang.String getHolderText()
        Returns the text of the holder role if this definition represents a top level sentence.
        Returns:
        The text of the holder role. If this definition does not represent a top level sentence, null is returned.
      • getHolderNode

        IlrSyntaxTree.Node getHolderNode()
        Returns the syntax node corresponding to the holder role if this definition represents a top level sentence.
        Returns:
        The syntax node of the holder role. If this definition does not represent a top level sentence, null is returned.
      • getSyntacticRole

        IlrSyntacticRole getSyntacticRole(IlrDTExpressionPlaceHolder placeHolder)
        Returns the syntactic role corresponding to the given placeholder. The syntactic role is returned if:
        • The expression definition represents a sentence.
        • This place-holder is mapped to a sentence role.
        Parameters:
        placeHolder - The placeholder pointing to the part of the definition to check.
        Returns:
        The syntactic role. If the conditions are not met, null is returned.
      • getLocalErrorManager

        IlrDTErrorManager getLocalErrorManager()
        Returns the error manager used to store errors local to this definition. The returned error manager does not contains errors concerning the expression placeholders.
        Returns:
        The local error manager. The returned value cannot be null.

© Copyright IBM Corp. 1987, 2017