| com.hp.hpl.jena.graph.Node_Variable com.hp.hpl.jena.reasoner.rulesys.Node_RuleVariable
Node_RuleVariable | public class Node_RuleVariable extends Node_Variable (Code) | | A variation on the normal Node_Variable which support for value bindings.
Currently the forward rule system stores the values externally but requires
variables to have an offset index in the rule environment vector. The
variables can also suport prolog-like reference chains and trails but these
are not yet used.
Note that this should not be used in a real Triple, in particular
it should not end up in a Graph. It is only needed for the rule systems.
author: Dave Reynolds version: $Revision: 1.20 $ on $Date: 2008/01/02 12:07:47 $ |
Inner Class :static class VarLabel | |
Method Summary | |
public Node_RuleVariable | cloneNode() Clone the rule variable to allow multiple rule instaces to be active at the same time. | public Node | deref() Dereference a variable by following the reference chain. | public int | getIndex() Returns the variable's index in a binding vector. | public Node | getRawBoundValue() Return the raw value to which this variable is bound (via LP binding) with
no dereferencing. | public boolean | isUnbound() Test if the variable is unbound (in the brule sense). | public static boolean | sameNodeAs(Node n, Node m) Compare two nodes, taking into account variable indices. | public boolean | sameValueAs(Object o) Test that two nodes are semantically equivalent. | public void | setIndex(int index) Changes the variable's index. | public void | simpleBind(Node node) Binds a value to the brule version of the variable. | public String | toString() | public void | unbind() |
WILD | final public static Node_RuleVariable WILD(Code) | | A static wildcard - like Node.ANY but tests equl to other Node_RuleVariables
|
index | protected int index(Code) | | The offset of this variable in the Frule's binding table
|
isRef | protected boolean isRef(Code) | | A flag to indicate that the value is reference (pointer to a var)
|
value | protected Node value(Code) | | The value to which this variable is bound, can be another variable,
itself (meaning unbound) or an actual value
|
Node_RuleVariable | public Node_RuleVariable(String label, int index)(Code) | | Constructor
Parameters: label - the text label for the variable Parameters: index - the calculated index of this variable in the rule |
cloneNode | public Node_RuleVariable cloneNode()(Code) | | Clone the rule variable to allow multiple rule instaces to be active at the same time.
|
deref | public Node deref()(Code) | | Dereference a variable by following the reference chain.
either a concrete node value or the last variablein the reference chain. |
getIndex | public int getIndex()(Code) | | Returns the variable's index in a binding vector.
int |
getRawBoundValue | public Node getRawBoundValue()(Code) | | Return the raw value to which this variable is bound (via LP binding) with
no dereferencing.
|
isUnbound | public boolean isUnbound()(Code) | | Test if the variable is unbound (in the brule sense).
|
sameNodeAs | public static boolean sameNodeAs(Node n, Node m)(Code) | | Compare two nodes, taking into account variable indices.
|
sameValueAs | public boolean sameValueAs(Object o)(Code) | | Test that two nodes are semantically equivalent.
|
setIndex | public void setIndex(int index)(Code) | | Changes the variable's index. This is used in LP rules which classify the
variables into different sequences.
|
simpleBind | public void simpleBind(Node node)(Code) | | Binds a value to the brule version of the variable. Does not follow
any reference trail, assues we have already been derefenced.
Parameters: node - a concrete Node value or another Node_RuleVariableto alias to |
unbind | public void unbind()(Code) | | Set the variable to be unbound (in the brule sense)
|
|
|