public class TerminalNode extends AbstractNode implements ITupleConsumerNode
Modifier and Type | Class and Description |
---|---|
static class |
TerminalNode.ReteVariableAssignments
The rete variable assignment help extracting values for varaibles.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.Map |
extractors
A mapping for fetching variable values (variable -> extractor).
|
protected AttributeSet |
indirects
The set of indirect attributes.
|
protected AttributeSet |
relevants
The set of relevant attributes.
|
protected IRule |
rule
The rule of the terminal node.
|
protected ITupleSourceNode |
tsource
The tuple source.
|
clones, nodeid
Constructor and Description |
---|
TerminalNode(int nodeid,
IRule rule,
java.util.Map extractors)
Create a new node.
|
Modifier and Type | Method and Description |
---|---|
void |
addTuple(Tuple tuple,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
Send an tuple to this node.
|
java.lang.Object |
createNodeMemory(IOAVState state)
Create the node memory.
|
protected void |
doClone(java.lang.Object theclone)
Do clone makes a deep clone without regarding cycles.
|
AttributeSet |
getIndirectAttributes()
Get the set of indirect attribute types.
|
java.util.Collection |
getNodeMemory(ReteMemory mem)
Get the memory for this node.
|
AttributeSet |
getRelevantAttributes()
Get the set of relevant attribute types.
|
IRule |
getRule()
Get the rule.
|
ITupleSourceNode |
getTupleSource()
Get the tuple source of this node.
|
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.
|
void |
modifyTuple(Tuple tuple,
int tupleindex,
OAVAttributeType type,
java.lang.Object oldvalue,
java.lang.Object newvalue,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
Modify a tuple in this node.
|
void |
removeTuple(Tuple tuple,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
Remove a tuple from this node.
|
void |
setTupleSource(ITupleSourceNode node)
Set the tuple source of this node.
|
checkNodeConsistency, clone, equals, getNodeId, hashCode, toString, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
checkNodeConsistency, clone, getNodeId
protected ITupleSourceNode tsource
protected java.util.Map extractors
protected IRule rule
protected volatile AttributeSet relevants
protected volatile AttributeSet indirects
public TerminalNode(int nodeid, IRule rule, java.util.Map extractors)
public void addTuple(Tuple tuple, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
addTuple
in interface ITupleConsumerNode
tuple
- The tuple.public void removeTuple(Tuple tuple, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
removeTuple
in interface ITupleConsumerNode
tuple
- The tuple.public void modifyTuple(Tuple tuple, int tupleindex, OAVAttributeType type, java.lang.Object oldvalue, java.lang.Object newvalue, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
modifyTuple
in interface ITupleConsumerNode
tuple
- The tuple.public void modifyIndirectObject(java.lang.Object object, OAVAttributeType type, java.lang.Object oldvalue, java.lang.Object newvalue, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
modifyIndirectObject
in interface INode
object
- The changed object.public void setTupleSource(ITupleSourceNode node)
setTupleSource
in interface ITupleConsumerNode
node
- The tuple source node.public ITupleSourceNode getTupleSource()
getTupleSource
in interface ITupleConsumerNode
public java.lang.Object createNodeMemory(IOAVState state)
createNodeMemory
in interface INode
state
- The state.public java.util.Collection getNodeMemory(ReteMemory mem)
getNodeMemory
in interface INode
public AttributeSet getRelevantAttributes()
getRelevantAttributes
in interface INode
public AttributeSet getIndirectAttributes()
getIndirectAttributes
in interface INode
public IRule getRule()
protected void doClone(java.lang.Object theclone)
doClone
in class AbstractNode
theclone
- The clone.