org.openrdf.sesame.sail.query
Class TriplePattern

java.lang.Object
  extended byorg.openrdf.sesame.sail.query.TriplePattern
All Implemented Interfaces:
PathExpression
Direct Known Subclasses:
DirectSubClassOf, DirectSubPropertyOf, DirectType

public class TriplePattern
extends Object
implements PathExpression

Author:
Arjohn Kampman

Constructor Summary
TriplePattern(Var subjectVar, Var predicateVar, Var objectVar)
           
 
Method Summary
 void clear()
          Clears any state information in this path expression.
 Var getObjectVar()
           
 Var getPredicateVar()
           
 Var getSubjectVar()
           
 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.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TriplePattern

public TriplePattern(Var subjectVar,
                     Var predicateVar,
                     Var objectVar)
Method Detail

getSubjectVar

public Var getSubjectVar()

getPredicateVar

public Var getPredicateVar()

getObjectVar

public Var getObjectVar()

initialize

public void initialize(RdfSource rdfSource)
                throws SailQueryException
Description copied from interface: PathExpression
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.

Specified by:
initialize in interface PathExpression
Throws:
SailQueryException

selectNext

public boolean selectNext(RdfSource rdfSource)
Description copied from interface: PathExpression
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.

Specified by:
selectNext in interface PathExpression
Returns:
true if a next path has been found, false if no more paths could be found.

clear

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

Specified by:
clear in interface PathExpression

getVariables

public void getVariables(Collection variables)
Description copied from interface: PathExpression
Gets all variables that are used in this PathExpression.

Specified by:
getVariables in interface PathExpression
Parameters:
variables - A Collection to add the Var objects to.

toString

public String toString()


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