Class AbstractBetaNode

    • Method Detail

      • createNodeMemory

        public java.lang.Object createNodeMemory​(IOAVState state)
        Create the node memory.
        Specified by:
        createNodeMemory in interface INode
        Parameters:
        state - The state.
        Returns:
        The node memory.
      • getConstraintIndexers

        public ConstraintIndexer[] getConstraintIndexers()
        Get the indexers.
        Returns:
        The indexers.
      • getConstraintEvaluators

        public IConstraintEvaluator[] getConstraintEvaluators()
        Get the evaluators.
        Returns:
        The evaluators.
      • intersection

        protected java.util.Collection intersection​(IOAVState state,
                                                    java.util.Collection c1,
                                                    java.util.Collection c2)
        Compute the intersection of two collections.
        Parameters:
        c1 - The first collection.
        c2 - The second collection.
        Returns:
        The intersection.
      • identityIntersection

        protected java.util.Collection identityIntersection​(IOAVState state,
                                                            java.util.Collection c1,
                                                            java.util.Collection c2)
        Compute the intersection of two collections.
        Parameters:
        c1 - The first collection.
        c2 - The second collection.
        Returns:
        The intersection.
      • fetchTupleMemory

        protected java.util.Collection fetchTupleMemory​(IOAVState state,
                                                        java.lang.Object right,
                                                        ReteMemory mem)
        Fetch the tuple memory for a given object.
        Parameters:
        right - The right object.
        mem - The rete memory.
        state - The state.
        Returns:
        The tuple memory matching that object (or complete).
      • fetchObjectMemory

        protected java.util.Collection fetchObjectMemory​(IOAVState state,
                                                         Tuple left,
                                                         ReteMemory mem)
        Fetch the object memory for a given object.
        Parameters:
        left - The left tuple.
        value - The hash value (if any).
        type - The attribute type (if any).
        tupleindex - The tuple index of the changed object (if any).
        mem - The rete memory.
        state - The state.
        Returns:
        The tuple memory matching that object (or complete).
      • checkNonindexedConstraints

        protected boolean checkNonindexedConstraints​(Tuple left,
                                                     java.lang.Object right,
                                                     IOAVState state)
        Check the non-indexed constraints for the given left/right values.
      • isAffected

        public boolean isAffected​(OAVAttributeType attr)
        Test if the node is affected from a modification.
        Parameters:
        type - The attribute type.
        Returns:
        True, if possibly affected.
      • getIndirectAttributes

        public AttributeSet getIndirectAttributes()
        Get the set of indirect attribute types. I.e. attributes of objects, which are not part of an object conditions (e.g. for chained extractors)
        Specified by:
        getIndirectAttributes in interface INode
        Returns:
        The relevant attribute types.
      • doClone

        protected void doClone​(java.lang.Object theclone)
        Do clone makes a deep clone without regarding cycles. Method is overridden by subclasses to actually incorporate their attributes.
        Specified by:
        doClone in class AbstractNode
        Parameters:
        theclone - The clone.
      • addMatch

        protected abstract void addMatch​(Tuple left,
                                         java.lang.Object right,
                                         IOAVState state,
                                         ReteMemory mem,
                                         AbstractAgenda agenda)
        Add a match to the node memory and propagate if necessary.
      • removeMatch

        protected abstract void removeMatch​(Tuple left,
                                            java.lang.Object right,
                                            IOAVState state,
                                            ReteMemory mem,
                                            AbstractAgenda agenda)
        Remove a match from the node memory and propagate if necessary.
      • propagateModification

        protected abstract void propagateModification​(Tuple left,
                                                      java.lang.Object right,
                                                      int tupleindex,
                                                      OAVAttributeType type,
                                                      java.lang.Object oldvalue,
                                                      java.lang.Object newvalue,
                                                      IOAVState state,
                                                      ReteMemory mem,
                                                      AbstractAgenda agenda)
        Propagate a change of a tuple in the result memory.
      • isMatchContained

        protected abstract boolean isMatchContained​(IOAVState state,
                                                    Tuple left,
                                                    java.lang.Object right,
                                                    ReteMemory mem)
        Check if a match is contained.