org.openrdf.sesame.query
Class BinaryTableResultWriter

java.lang.Object
  extended byorg.openrdf.sesame.query.BinaryTableResultWriter
All Implemented Interfaces:
BinaryTableResultConstants, TableQueryResultListener

public class BinaryTableResultWriter
extends Object
implements BinaryTableResultConstants, TableQueryResultListener

Writer for the binary table result format. The format is explained in BinaryTableResultConstants.

Version:
$Revision: 1.3.4.2 $
Author:
Arjohn Kampman
See Also:
BinaryTableResultConstants

Field Summary
 
Fields inherited from interface org.openrdf.sesame.query.BinaryTableResultConstants
BNODE_RECORD_MARKER, DATATYPE_LITERAL_RECORD_MARKER, ERROR_RECORD_MARKER, FORMAT_VERSION, LANG_LITERAL_RECORD_MARKER, MAGIC_NUMBER, MALFORMED_QUERY_ERROR, NAMESPACE_RECORD_MARKER, NULL_RECORD_MARKER, PLAIN_LITERAL_RECORD_MARKER, QNAME_RECORD_MARKER, QUERY_EVALUATION_ERROR, REPEAT_RECORD_MARKER, TABLE_END_RECORD_MARKER, URI_RECORD_MARKER
 
Constructor Summary
BinaryTableResultWriter(OutputStream out)
          Creates a new writer for the binary result format that will write the results to the supplied OutputStream.
 
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

BinaryTableResultWriter

public BinaryTableResultWriter(OutputStream out)
Creates a new writer for the binary result format that will write the results to the supplied OutputStream.

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.