org.drools.reteoo.impl
Class ExtractionNodeImpl

java.lang.Object
  |
  +--org.drools.reteoo.impl.TupleSourceImpl
        |
        +--org.drools.reteoo.impl.ExtractionNodeImpl
All Implemented Interfaces:
ExtractionNode, TupleSink, TupleSinkImpl, TupleSource

public class ExtractionNodeImpl
extends TupleSourceImpl
implements ExtractionNode, TupleSinkImpl

extraction node in the Rete-OO network.

Author:
bob mcwhirter
See Also:
ExtractionNode

Constructor Summary
ExtractionNodeImpl(TupleSourceImpl tupleSource, Declaration targetDeclaration, Extractor extractor)
          Construct.
 
Method Summary
 void assertTuple(ReteTuple tuple, WorkingMemory workingMemory)
          Assert a new Tuple.
 Extractor getExtractor()
          Retrieve the Extractor used to generate the right-hand-side value for the extraction.
 Declaration getTargetDeclaration()
          Retrieve the Declaration which is the target of the extraction.
 java.util.Set getTupleDeclarations()
          Retrieve the Set of Declarations in the propagated Tuples.
 void modifyTuples(java.lang.Object trigger, org.drools.reteoo.impl.TupleSet newTuples, WorkingMemory workingMemory)
          Modify tuples.
 void retractTuples(org.drools.reteoo.impl.TupleKey key, WorkingMemory workingMemory)
          Retract tuples.
 java.lang.String toString()
          Produce a debug string.
 
Methods inherited from class org.drools.reteoo.impl.TupleSourceImpl
getTupleSink, propagateAssertTuple, propagateModifyTuples, propagateRetractTuples, setTupleSink
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.drools.reteoo.TupleSource
getTupleSink
 

Constructor Detail

ExtractionNodeImpl

public ExtractionNodeImpl(TupleSourceImpl tupleSource,
                          Declaration targetDeclaration,
                          Extractor extractor)
Construct.
Parameters:
tupleSource - Parent tuple source.
targetDeclaration - Target of extraction.
extractor - The fact extractor to use.
Method Detail

getTargetDeclaration

public Declaration getTargetDeclaration()
Retrieve the Declaration which is the target of the extraction.
Specified by:
getTargetDeclaration in interface ExtractionNode
Returns:
The target Declaration.
See Also:
Declaration

getExtractor

public Extractor getExtractor()
Retrieve the Extractor used to generate the right-hand-side value for the extraction.
Specified by:
getExtractor in interface ExtractionNode
Returns:
The Extrator.
See Also:
Extractor

getTupleDeclarations

public java.util.Set getTupleDeclarations()
Retrieve the Set of Declarations in the propagated Tuples.
Specified by:
getTupleDeclarations in interface TupleSource
Returns:
The Set of Declarations in progated Tuples.
See Also:
Declaration

assertTuple

public void assertTuple(ReteTuple tuple,
                        WorkingMemory workingMemory)
                 throws AssertionException
Assert a new Tuple.
Specified by:
assertTuple in interface TupleSinkImpl
Parameters:
tuple - The Tuple being asserted.
workingMemory - The working memory seesion.
Throws:
AssertionException - If an error occurs while asserting.

retractTuples

public void retractTuples(org.drools.reteoo.impl.TupleKey key,
                          WorkingMemory workingMemory)
                   throws RetractionException
Retract tuples.
Specified by:
retractTuples in interface TupleSinkImpl
Parameters:
key - The tuple key.
workingMemory - The working memory seesion.
Throws:
RetractionException - If an error occurs while retracting.

modifyTuples

public void modifyTuples(java.lang.Object trigger,
                         org.drools.reteoo.impl.TupleSet newTuples,
                         WorkingMemory workingMemory)
                  throws FactException
Modify tuples.
Specified by:
modifyTuples in interface TupleSinkImpl
Parameters:
trigger - The root fact object.
newTuples - Modification replacement tuples.
workingMemory - The working memory session.
Throws:
FactException - If an error occurs while modifying.

toString

public java.lang.String toString()
Produce a debug string.
Overrides:
toString in class java.lang.Object
Returns:
The debug string.


Copyright © 2001-2002 The Werken Company. All Rights Reserved.