Class RETETerminal
- java.lang.Object
-
- org.apache.jena.reasoner.rulesys.impl.RETETerminal
-
- All Implemented Interfaces:
RETENode
,RETESinkNode
public class RETETerminal extends java.lang.Object implements RETESinkNode
The final node in a RETE graph. It runs the builtin guard clauses and then, if the token passes, executes the head operations.
-
-
Constructor Summary
Constructors Constructor Description RETETerminal(Rule rule, RETEEngine engine, ForwardRuleInfGraphI graph)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RETENode
clone(java.util.Map<RETENode,RETENode> netCopy, RETERuleContext contextIn)
Clone this node in the network.void
fire(BindingVector env, boolean isAdd)
Propagate a token to this node.void
setContext(RETEEngine engine, ForwardRuleInfGraphI graph)
Change the engine/graph to which this terminal should deliver its results.
-
-
-
Constructor Detail
-
RETETerminal
public RETETerminal(Rule rule, RETEEngine engine, ForwardRuleInfGraphI graph)
Constructor.- Parameters:
rule
- the rule which this terminal should fire.engine
- the parent rule engine through which the deductions and recursive network can be reached.graph
- the wider encompassing infGraph needed to for the RuleContext
-
-
Method Detail
-
setContext
public void setContext(RETEEngine engine, ForwardRuleInfGraphI graph)
Change the engine/graph to which this terminal should deliver its results.
-
fire
public void fire(BindingVector env, boolean isAdd)
Propagate a token to this node.- Specified by:
fire
in interfaceRETESinkNode
- Parameters:
env
- a set of variable bindings for the rule being processed.isAdd
- distinguishes between add and remove operations.
-
-