public class GraphQuery extends Object
Modifier and Type | Class and Description |
---|---|
static class |
GraphQuery.UnboundVariableException
Exception thrown when a query variable is discovered to be unbound.
|
Modifier and Type | Field and Description |
---|---|
static Node |
ANY
A convenient synonym for Node.ANY, used in a match to match anything.
|
static Node |
O
A query variable called "O".
|
static Node |
P
A query variable called "P".
|
static Node |
S
A query variable called "S".
|
static Node |
X
A query variable called "X".
|
static Node |
Y
A query variable called "Y".
|
static Node |
Z
A query variable called "Z".
|
Constructor and Description |
---|
GraphQuery()
Initialiser for Query; makes an empty Query [no matches, no constraints]
|
GraphQuery(Graph pattern)
Initialiser for Query; makes a Query with its matches taken from
pattern . |
Modifier and Type | Method and Description |
---|---|
GraphQuery |
addConstraint(Expression e) |
GraphQuery |
addMatch(Node s,
Node p,
Node o)
Add an (S, P, O) match to the query's collection of match triples.
|
GraphQuery |
addMatch(Triple t)
Add a triple to the query's collection of match triples.
|
NamedGraphMap |
args() |
com.hp.hpl.jena.util.iterator.ExtendedIterator<Domain> |
executeBindings(Graph g,
List<Stage> stages,
Node[] results) |
com.hp.hpl.jena.util.iterator.ExtendedIterator<Domain> |
executeBindings(Graph g,
Node[] results) |
com.hp.hpl.jena.util.iterator.ExtendedIterator<Domain> |
executeBindings(List<Stage> outStages,
NamedGraphMap args,
Node[] nodes)
the standard "default" implementation of executeBindings.
|
com.hp.hpl.jena.util.iterator.ExtendedIterator<Domain> |
executeBindings(NamedGraphMap args,
Node[] nodes) |
ExpressionSet |
getConstraints() |
List<Triple> |
getPattern()
Answer a list of the triples that have been added to this query.
|
TripleSorter |
getSorter() |
int |
getVariableCount() |
void |
setTripleSorter(TripleSorter ts) |
public static final Node ANY
public static final Node S
public static final Node P
public static final Node O
public static final Node X
public static final Node Y
public static final Node Z
public GraphQuery()
public GraphQuery(Graph pattern)
pattern
.pattern
- a Graph whose triples are used as match elementspublic GraphQuery addMatch(Node s, Node p, Node o)
s
- the node to match the subjectp
- the node to match the predicateo
- the node to match the objectpublic GraphQuery addMatch(Triple t)
t
- an (S, P, O) triple to add to the collection of matchespublic List<Triple> getPattern()
public ExpressionSet getConstraints()
public GraphQuery addConstraint(Expression e)
public com.hp.hpl.jena.util.iterator.ExtendedIterator<Domain> executeBindings(Graph g, Node[] results)
public com.hp.hpl.jena.util.iterator.ExtendedIterator<Domain> executeBindings(Graph g, List<Stage> stages, Node[] results)
public com.hp.hpl.jena.util.iterator.ExtendedIterator<Domain> executeBindings(NamedGraphMap args, Node[] nodes)
public com.hp.hpl.jena.util.iterator.ExtendedIterator<Domain> executeBindings(List<Stage> outStages, NamedGraphMap args, Node[] nodes)
public NamedGraphMap args()
public TripleSorter getSorter()
public void setTripleSorter(TripleSorter ts)
public int getVariableCount()
Licenced under the Apache License, Version 2.0