org.openrdf.query.resultio.text.tsv
Class SPARQLResultsTSVWriter

java.lang.Object
  extended by org.openrdf.query.resultio.text.tsv.SPARQLResultsTSVWriter
All Implemented Interfaces:
TupleQueryResultWriter, TupleQueryResultHandler

public class SPARQLResultsTSVWriter
extends Object
implements TupleQueryResultWriter

TupleQueryResultWriter for the SPARQL TSV (Tab-Separated Values) format.

Author:
Jeen Broekstra
See Also:
http://www.w3.org/TR/sparql11-results-csv-tsv/#tsv

Constructor Summary
SPARQLResultsTSVWriter(OutputStream out)
           
 
Method Summary
 void endQueryResult()
          Indicates the end of a sequence of solutions.
 TupleQueryResultFormat getTupleQueryResultFormat()
          Gets the query result format that this writer uses.
 void handleSolution(BindingSet bindingSet)
          Handles a solution.
 void startQueryResult(List<String> bindingNames)
          Indicates the start of a sequence of Solutions.
protected  void writeBNode(BNode bNode)
           
protected  void writeResource(Resource res)
           
protected  void writeURI(URI uri)
           
protected  void writeValue(Value val)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPARQLResultsTSVWriter

public SPARQLResultsTSVWriter(OutputStream out)
Parameters:
out -
Method Detail

startQueryResult

public void startQueryResult(List<String> bindingNames)
                      throws TupleQueryResultHandlerException
Description copied from interface: TupleQueryResultHandler
Indicates the start of a sequence of Solutions. The supplied bindingNames are an indication of the values that are in the Solutions. For example, a SeRQL query like select X, Y from {X} P {Y} will have binding names X and Y.

Specified by:
startQueryResult in interface TupleQueryResultHandler
Parameters:
bindingNames - An ordered set of binding names.
Throws:
TupleQueryResultHandlerException

endQueryResult

public void endQueryResult()
                    throws TupleQueryResultHandlerException
Description copied from interface: TupleQueryResultHandler
Indicates the end of a sequence of solutions.

Specified by:
endQueryResult in interface TupleQueryResultHandler
Throws:
TupleQueryResultHandlerException

handleSolution

public void handleSolution(BindingSet bindingSet)
                    throws TupleQueryResultHandlerException
Description copied from interface: TupleQueryResultHandler
Handles a solution.

Specified by:
handleSolution in interface TupleQueryResultHandler
Throws:
TupleQueryResultHandlerException

getTupleQueryResultFormat

public TupleQueryResultFormat getTupleQueryResultFormat()
Description copied from interface: TupleQueryResultWriter
Gets the query result format that this writer uses.

Specified by:
getTupleQueryResultFormat in interface TupleQueryResultWriter

writeValue

protected void writeValue(Value val)
                   throws IOException
Throws:
IOException

writeResource

protected void writeResource(Resource res)
                      throws IOException
Throws:
IOException

writeURI

protected void writeURI(URI uri)
                 throws IOException
Throws:
IOException

writeBNode

protected void writeBNode(BNode bNode)
                   throws IOException
Throws:
IOException


Copyright © 2001-2012 Aduna. All Rights Reserved.