ilog.rules.dt.expression

Class ExpressionInstance

    • Method Detail

      • getParameter

        public IlrDTExpressionParameter getParameter(int index)
        Description copied from interface: IlrDTExpressionInstance
        Returns the expression parameter at a specific index.
        Specified by:
        getParameter in interface IlrDTExpressionInstance
        Parameters:
        index - This parameter corresponds to the index placeholder in the expression definition.
        Returns:
        The expression parameter. If index is out of range, null is returned.
      • isExpressionValid

        public boolean isExpressionValid()
        Description copied from interface: IlrDTExpressionText
        Tests if the expression is valid. An expression is valid if it can be parsed against the current vocabulary without syntax error.

        The corresponding syntax tree for an invalid expression is either null or in error recovery.

        Specified by:
        isExpressionValid in interface IlrDTExpressionText
        Returns:
        If the expression is syntactically valid, true is returned.
      • isValid

        public boolean isValid()
      • getExpressionText

        public java.lang.String getExpressionText()
        Returns the complete text of this expression. The complete text is generated by substituting parameters with definition placeholders.
        Specified by:
        getExpressionText in interface IlrDTExpressionText
        Returns:
        The complete text of the expression.
      • getErrorManager

        public IlrDTErrorManager getErrorManager()
        Description copied from class: ilog.rules.dt.expression.Expression
        This method returns the error manager associated to this expression
        Specified by:
        getErrorManager in interface IlrDTExpression
        Overrides:
        getErrorManager in class ilog.rules.dt.expression.Expression
        Returns:
        the error manager associated to the expression or a dummy error manager if not relevant for an expression
      • getLocalErrorManager

        public IlrDTErrorManager getLocalErrorManager()
        Description copied from interface: IlrDTExpressionInstance
        Returns the error manager used to store errors local to this instance.
        Specified by:
        getLocalErrorManager in interface IlrDTExpressionInstance
        Returns:
        The local error manager. This error manager does not contains errors in the expression parameters. The returned value cannot be null.
      • clone

        public java.lang.Object clone()
        Creates and returns a copy of this expression.
        Specified by:
        clone in interface IlrDTExpression
        Specified by:
        clone in interface IlrDecorableElement
        Returns:
        A clone of this expression containing its pattern, parameters and properties.
      • cloneWithoutParameters

        public java.lang.Object cloneWithoutParameters()
        Creates and returns a copy of this expression.
        Returns:
        A clone of this expression containing its pattern but not its parameters.
      • reset

        public boolean reset()
        Description copied from interface: IlrDTExpression
        Drops all references to vocabulary, and will requires parsing. Generally used when the context of the expression changes.
        Specified by:
        reset in interface IlrDTExpression
      • setParameterText

        public void setParameterText(int index,
                            java.lang.String text)
        Description copied from interface: IlrDTExpressionInstance
        Sets the text of the expression parameter at a specific index. If index is out of range, nothing is done.
        Specified by:
        setParameterText in interface IlrDTExpressionInstance
        Parameters:
        index - The place in this object to set text.
        text - The text to set at index.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • clone

        public IlrDTExpression clone(IlrDTContext context)
        Specified by:
        clone in interface IlrDTExpression
        Parameters:
        context - The context of the cloned expression.
        Returns:
        A copy of the expression attached to the given context.
      • getParameterRole

        public IlrSyntacticRole getParameterRole(int index)
        Deprecated. 
        Specified by:
        getParameterRole in interface IlrDTExpressionSentence
        Parameters:
        index - tTe position of the parameter.
        Returns:
        The vocabulary syntactic roles of the parameter at position index.
      • getParameterRoleConcept

        public IlrConcept getParameterRoleConcept(int index)
        Deprecated. 
        Specified by:
        getParameterRoleConcept in interface IlrDTExpressionSentence
        Parameters:
        index - The position of the parameter.
        Returns:
        The vocabulary concept of the parameter at position index.
      • setHolderRoleText

        public void setHolderRoleText(java.lang.String text)
        Deprecated. 
        Description copied from interface: IlrDTExpressionSentence
        Defines the text of the holder expression.
        Specified by:
        setHolderRoleText in interface IlrDTExpressionSentence
        Parameters:
        text - The new text of the holder role expression.
      • setParameterRoleText

        public void setParameterRoleText(int index,
                                java.lang.String text)
        Deprecated. 
        Specified by:
        setParameterRoleText in interface IlrDTExpressionSentence
        Parameters:
        index - The position of the parameter.
        text - The new text of the parameter.
      • hasSyntacticErrors

        public boolean hasSyntacticErrors()
        Deprecated. 
        Description copied from interface: IlrDTExpressionText
        Check if the expression has syntactic errors. return True if the expression has syntactic errors.
        Specified by:
        hasSyntacticErrors in interface IlrDTExpressionText
      • getSentence

        public IlrSentence getSentence()
        Deprecated. 
      • getSyntacticRole

        public IlrSyntacticRole getSyntacticRole(IlrDTExpressionParameter param)
        Description copied from interface: IlrDTExpressionInstance
        Returns the syntactic role that corresponds to an expression parameter instance. The syntactic role is returned if:
        • The expression definition represents a sentence.
        • The param argument is mapped to the sentence.
        Specified by:
        getSyntacticRole in interface IlrDTExpressionInstance
        Parameters:
        param - The expression parameter to match.
        Returns:
        A syntactic role. If the criteria are not matched, null is returned.

© Copyright IBM Corp. 1987, 2019