Class LeftInputAdapterNode
- java.lang.Object
-
- jadex.rules.rulesystem.rete.nodes.AbstractNode
-
- jadex.rules.rulesystem.rete.nodes.LeftInputAdapterNode
-
- All Implemented Interfaces:
INode
,IObjectConsumerNode
,ITupleSourceNode
,java.lang.Cloneable
public class LeftInputAdapterNode extends AbstractNode implements IObjectConsumerNode, ITupleSourceNode
A node for converting an object to a tuple.
-
-
Field Summary
Fields Modifier and Type Field Description protected IObjectSourceNode
osource
The object source.protected AttributeSet
relevants
The set of relevant attributes.protected ITupleConsumerNode[]
tconsumers
The tuple consumers.-
Fields inherited from class jadex.rules.rulesystem.rete.nodes.AbstractNode
clones, nodeid
-
-
Constructor Summary
Constructors Constructor Description LeftInputAdapterNode(int nodeid)
Create a new node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addObject(java.lang.Object object, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
Send an object to this node.void
addTupleConsumer(ITupleConsumerNode node)
Add an tuple consumer node.java.lang.Object
clone()
Clone this object.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.IObjectSourceNode
getObjectSource()
Get the object source of this node.AttributeSet
getRelevantAttributes()
Get the set of relevant attribute types.ITupleConsumerNode[]
getTupleConsumers()
Get all tuple consumer nodes.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
modifyObject(java.lang.Object object, OAVAttributeType type, java.lang.Object oldvalue, java.lang.Object newvalue, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
Propagate an object change to this node.void
removeObject(java.lang.Object object, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
Send a removed object to this node.void
removeTupleConsumer(ITupleConsumerNode node)
Remove an tuple consumer.void
setObjectSource(IObjectSourceNode node)
Set the object source of this node.-
Methods inherited from class jadex.rules.rulesystem.rete.nodes.AbstractNode
checkNodeConsistency, 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, getNodeId
-
-
-
-
Field Detail
-
tconsumers
protected ITupleConsumerNode[] tconsumers
The tuple consumers.
-
osource
protected IObjectSourceNode osource
The object source.
-
relevants
protected volatile AttributeSet relevants
The set of relevant attributes.
-
-
Method Detail
-
addObject
public void addObject(java.lang.Object object, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
Send an object to this node.- Specified by:
addObject
in interfaceIObjectConsumerNode
- Parameters:
object
- The object.
-
removeObject
public void removeObject(java.lang.Object object, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
Send a removed object to this node.- Specified by:
removeObject
in interfaceIObjectConsumerNode
- Parameters:
object
- The object.
-
modifyObject
public void modifyObject(java.lang.Object object, OAVAttributeType type, java.lang.Object oldvalue, java.lang.Object newvalue, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
Propagate an object change to this node.- Specified by:
modifyObject
in interfaceIObjectConsumerNode
- Parameters:
object
- The new object.
-
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:
modifyIndirectObject
in interfaceINode
- Parameters:
object
- The changed object.
-
setObjectSource
public void setObjectSource(IObjectSourceNode node)
Set the object source of this node.- Specified by:
setObjectSource
in interfaceIObjectConsumerNode
- Parameters:
node
- The object source node.
-
getObjectSource
public IObjectSourceNode getObjectSource()
Get the object source of this node.- Specified by:
getObjectSource
in interfaceIObjectConsumerNode
- Returns:
- The object source node.
-
addTupleConsumer
public void addTupleConsumer(ITupleConsumerNode node)
Add an tuple consumer node.- Specified by:
addTupleConsumer
in interfaceITupleSourceNode
- Parameters:
node
- A new consumer node.
-
removeTupleConsumer
public void removeTupleConsumer(ITupleConsumerNode node)
Remove an tuple consumer.- Specified by:
removeTupleConsumer
in interfaceITupleSourceNode
- Parameters:
node
- The consumer node.
-
getTupleConsumers
public ITupleConsumerNode[] getTupleConsumers()
Get all tuple consumer nodes.- Specified by:
getTupleConsumers
in interfaceITupleSourceNode
- Returns:
- All tuple consumer nodes.
-
getNodeMemory
public java.util.Collection getNodeMemory(ReteMemory mem)
Get the memory for this node.- Specified by:
getNodeMemory
in interfaceINode
- Specified by:
getNodeMemory
in interfaceITupleSourceNode
- Returns:
- The memory.
-
createNodeMemory
public java.lang.Object createNodeMemory(IOAVState state)
Create the node memory.- Specified by:
createNodeMemory
in interfaceINode
- Parameters:
state
- The state.- Returns:
- The node memory.
-
getRelevantAttributes
public AttributeSet getRelevantAttributes()
Get the set of relevant attribute types.- Specified by:
getRelevantAttributes
in 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:
getIndirectAttributes
in interfaceINode
- Returns:
- The relevant attribute types.
-
clone
public java.lang.Object clone()
Clone this object.- Specified by:
clone
in interfaceINode
- Overrides:
clone
in classAbstractNode
- Returns:
- A clone of this object.
-
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:
doClone
in classAbstractNode
- Parameters:
theclone
- The clone.
-
-