| java.lang.Object com.hp.hpl.jena.graph.query.Element
All known Subclasses: com.hp.hpl.jena.graph.query.Bind, com.hp.hpl.jena.db.impl.Free, com.hp.hpl.jena.graph.query.Fixed, com.hp.hpl.jena.graph.query.Bound,
Element | abstract public class Element (Code) | | An Element of a matching triple. Elements have associated indexes, their place
in the Domain storing the matching values. Subclasses represent constants,
binding occurances of variables, and bound instances of variables.
author: hedgehog |
Constructor Summary | |
protected | Element(int index) Initialise this Element with its allocated index. | protected | Element() Initialiser invoked by sub-classes which need no index. |
Method Summary | |
abstract public Node | asNodeMatch(Domain d) Answer a Node suitable as a pattern-match element in a TripleMatch approximating
this Element. | public int | getIndex() Answer this Element's index in the Domains it is compiled for. | abstract public boolean | match(Domain d, Node x) Answer true if this Element matches x given the bindings in d. | public String | toString() |
ANY | final public static Element ANY(Code) | | The constant ANY matches anything and binds nothing
|
index | final protected int index(Code) | | |
Element | protected Element(int index)(Code) | | Initialise this Element with its allocated index.
|
Element | protected Element()(Code) | | Initialiser invoked by sub-classes which need no index.
|
asNodeMatch | abstract public Node asNodeMatch(Domain d)(Code) | | Answer a Node suitable as a pattern-match element in a TripleMatch approximating
this Element. Thus Bind elements map to null (or Node.ANY).
Parameters: d - the domain holding the variable bindings the matched value (null if none, ie binding occurance or ANY) |
getIndex | public int getIndex()(Code) | | Answer this Element's index in the Domains it is compiled for.
|
match | abstract public boolean match(Domain d, Node x)(Code) | | Answer true if this Element matches x given the bindings in d. May side-effect d
by (re)binding if this element is a variable.
Parameters: d - the variable bindings to read/update for variables Parameters: x - the value to match true if the match succeeded |
|
|