public class RETEClauseFilter extends Object implements RETESourceNode
Modifier and Type | Field and Description |
---|---|
static byte |
ADDRFunctorNode
Argument addressing code: triple object functor node, offset in
low nibble, only usable after a successful TestFunctorName.
|
static byte |
ADDRObject
Argument addressing code: triple object as a whole
|
static byte |
ADDRPredicate
Argument addressing code: triple predicate
|
static byte |
ADDRSubject
Argument addressing code: triple subject
|
static byte |
BIND
Instruction code: Bind a node (arg1) to a place in the rules token (arg2).
|
static byte |
CREATEToken
Instruction code: Create a result environment of length arg1.
|
static byte |
END
Instruction code: Final entry - dispatch to the network.
|
static byte |
TESTFunctorName
Instruction code: Check literal value is a functor of name arg1
|
static byte |
TESTIntraMatch
Instruction code: Cross match two triple entries (arg1, arg2)
|
static byte |
TESTValue
Instruction code: Check triple entry (arg1) against literal value (arg2).
|
Constructor and Description |
---|
RETEClauseFilter(byte[] instructions,
Object[] args)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
RETENode |
clone(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 |
fire(Triple triple,
boolean isAdd)
Insert or remove a triple into the network.
|
void |
setContinuation(RETESinkNode continuation)
Set the continuation node for this node.
|
public static final byte TESTValue
public static final byte TESTFunctorName
public static final byte TESTIntraMatch
public static final byte CREATEToken
public static final byte BIND
public static final byte END
public static final byte ADDRSubject
public static final byte ADDRPredicate
public static final byte ADDRObject
public static final byte ADDRFunctorNode
public RETEClauseFilter(byte[] instructions, Object[] args)
instructions
- the set of byte-coded instructions and argument pointers.args
- the object arguments referenced from the instructions array.public static RETEClauseFilter compile(TriplePattern clause, int envLength, List<Node> varList)
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 appendedpublic void setContinuation(RETESinkNode continuation)
setContinuation
in interface RETESourceNode
public void fire(Triple triple, boolean isAdd)
triple
- the triple to process.isAdd
- true if the triple is being added to the working set.Licenced under the Apache License, Version 2.0