public class SimpleQueryHandler extends Object implements QueryHandler
Constructor and Description |
---|
SimpleQueryHandler(Graph graph)
make an instance, remember the graph
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsNode(Node n)
this is a simple-minded implementation of containsNode that uses find
up to three times to locate the node.
|
static com.hp.hpl.jena.util.iterator.ExtendedIterator<Node> |
objectsFor(Graph g,
Node s,
Node p) |
com.hp.hpl.jena.util.iterator.ExtendedIterator<Node> |
objectsFor(Node s,
Node p)
deliver an iterator over all the objects _o_ such that _(s, p, o)_ is in the
underlying graph; nulls count as wildcards.
|
Stage |
patternStage(Mapping map,
ExpressionSet constraints,
Triple[] t)
produce a single Stage which will probe the underlying graph for triples
matching p and inject all the resulting bindings into the processing stream
(see Stage for details)
|
static com.hp.hpl.jena.util.iterator.ExtendedIterator<Node> |
predicatesFor(Graph g,
Node s,
Node o) |
com.hp.hpl.jena.util.iterator.ExtendedIterator<Node> |
predicatesFor(Node s,
Node o)
Answer an iterator over all the predicates
p such that
(s, p, o) is in the underlying graph. |
BindingQueryPlan |
prepareBindings(Query q,
Node[] variables)
prepare a plan for generating bindings given the query _q_ and the result
variables _variables_.
|
TreeQueryPlan |
prepareTree(Graph pattern)
deliver a plan for executing the tree-match query defined by _pattern_.
|
static com.hp.hpl.jena.util.iterator.ExtendedIterator<Node> |
subjectsFor(Graph g,
Node p,
Node o) |
com.hp.hpl.jena.util.iterator.ExtendedIterator<Node> |
subjectsFor(Node p,
Node o)
deliver an iterator over all the subjects _s_ such that _(s, p, o)_ is in the
underlying graph; nulls count as wildcards.
|
public SimpleQueryHandler(Graph graph)
public Stage patternStage(Mapping map, ExpressionSet constraints, Triple[] t)
QueryHandler
_map_ is the variable binding map to use and update. _constraints_ is the current constraint expression: if this Stage can absorb some of the ANDed constraints, it may do so, and remove them from the ExpressionSet.
patternStage
in interface QueryHandler
public BindingQueryPlan prepareBindings(Query q, Node[] variables)
QueryHandler
prepareBindings
in interface QueryHandler
public TreeQueryPlan prepareTree(Graph pattern)
QueryHandler
prepareTree
in interface QueryHandler
public com.hp.hpl.jena.util.iterator.ExtendedIterator<Node> objectsFor(Node s, Node p)
QueryHandler
objectsFor
in interface QueryHandler
public com.hp.hpl.jena.util.iterator.ExtendedIterator<Node> subjectsFor(Node p, Node o)
QueryHandler
subjectsFor
in interface QueryHandler
public com.hp.hpl.jena.util.iterator.ExtendedIterator<Node> predicatesFor(Node s, Node o)
QueryHandler
p
such that
(s, p, o)
is in the underlying graph. .remove() is not
defined on this iterator.predicatesFor
in interface QueryHandler
public static com.hp.hpl.jena.util.iterator.ExtendedIterator<Node> objectsFor(Graph g, Node s, Node p)
public static com.hp.hpl.jena.util.iterator.ExtendedIterator<Node> subjectsFor(Graph g, Node p, Node o)
public static com.hp.hpl.jena.util.iterator.ExtendedIterator<Node> predicatesFor(Graph g, Node s, Node o)
public boolean containsNode(Node n)
containsNode
in interface QueryHandler
Copyright ? 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP