Class RightInputAdapterNode
- java.lang.Object
-
- jadex.rules.rulesystem.rete.nodes.AbstractNode
-
- jadex.rules.rulesystem.rete.nodes.RightInputAdapterNode
-
- All Implemented Interfaces:
INode,IObjectSourceNode,ITupleConsumerNode,java.lang.Cloneable
public class RightInputAdapterNode extends AbstractNode implements ITupleConsumerNode, IObjectSourceNode
A node for converting a tuple to an object.
-
-
Field Summary
Fields Modifier and Type Field Description protected IObjectConsumerNode[]oconsumersThe object consumers.protected AttributeSetrelevantsThe set of relevant attributes.protected ITupleSourceNodetsourceThe tuple source.-
Fields inherited from class jadex.rules.rulesystem.rete.nodes.AbstractNode
clones, nodeid
-
-
Constructor Summary
Constructors Constructor Description RightInputAdapterNode(int nodeid)Create a new node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddObjectConsumer(IObjectConsumerNode node)Add an object consumer node.voidaddTuple(Tuple tuple, IOAVState state, ReteMemory mem, AbstractAgenda agenda)Add a new tuple to this node.java.lang.ObjectcreateNodeMemory(IOAVState state)Create the node memory.protected voiddoClone(java.lang.Object theclone)Do clone makes a deep clone without regarding cycles.AttributeSetgetIndirectAttributes()Get the set of indirect attribute types.java.util.CollectiongetNodeMemory(ReteMemory mem)Get the memory for this node.IObjectConsumerNode[]getObjectConsumers()Get all object consumer nodes.AttributeSetgetRelevantAttributes()Get the set of relevant attribute types.ITupleSourceNodegetTupleSource()Get the tuple source of this node.voidmodifyIndirectObject(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.voidmodifyTuple(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.voidremoveObjectConsumer(IObjectConsumerNode node)Remove an object consumer.voidremoveTuple(Tuple tuple, IOAVState state, ReteMemory mem, AbstractAgenda agenda)Remove a tuple from this node.voidsetTupleSource(ITupleSourceNode node)Set the tuple source of this node.-
Methods inherited from class jadex.rules.rulesystem.rete.nodes.AbstractNode
checkNodeConsistency, clone, equals, getNodeId, hashCode, toString, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jadex.rules.rulesystem.rete.nodes.INode
checkNodeConsistency, clone, getNodeId
-
-
-
-
Field Detail
-
oconsumers
protected IObjectConsumerNode[] oconsumers
The object consumers.
-
tsource
protected ITupleSourceNode tsource
The tuple source.
-
relevants
protected volatile AttributeSet relevants
The set of relevant attributes.
-
-
Method Detail
-
addTuple
public void addTuple(Tuple tuple, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
Add a new tuple to this node.- Specified by:
addTuplein interfaceITupleConsumerNode- Parameters:
tuple- The tuple.
-
removeTuple
public void removeTuple(Tuple tuple, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
Remove a tuple from this node.- Specified by:
removeTuplein interfaceITupleConsumerNode- Parameters:
tuple- The tuple.
-
modifyTuple
public 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.- Specified by:
modifyTuplein interfaceITupleConsumerNode- Parameters:
tuple- The tuple.
-
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:
modifyIndirectObjectin interfaceINode- Parameters:
object- The changed object.
-
setTupleSource
public void setTupleSource(ITupleSourceNode node)
Set the tuple source of this node.- Specified by:
setTupleSourcein interfaceITupleConsumerNode- Parameters:
node- The tuple source node.
-
getTupleSource
public ITupleSourceNode getTupleSource()
Get the tuple source of this node.- Specified by:
getTupleSourcein interfaceITupleConsumerNode- Returns:
- The object source node.
-
addObjectConsumer
public void addObjectConsumer(IObjectConsumerNode node)
Add an object consumer node.- Specified by:
addObjectConsumerin interfaceIObjectSourceNode- Parameters:
node- A new consumer node.
-
removeObjectConsumer
public void removeObjectConsumer(IObjectConsumerNode node)
Remove an object consumer.- Specified by:
removeObjectConsumerin interfaceIObjectSourceNode- Parameters:
node- The consumer node.
-
getNodeMemory
public java.util.Collection getNodeMemory(ReteMemory mem)
Get the memory for this node.- Specified by:
getNodeMemoryin interfaceINode- Specified by:
getNodeMemoryin interfaceIObjectSourceNode- Returns:
- The memory.
-
getObjectConsumers
public IObjectConsumerNode[] getObjectConsumers()
Get all object consumer nodes.- Specified by:
getObjectConsumersin interfaceIObjectSourceNode- Returns:
- All object consumer nodes.
-
createNodeMemory
public java.lang.Object createNodeMemory(IOAVState state)
Create the node memory.- Specified by:
createNodeMemoryin interfaceINode- Parameters:
state- The state.- Returns:
- The node memory.
-
getRelevantAttributes
public AttributeSet getRelevantAttributes()
Get the set of relevant attribute types.- Specified by:
getRelevantAttributesin interfaceINode
-
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:
getIndirectAttributesin interfaceINode- Returns:
- The relevant attribute types.
-
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:
doClonein classAbstractNode- Parameters:
theclone- The clone.
-
-