Package org.apache.jena.reasoner.rulesys
Interface BindingEnvironment
-
- All Known Implementing Classes:
BindingStack
,BindingVector
,LPBindingEnvironment
public interface BindingEnvironment
Interface through which the current bound values of variables can be found. Many of the details vary between the forward and backward chaining system - this interface is the minimal one needed by most builtins the specific implementations offer richer functionality.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
bind(Node var, Node value)
Bind a variable in the current environment to the given value.Node
getGroundVersion(Node node)
Return the most ground version of the node.Triple
instantiate(TriplePattern pattern)
Instantiate a triple pattern against the current environment.
-
-
-
Method Detail
-
getGroundVersion
Node getGroundVersion(Node node)
Return the most ground version of the node. If the node is not a variable just return it, if it is a variable bound in this environment return the binding, if it is an unbound variable return the variable.
-
bind
boolean bind(Node var, Node value)
Bind a variable in the current environment to the given value. Checks that the new binding is compatible with any current binding.- Parameters:
var
- a Node_RuleVariable defining the variable to bindvalue
- the value to bind- Returns:
- false if the binding fails
-
instantiate
Triple instantiate(TriplePattern pattern)
Instantiate a triple pattern against the current environment. This version handles unbound variables by turning them into bNodes.- Parameters:
pattern
- the triple pattern to match- Returns:
- a new, instantiated triple
-
-