Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.yajre.reteoo
Class FilterNode  view FilterNode download FilterNode.java

java.lang.Object
  extended byorg.yajre.reteoo.TupleSource
      extended byorg.yajre.reteoo.FilterNode
All Implemented Interfaces:
TupleSink

public final class FilterNode
extends TupleSource
implements TupleSink

Node representing a boolean condition statement which filters the propagation of asserted ReteTuples.

Using a semantic org.yajre.spi.FilterCondition, this node may allow or disallow Tuples to proceed further through the Rete-OO network.


Field Summary
private  org.yajre.spi.FilterCondition filterCondition
          The semantic FilterCondition.
private  TupleSource tupleSource
          The source of incoming Tuples.
 
Fields inherited from class org.yajre.reteoo.TupleSource
 
Constructor Summary
FilterNode(TupleSource tupleSource, org.yajre.spi.FilterCondition filterCondition)
           
 
Method Summary
 org.yajre.spi.FilterCondition getFilterCondition()
          The FilterCondition associated with this node.
 java.util.Set getTupleDeclarations()
          Retrieve the Set of org.yajre.spi.Declarations in the propagated Tuples.
 void sinkAssertTuple(TupleSource inputSource, ReteTuple tuple, org.yajre.WorkingMemory mem)
          Assert a new Tuple.
 void sinkRetractObject(TupleSource inputSource, org.yajre.spi.Declaration decl, org.yajre.WorkingMemory mem)
          Retract a fact Object.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class org.yajre.reteoo.TupleSource
getTupleSink, propagateAssertion, propagateRetraction, setTupleSink
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

filterCondition

private org.yajre.spi.FilterCondition filterCondition
The semantic FilterCondition.


tupleSource

private TupleSource tupleSource
The source of incoming Tuples.

Constructor Detail

FilterNode

public FilterNode(TupleSource tupleSource,
                  org.yajre.spi.FilterCondition filterCondition)
Method Detail

getTupleDeclarations

public java.util.Set getTupleDeclarations()
Description copied from class: TupleSource
Retrieve the Set of org.yajre.spi.Declarations in the propagated Tuples.

Specified by:
getTupleDeclarations in class TupleSource

getFilterCondition

public org.yajre.spi.FilterCondition getFilterCondition()
The FilterCondition associated with this node.


sinkAssertTuple

public void sinkAssertTuple(TupleSource inputSource,
                            ReteTuple tuple,
                            org.yajre.WorkingMemory mem)
                     throws org.yajre.AssertionException
Description copied from interface: TupleSink
Assert a new Tuple.

Specified by:
sinkAssertTuple in interface TupleSink

sinkRetractObject

public void sinkRetractObject(TupleSource inputSource,
                              org.yajre.spi.Declaration decl,
                              org.yajre.WorkingMemory mem)
                       throws org.yajre.RetractionException
Description copied from interface: TupleSink
Retract a fact Object.

Specified by:
sinkRetractObject in interface TupleSink

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).