org.openrdf.sesame.sail.query
Interface PathExpression

All Known Implementing Classes:
GraphPattern, RdbmsPathExpression, TriplePattern

public interface PathExpression

A path expression that matches specific paths in an (RDF) graph.

Author:
Arjohn Kampman

Method Summary
 void clear()
          Clears any state information in this path expression.
 void getVariables(Collection variables)
          Gets all variables that are used in this PathExpression.
 void initialize(RdfSource rdfSource)
          Initializes the PathExpression.
 boolean selectNext(RdfSource rdfSource)
          Selects the next path matching this path expression.
 

Method Detail

initialize

public void initialize(RdfSource rdfSource)
                throws SailQueryException
Initializes the PathExpression. After a call to this method, the path expression should be able to select all matching path expressions when selectNext is called.

Throws:
SailQueryException

selectNext

public boolean selectNext(RdfSource rdfSource)
                   throws SailQueryException
Selects the next path matching this path expression. Any variables in this path expression should be instantiated after a successful call to this method. When no more matching paths could be found, any bound variables should be uninstantiated.

Returns:
true if a next path has been found, false if no more paths could be found.
Throws:
SailQueryException

clear

public void clear()
Clears any state information in this path expression. After a call to this method, calls to selectNext should not yield any new results.


getVariables

public void getVariables(Collection variables)
Gets all variables that are used in this PathExpression.

Parameters:
variables - A Collection to add the Var objects to.


Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.