| java.lang.Object com.hp.hpl.jena.reasoner.rulesys.impl.BBRuleContext
BBRuleContext | public class BBRuleContext implements RuleContext(Code) | | Implementation of RuleContext for use in the backward chaining
interpreter. The RuleContext allows builtin predicates to
interpret variable bindings to access the static triple data.
author: Dave Reynolds version: $Revision: 1.13 $ on $Date: 2008/01/02 12:06:15 $ |
Method Summary | |
public void | add(Triple t) Assert a new triple in the deduction graph, triggering any consequent processing as appropriate. | public boolean | contains(Node s, Node p, Node o) | public boolean | contains(Triple t) | public ClosableIterator | find(Node s, Node p, Node o) | public BindingEnvironment | getEnv() | public InfGraph | getGraph() | public Rule | getRule() | public Node | getTemp(Node instance, Node prop, Node pclass) Retrieve or create a bNode representing an inferred property value.
This is currently only available on backward contexts and not part of the
normal RuleContext interface.
Parameters: instance - the base instance node to which the property applies Parameters: prop - the property node whose value is being inferred Parameters: pclass - the (optional, can be null) class for the inferred value. | public void | remove(Triple t) Remove a triple from the deduction graph (and the original graph if relevant). | public void | setEnv(BindingEnvironment env) | public void | setRule(Rule rule) | public void | silentAdd(Triple t) Assert a new triple in the deduction graph, bypassing any processing machinery. |
env | protected BindingEnvironment env(Code) | | The binding environment which represents the state of the current rule execution.
|
rule | protected Rule rule(Code) | | The rule current being executed.
|
BBRuleContext | public BBRuleContext(BackwardRuleInfGraphI graph)(Code) | | Construct an empty context. It can't be used until
the rule and environment have been set.
|
add | public void add(Triple t)(Code) | | Assert a new triple in the deduction graph, triggering any consequent processing as appropriate.
In the backward case there no immediate consequences so this is equivalent to a silentAdd.
|
getTemp | public Node getTemp(Node instance, Node prop, Node pclass)(Code) | | Retrieve or create a bNode representing an inferred property value.
This is currently only available on backward contexts and not part of the
normal RuleContext interface.
Parameters: instance - the base instance node to which the property applies Parameters: prop - the property node whose value is being inferred Parameters: pclass - the (optional, can be null) class for the inferred value. the bNode representing the property value |
remove | public void remove(Triple t)(Code) | | Remove a triple from the deduction graph (and the original graph if relevant).
|
silentAdd | public void silentAdd(Triple t)(Code) | | Assert a new triple in the deduction graph, bypassing any processing machinery.
|
|
|