Class CollectNode

    • Field Detail

      • relevants

        protected volatile AttributeSet relevants
        The set of relevant attributes.
      • indirects

        protected volatile AttributeSet indirects
        The set of indirect attributes.
      • tupleindex

        protected int tupleindex
        The tuple index to collect.
    • Constructor Detail

      • CollectNode

        public CollectNode​(int nodeid,
                           int tupleindex,
                           IConstraintEvaluator[] evaluators)
        Create a new beta node.
    • Method Detail

      • modifyIndirectObject

        public void modifyIndirectObject​(java.lang.Object object,
                                         OAVAttributeType type,
                                         java.lang.Object oldvalue,
                                         java.lang.Object newvalue,
                                         IOAVState state,
                                         ReteMemory mem,
                                         AbstractAgenda agenda)
        Propagate an indirect object change to this node.
        Specified by:
        modifyIndirectObject in interface INode
        Parameters:
        object - The changed object.
      • 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.
      • getConstraintEvaluators

        public IConstraintEvaluator[] getConstraintEvaluators()
        Get the evaluators.
        Returns:
        The evaluators.
      • 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.
      • getTupleIndex

        public int getTupleIndex()
        Get the tuple index.
        Returns:
        The tuple index.
      • 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.
      • checkConstraints

        protected boolean checkConstraints​(Tuple left,
                                           IOAVState state)
        Check the constraints with respect to the object.
        Returns:
        True, if object fits constraints.
      • createIndexTuple

        protected Tuple createIndexTuple​(IOAVState state,
                                         Tuple tuple,
                                         ReteMemory mem)
        Create an index tuple from a tuple. The index tuple excludes the index position at which the compression happens (and all elements thereafter -> why, could be the last node?).
        Parameters:
        tuple - The tuple.
        Returns:
        The index tuple.
      • propagateAdditionToTupleConsumers

        protected void propagateAdditionToTupleConsumers​(Tuple tuple,
                                                         IOAVState state,
                                                         ReteMemory mem,
                                                         AbstractAgenda agenda)
        Propagate a new tuple to all tuple consumers.
        Parameters:
        object - The new object.
      • propagateRemovalToTupleConsumers

        protected void propagateRemovalToTupleConsumers​(Tuple tuple,
                                                        IOAVState state,
                                                        ReteMemory mem,
                                                        AbstractAgenda agenda)
        Propagate a removed tuple to all tuple consumers.
        Parameters:
        object - The new object.
      • propagateModificationToTupleConsumers

        protected void propagateModificationToTupleConsumers​(Tuple tuple,
                                                             OAVAttributeType type,
                                                             java.lang.Object oldvalue,
                                                             java.lang.Object newvalue,
                                                             IOAVState state,
                                                             ReteMemory mem,
                                                             AbstractAgenda agenda)
        Propagate a modified object to all object consumers.
        Parameters:
        object - The new object.