Class GroupElement

    • Constructor Detail

      • GroupElement

        public GroupElement()
    • Method Detail

      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
      • addChild

        public GroupElement addChild​(RuleConditionElement child)
        Adds a child to the current GroupElement. Restrictions are: NOT/EXISTS: can have only one child, either a single Pattern or another CE
      • addChild

        public void addChild​(int index,
                             RuleConditionElement rce)
        Adds the given child as the (index)th child of the this GroupElement
      • getInnerDeclarations

        public java.util.Map<java.lang.String,​Declaration> getInnerDeclarations​(java.lang.String consequenceName)
      • getOuterDeclarations

        public java.util.Map<java.lang.String,​Declaration> getOuterDeclarations​(java.lang.String consequenceName)
      • resolveDeclaration

        public Declaration resolveDeclaration​(java.lang.String identifier)
        Description copied from interface: RuleConditionElement
        Resolves the given identifier in the current scope and returns the Declaration object for the declaration. Returns null if identifier can not be resolved.
        Specified by:
        resolveDeclaration in interface RuleConditionElement
        Returns:
      • pack

        public void pack()
        Optimize the group element subtree by removing redundancies like an AND inside another AND, OR inside OR, single branches AND/OR, etc. LogicTransformer does further, more complicated, transformations
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • clone

        protected GroupElement clone​(boolean deepClone)
      • isAnd

        public boolean isAnd()
      • isOr

        public boolean isOr()
      • isNot

        public boolean isNot()
      • isExists

        public boolean isExists()
      • toString

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

        public boolean isPatternScopeDelimiter()
        Description copied from interface: RuleConditionElement
        Returns true in case this RuleConditionElement delimits a pattern visibility scope. For instance, AND CE is not a scope delimiter, while NOT CE is a scope delimiter
        Specified by:
        isPatternScopeDelimiter in interface RuleConditionElement
        Returns:
      • isRoot

        public boolean isRoot()
      • setRoot

        public void setRoot​(boolean root)