com.hp.hpl.jena.graph.query
Interface QueryHandler

All Known Implementing Classes:
SimpleQueryHandler

public interface QueryHandler


Method Summary
 boolean containsNode(Node n)
          true iff the graph contains a triple in which n appears somewhere.
 boolean isEmpty()
          Answer true iff the graph contains no explicit triples.
 ExtendedIterator 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, Graph constraints, Triple[] p)
          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)
_map_ is the variable binding map to use and update.
 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_.
 ExtendedIterator 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.
 

Method Detail

prepareBindings

public BindingQueryPlan prepareBindings(Query q,
                                        Node[] variables)
prepare a plan for generating bindings given the query _q_ and the result variables _variables_.


patternStage

public Stage patternStage(Mapping map,
                          Graph constraints,
                          Triple[] p)
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)
_map_ is the variable binding map to use and update. _constraints_ is the current constraint graph: if this Stage can absorb some of the constraints, it may do so, remove them from the graph.


prepareTree

public TreeQueryPlan prepareTree(Graph pattern)
deliver a plan for executing the tree-match query defined by _pattern_.


objectsFor

public ExtendedIterator 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.


subjectsFor

public ExtendedIterator 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.


containsNode

public boolean containsNode(Node n)
true iff the graph contains a triple in which n appears somewhere. if n is a fluid node, it is not defined whether true or false is returned, so don't do that.


isEmpty

public boolean isEmpty()
Answer true iff the graph contains no explicit triples.



Copyright © 2001-2003 Hewlett-Packard. All Rights Reserved.