org.openrdf.sesame.query
Class VarBindingRdfWriter

java.lang.Object
  extended byorg.openrdf.sesame.query.VarBindingRdfWriter
All Implemented Interfaces:
TableQueryResultListener

public class VarBindingRdfWriter
extends Object
implements TableQueryResultListener

A TableQueryResultListener that converts query results into an RDF document containing variable bindings. This format is based on the work done by Andy Seaborne. See http://www.w3.org/2003/03/rdfqr-tests/recording-query-results.html for a description of the results format.

Version:
$Revision: 1.9.4.2 $
Author:
Arjohn Kampman

Constructor Summary
VarBindingRdfWriter(OutputStream out)
          Creates a new VarBindingRdfWriter.
VarBindingRdfWriter(RDFFormat rdfFormat, OutputStream out)
           
 
Method Summary
 void endTableQueryResult()
          Indicates the end of a table-like query result.
 void endTuple()
          Indicates the end of a tuple/row.
 void error(QueryErrorType errType, String msg)
          Reports an error that has occurred during the query evaluation.
 void startTableQueryResult()
          Indicates the start of a table-like query result.
 void startTableQueryResult(String[] columnHeaders)
          Indicates the start of a table-like query result.
 void startTuple()
          Indicates the start of a tuple/row.
 void tupleValue(Value value)
          Delivers the next value in the current tuple/row.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VarBindingRdfWriter

public VarBindingRdfWriter(OutputStream out)
Creates a new VarBindingRdfWriter.


VarBindingRdfWriter

public VarBindingRdfWriter(RDFFormat rdfFormat,
                           OutputStream out)
Method Detail

startTableQueryResult

public void startTableQueryResult()
                           throws IOException
Description copied from interface: TableQueryResultListener
Indicates the start of a table-like query result.

Specified by:
startTableQueryResult in interface TableQueryResultListener
Throws:
IOException

startTableQueryResult

public void startTableQueryResult(String[] columnHeaders)
                           throws IOException
Description copied from interface: TableQueryResultListener
Indicates the start of a table-like query result. The supplied columnHeaders are an indication of the values that are in a specific column. For example, a query select A, B from * .... could have column headers A and B.

Specified by:
startTableQueryResult in interface TableQueryResultListener
Throws:
IOException

endTableQueryResult

public void endTableQueryResult()
                         throws IOException
Description copied from interface: TableQueryResultListener
Indicates the end of a table-like query result.

Specified by:
endTableQueryResult in interface TableQueryResultListener
Throws:
IOException

startTuple

public void startTuple()
                throws IOException
Description copied from interface: TableQueryResultListener
Indicates the start of a tuple/row.

Specified by:
startTuple in interface TableQueryResultListener
Throws:
IOException

endTuple

public void endTuple()
              throws IOException
Description copied from interface: TableQueryResultListener
Indicates the end of a tuple/row.

Specified by:
endTuple in interface TableQueryResultListener
Throws:
IOException

tupleValue

public void tupleValue(Value value)
                throws IOException
Description copied from interface: TableQueryResultListener
Delivers the next value in the current tuple/row.

Specified by:
tupleValue in interface TableQueryResultListener
Parameters:
value - The next value in the current tuple/row.
Throws:
IOException

error

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

Specified by:
error in interface TableQueryResultListener
Parameters:
errType - The type of error.
msg - A message describing the error.
Throws:
IOException


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