org.openrdf.sesame.query
Interface GraphQueryResultListener

All Known Implementing Classes:
GraphQueryDuplicatesFilter, QueryResultsGraphBuilder, RdfGraphWriter, StdOutGraphQueryResultWriter

public interface GraphQueryResultListener

A listener for graph-like query results. The results are returned as triples.


Method Summary
 void endGraphQueryResult()
          Indicates the end of a graph-like query result.
 void namespace(String prefix, String name)
          Reports a namespace and its (preferred) prefix that might be used in the query result.
 void reportError(String msg)
          Reports an error that has occurred during the query evaluation.
 void startGraphQueryResult()
          Indicates the start of a graph-like query result.
 void triple(Resource subj, URI pred, Value obj)
          Delivers the next triple in the query result.
 

Method Detail

startGraphQueryResult

public void startGraphQueryResult()
                           throws IOException
Indicates the start of a graph-like query result.

Throws:
IOException

endGraphQueryResult

public void endGraphQueryResult()
                         throws IOException
Indicates the end of a graph-like query result.

Throws:
IOException

namespace

public void namespace(String prefix,
                      String name)
               throws IOException
Reports a namespace and its (preferred) prefix that might be used in the query result. Namespaces will be reported before the start of the query result as much as possible to accomodate listeners that need these mapping beforehand (like an RDF/XML document writer).

Throws:
IOException

triple

public void triple(Resource subj,
                   URI pred,
                   Value obj)
            throws IOException
Delivers the next triple in the query result.

Throws:
IOException

reportError

public void reportError(String msg)
                 throws IOException
Reports an error that has occurred during the query evaluation.

Throws:
IOException


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