- All Known Implementing Classes:
BBRuleContext
,BFRuleContext
,RETERuleContext
public interface RuleContext
Interface used to convey context information from a rule engine
to the stack of procedural builtins. This gives access
to the triggering rule, the variable bindings and the set of
currently known triples.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Assert a new triple in the deduction graph, triggering any consequent processing as appropriate.boolean
Return true if the triple pattern is already in either the graph or the stack.boolean
Return true if the triple is already in either the graph or the stack.In some formulations the context includes deductions that are not yet visible to the underlying graph but need to be checked for.getEnv()
Returns the current variable binding environment for the current rule.getGraph()
Returns the parent inference graph.getRule()
Returns the rule.void
Remove a triple from the deduction graph (and the original graph if relevant).void
Sets the rule.void
Assert a new triple in the deduction graph, bypassing any processing machinery.
-
Method Details
-
getEnv
BindingEnvironment getEnv()Returns the current variable binding environment for the current rule.- Returns:
- BindingEnvironment
-
getGraph
InfGraph getGraph()Returns the parent inference graph.- Returns:
- InfGraph
-
getRule
Rule getRule()Returns the rule.- Returns:
- Rule
-
setRule
Sets the rule.- Parameters:
rule
- The rule to set
-
contains
Return true if the triple is already in either the graph or the stack. I.e. it has already been deduced. -
contains
Return true if the triple pattern is already in either the graph or the stack. I.e. it has already been deduced. -
find
In some formulations the context includes deductions that are not yet visible to the underlying graph but need to be checked for. -
silentAdd
Assert a new triple in the deduction graph, bypassing any processing machinery. -
add
Assert a new triple in the deduction graph, triggering any consequent processing as appropriate. -
remove
Remove a triple from the deduction graph (and the original graph if relevant).
-