| java.lang.Object com.hp.hpl.jena.graph.query.QueryNode
QueryNode | abstract public class QueryNode (Code) | | A QueryNode is a wrapped node that has been processed against
some variable-binding map to discover (a) what kind of node it is
and (b) what index in the binding map it has.
There are five sub-classes of QueryNode
- Fixed - a concrete node, with pseudo-index NO_INDEX
- Bind - a variable node's first, binding, appearance
- JustBound - a variable node's bound appearance in the same
[triple] context as its binding appearance
- Bound - a variable node's bound appearance
- Any - Node.ANY (or, in principle, a free variable)
author: hedgehog |
Inner Class :public static class Fixed extends QueryNode | |
Inner Class :public static class Bind extends QueryNode | |
Inner Class :public static class JustBound extends QueryNode | |
Inner Class :public static class Bound extends QueryNode | |
Inner Class :public static class Any extends QueryNode | |
Field Summary | |
final public static int | NO_INDEX Fake index value to use when no index makes sense; we choose a value
that will fail any array-bound check if it happens to be used anyway. | final public static QueryNodeFactory | factory | final public int | index The index value allocated to this query node; NO_INDEX except for a
variable node, in which case it is the allocated index in the domain
object. | final public Node | node The Node value on which this QueryNode is based. |
Method Summary | |
public static QueryNode | classify(QueryNodeFactory f, Mapping map, Set recent, Node n) Answer a QueryNode that classifies the argument node n .
The factory f is used to create the different QueryNodes,
allowing different classifiers to use their own subclasses of QueryNode
if they wish. | public Node | finder(Domain d) Answer a Node value to use when this QueryValue is used to select
objects in a Graph::find() operation; for concrete nodes, that very
node, for variables their current value (ANY if not bound). | public boolean | isFrozen() Answer true iff this node is "frozen", ie its value is fixed, when it
is encountered; that is, it is not a Bind or JustBound node. | public boolean | match(Domain d, Node x) Answer true iff this QueryNode matches, in the context of the binding
Domain d , the node x . | abstract public boolean | matchOrBind(Domain d, Node x) Optimisation: the action to be performed when matching a just-bound
variable or binding a newly-bound variable, or nothing for any other
kind of QueryNode. | public boolean | mustMatch() Answer true iff this QueryNode must be used in a triple-match of its
owning QueryTriple. | public String | toString() Return a handy string representation for debugging purposes. |
NO_INDEX | final public static int NO_INDEX(Code) | | Fake index value to use when no index makes sense; we choose a value
that will fail any array-bound check if it happens to be used anyway.
|
index | final public int index(Code) | | The index value allocated to this query node; NO_INDEX except for a
variable node, in which case it is the allocated index in the domain
object.
|
node | final public Node node(Code) | | The Node value on which this QueryNode is based.
|
QueryNode | protected QueryNode(Node node, int index)(Code) | | |
classify | public static QueryNode classify(QueryNodeFactory f, Mapping map, Set recent, Node n)(Code) | | Answer a QueryNode that classifies the argument node n .
The factory f is used to create the different QueryNodes,
allowing different classifiers to use their own subclasses of QueryNode
if they wish. map is the variable-to-index map, and
recent is the set of those variables "just" bound, ie,
earlier in the same triple.
|
finder | public Node finder(Domain d)(Code) | | Answer a Node value to use when this QueryValue is used to select
objects in a Graph::find() operation; for concrete nodes, that very
node, for variables their current value (ANY if not bound).
|
isFrozen | public boolean isFrozen()(Code) | | Answer true iff this node is "frozen", ie its value is fixed, when it
is encountered; that is, it is not a Bind or JustBound node.
|
match | public boolean match(Domain d, Node x)(Code) | | Answer true iff this QueryNode matches, in the context of the binding
Domain d , the node x .
|
matchOrBind | abstract public boolean matchOrBind(Domain d, Node x)(Code) | | Optimisation: the action to be performed when matching a just-bound
variable or binding a newly-bound variable, or nothing for any other
kind of QueryNode.
|
mustMatch | public boolean mustMatch()(Code) | | Answer true iff this QueryNode must be used in a triple-match of its
owning QueryTriple.
|
toString | public String toString()(Code) | | Return a handy string representation for debugging purposes. Not for
machine consumption.
|
|
|