org.openrdf.sesame.query
Class StdOutGraphQueryResultWriter

java.lang.Object
  extended byorg.openrdf.sesame.query.StdOutGraphQueryResultWriter
All Implemented Interfaces:
GraphQueryResultListener

public class StdOutGraphQueryResultWriter
extends Object
implements GraphQueryResultListener

A default implementation of GraphQueryResultListener that simply writes all results to System.out. Useful for debugging purposes.

Version:
$Revision: 1.5.4.2 $
Author:
Jeen Broekstra

Constructor Summary
StdOutGraphQueryResultWriter()
           
 
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StdOutGraphQueryResultWriter

public StdOutGraphQueryResultWriter()
Method Detail

startGraphQueryResult

public void startGraphQueryResult()
                           throws IOException
Description copied from interface: GraphQueryResultListener
Indicates the start of a graph-like query result.

Specified by:
startGraphQueryResult in interface GraphQueryResultListener
Throws:
IOException

endGraphQueryResult

public void endGraphQueryResult()
                         throws IOException
Description copied from interface: GraphQueryResultListener
Indicates the end of a graph-like query result.

Specified by:
endGraphQueryResult in interface GraphQueryResultListener
Throws:
IOException

namespace

public void namespace(String prefix,
                      String name)
               throws IOException
Description copied from interface: GraphQueryResultListener
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).

Specified by:
namespace in interface GraphQueryResultListener
Throws:
IOException

triple

public void triple(Resource subj,
                   URI pred,
                   Value obj)
            throws IOException
Description copied from interface: GraphQueryResultListener
Delivers the next triple in the query result.

Specified by:
triple in interface GraphQueryResultListener
Throws:
IOException

reportError

public void reportError(String msg)
                 throws IOException
Description copied from interface: GraphQueryResultListener
Reports an error that has occurred during the query evaluation.

Specified by:
reportError in interface GraphQueryResultListener
Throws:
IOException


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