org.openrdf.sesame.sail.query
Class GraphPatternQuery

java.lang.Object
  extended byorg.openrdf.sesame.sail.query.GraphPatternQuery
All Implemented Interfaces:
Query
Direct Known Subclasses:
ConstructQuery, SelectQuery

public abstract class GraphPatternQuery
extends Object
implements Query

An abstract representation of an RDF query that works with path expressions.

Author:
Arjan Kleine, Jeen Broekstra, Arjohn Kampman

Method Summary
 void evaluate(RdfSource rdfSource, QueryAnswerListener listener)
          Evaluates the query on the data contained in the supplied RdfSource and reports the results to the supplied QueryAnswerListener.
 GraphPattern getGraphPattern()
           
 int getLimit()
           
 int getOffset()
           
abstract  void getProjectionVariables(Collection variables)
          Gets all variables that are used in the projection of this GraphPatternQuery.
 void getVariables(Collection variables)
          Gets all variables that are used in this query.
 boolean hasLimit()
           
 boolean hasOffset()
           
 boolean isDistinct()
           
 void setDistinct(boolean distinct)
           
 void setGraphPattern(GraphPattern graphPattern)
           
 void setLimit(int limit)
           
 void setOffset(int offset)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openrdf.sesame.sail.query.Query
getColumnHeaders
 

Method Detail

isDistinct

public boolean isDistinct()

setDistinct

public void setDistinct(boolean distinct)

getOffset

public int getOffset()

hasOffset

public boolean hasOffset()

setOffset

public void setOffset(int offset)

getLimit

public int getLimit()

hasLimit

public boolean hasLimit()

setLimit

public void setLimit(int limit)

setGraphPattern

public void setGraphPattern(GraphPattern graphPattern)

getGraphPattern

public GraphPattern getGraphPattern()

getVariables

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

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

getProjectionVariables

public abstract void getProjectionVariables(Collection variables)
Gets all variables that are used in the projection of this GraphPatternQuery.

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

evaluate

public void evaluate(RdfSource rdfSource,
                     QueryAnswerListener listener)
              throws SailQueryException
Description copied from interface: Query
Evaluates the query on the data contained in the supplied RdfSource and reports the results to the supplied QueryAnswerListener.

Specified by:
evaluate in interface Query
Parameters:
rdfSource - An RdfSource containing the data to evaluate the query on.
listener - A QueryAnswerListener that will receive any query results.
Throws:
SailQueryException - An exception indicating that the query evaluation was stopped abnormally.


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