org.eaglei.repository.format
Class SPARQLTextWriter

java.lang.Object
  extended by org.eaglei.repository.format.SPARQLTextWriter
All Implemented Interfaces:
org.openrdf.query.resultio.TupleQueryResultWriter, org.openrdf.query.TupleQueryResultHandler

public class SPARQLTextWriter
extends java.lang.Object
implements org.openrdf.query.resultio.TupleQueryResultWriter

Tuple query results writer for plain text format. Very simple and stupid "TSV" (tab-separated values) format, not even checking for embedded tabs in values. Perhaps it would be better to have a more human-readable text format (e.g. columns aligned by whitespace, maybe borders) but this was quick and expedient.

Version:
$Id: $
Author:
lcs

Field Summary
static org.openrdf.query.resultio.TupleQueryResultFormat theFormat
          Constant theFormat
 
Constructor Summary
SPARQLTextWriter(java.io.OutputStream out)
          Constructor for SPARQLTextWriter.
 
Method Summary
 void endQueryResult()
          endQueryResult
 org.openrdf.query.resultio.TupleQueryResultFormat getTupleQueryResultFormat()
          getTupleQueryResultFormat
 void handleSolution(org.openrdf.query.BindingSet bs)
          
 void startQueryResult(java.util.List<java.lang.String> bindingNames)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theFormat

public static org.openrdf.query.resultio.TupleQueryResultFormat theFormat
Constant theFormat

Constructor Detail

SPARQLTextWriter

public SPARQLTextWriter(java.io.OutputStream out)

Constructor for SPARQLTextWriter.

Parameters:
out - a OutputStream object.
Method Detail

getTupleQueryResultFormat

public org.openrdf.query.resultio.TupleQueryResultFormat getTupleQueryResultFormat()

getTupleQueryResultFormat

Specified by:
getTupleQueryResultFormat in interface org.openrdf.query.resultio.TupleQueryResultWriter
Returns:
a TupleQueryResultFormat object.

startQueryResult

public void startQueryResult(java.util.List<java.lang.String> bindingNames)
                      throws org.openrdf.query.TupleQueryResultHandlerException

Specified by:
startQueryResult in interface org.openrdf.query.TupleQueryResultHandler
Throws:
org.openrdf.query.TupleQueryResultHandlerException

endQueryResult

public void endQueryResult()
                    throws org.openrdf.query.TupleQueryResultHandlerException

endQueryResult

Specified by:
endQueryResult in interface org.openrdf.query.TupleQueryResultHandler
Throws:
org.openrdf.query.TupleQueryResultHandlerException - if any.

handleSolution

public void handleSolution(org.openrdf.query.BindingSet bs)
                    throws org.openrdf.query.TupleQueryResultHandlerException

Specified by:
handleSolution in interface org.openrdf.query.TupleQueryResultHandler
Throws:
org.openrdf.query.TupleQueryResultHandlerException


Copyright © 2009-2010 Eagle-I. All Rights Reserved.