org.drools.reteoo
Class ObjectTypeNode

java.lang.Object
  extended by org.drools.reteoo.ObjectTypeNode
All Implemented Interfaces:
Serializable

 class ObjectTypeNode
extends Object
implements Serializable

Filters Objects coming from the Rete using a ObjectType semantic module.

It receives Objects from the Rete, uses a ObjectType instance to determine membership, and propagates matching Objects further to all matching ParameterNodes.

Author:
bob@eng.werken.com
See Also:
ObjectType, ParameterNode, Rete

Constructor Summary
ObjectTypeNode(ObjectType objectType)
          Construct given a semantic ObjectType.
 
Method Summary
(package private)  void addParameterNode(ParameterNode node)
          Add a ParameterNode child to this node.
(package private)  void assertObject(FactHandle handle, Object object, WorkingMemoryImpl workingMemory)
          Assert a new fact object into this RuleBase and the specified WorkingMemory.
 ObjectType getObjectType()
          Retrieve the semantic ObjectType differentiator.
(package private)  Iterator getParameterNodeIterator()
          Retreive an Iterator over ParameterNode children of this node.
(package private)  Collection getParameterNodes()
          Retrieve the Set of ParameterNodes/code> children of this node.
(package private)  void retractObject(FactHandle handle, WorkingMemoryImpl workingMemory)
          Retract a fact object from this RuleBase and the specified WorkingMemory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectTypeNode

public ObjectTypeNode(ObjectType objectType)
Construct given a semantic ObjectType.

Parameters:
objectType - The semantic object-type differentiator.
Method Detail

getObjectType

public ObjectType getObjectType()
Retrieve the semantic ObjectType differentiator.

Returns:
The semantic ObjectType differentiator.

addParameterNode

void addParameterNode(ParameterNode node)
Add a ParameterNode child to this node.

Parameters:
node - The ParameterNode child to add.

getParameterNodes

Collection getParameterNodes()
Retrieve the Set of ParameterNodes/code> children of this node.

Returns:
The Set of ParameterNode children. TODO: Remove this.

getParameterNodeIterator

Iterator getParameterNodeIterator()
Retreive an Iterator over ParameterNode children of this node.

Returns:
An Iterator over ParameterNode children of this node.

assertObject

void assertObject(FactHandle handle,
                  Object object,
                  WorkingMemoryImpl workingMemory)
            throws FactException
Assert a new fact object into this RuleBase and the specified WorkingMemory.

Parameters:
handle - The fact handle.
object - The object to assert.
workingMemory - The working memory session.
Throws:
FactException - if an error occurs during assertion.

retractObject

void retractObject(FactHandle handle,
                   WorkingMemoryImpl workingMemory)
             throws FactException
Retract a fact object from this RuleBase and the specified WorkingMemory.

Parameters:
handle - The handle of the fact to retract.
workingMemory - The working memory session.
Throws:
FactException - if an error occurs during assertion.


Copyright © 2001-2005 The Codehaus. All Rights Reserved.