java.lang.Object
org.apache.jena.reasoner.rulesys.impl.RETEClauseFilter
- All Implemented Interfaces:
RETENode
,RETESourceNode
Checks a triple against the grounded matches and intra-triple matches
for a single rule clause. If the match passes it creates a binding
environment token and passes it on the RETE network itself. The checks
and bindings are implemented using a simple byte-coded interpreter.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final byte
Argument addressing code: triple object functor node, offset in low nibble, only usable after a successful TestFunctorName.static final byte
Argument addressing code: triple object as a wholestatic final byte
Argument addressing code: triple predicatestatic final byte
Argument addressing code: triple subjectstatic final byte
Instruction code: Bind a node (arg1) to a place in the rules token (arg2).static final byte
Instruction code: Create a result environment of length arg1.static final byte
Instruction code: Final entry - dispatch to the network.static final byte
Instruction code: Check literal value is a functor of name arg1static final byte
Instruction code: Cross match two triple entries (arg1, arg2)static final byte
Instruction code: Check triple entry (arg1) against literal value (arg2). -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone
(Map<RETENode, RETENode> netCopy, RETERuleContext context) Clone this node in the network.static RETEClauseFilter
compile
(TriplePattern clause, int envLength, List<Node> varList) Create a filter node from a rule clause.void
Insert or remove a triple into the network.void
setContinuation
(RETESinkNode continuation) Set the continuation node for this node.
-
Field Details
-
TESTValue
public static final byte TESTValueInstruction code: Check triple entry (arg1) against literal value (arg2).- See Also:
-
TESTFunctorName
public static final byte TESTFunctorNameInstruction code: Check literal value is a functor of name arg1- See Also:
-
TESTIntraMatch
public static final byte TESTIntraMatchInstruction code: Cross match two triple entries (arg1, arg2)- See Also:
-
CREATEToken
public static final byte CREATETokenInstruction code: Create a result environment of length arg1.- See Also:
-
BIND
public static final byte BINDInstruction code: Bind a node (arg1) to a place in the rules token (arg2).- See Also:
-
END
public static final byte ENDInstruction code: Final entry - dispatch to the network.- See Also:
-
ADDRSubject
public static final byte ADDRSubjectArgument addressing code: triple subject- See Also:
-
ADDRPredicate
public static final byte ADDRPredicateArgument addressing code: triple predicate- See Also:
-
ADDRObject
public static final byte ADDRObjectArgument addressing code: triple object as a whole- See Also:
-
ADDRFunctorNode
public static final byte ADDRFunctorNodeArgument addressing code: triple object functor node, offset in low nibble, only usable after a successful TestFunctorName.- See Also:
-
-
Constructor Details
-
RETEClauseFilter
Constructor.- Parameters:
instructions
- the set of byte-coded instructions and argument pointers.args
- the object arguments referenced from the instructions array.
-
-
Method Details
-
compile
Create a filter node from a rule clause. Clause complexity is limited to less than 50 args in a Functor.- Parameters:
clause
- the rule clauseenvLength
- the size of binding environment that should be created on successful matchesvarList
- a list to which all clause variables will be appended
-
setContinuation
Set the continuation node for this node.- Specified by:
setContinuation
in interfaceRETESourceNode
-
fire
Insert or remove a triple into the network.- Parameters:
triple
- the triple to process.isAdd
- true if the triple is being added to the working set.
-
clone
Clone this node in the network.
-