org.openrdf.query.resultio.sparqljson
Class SPARQLResultsJSONWriter

java.lang.Object
  extended by org.openrdf.query.resultio.sparqljson.SPARQLResultsJSONWriter
All Implemented Interfaces:
TupleQueryResultWriter, TupleQueryResultHandler

public class SPARQLResultsJSONWriter
extends Object
implements TupleQueryResultWriter

A TupleQueryResultWriter that writes query results in the SPARQL Query Results JSON Format.


Constructor Summary
SPARQLResultsJSONWriter(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> columnHeaders)
          Indicates the start of a sequence of Solutions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPARQLResultsJSONWriter

public SPARQLResultsJSONWriter(OutputStream out)
Method Detail

getTupleQueryResultFormat

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

Specified by:
getTupleQueryResultFormat in interface TupleQueryResultWriter

startQueryResult

public void startQueryResult(List<String> columnHeaders)
                      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:
columnHeaders - 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


Copyright © 2001-2007 Aduna. All Rights Reserved.