Package com.stardog.stark.query.io.json
Class SPARQLJSONSelectResultWriter
- java.lang.Object
-
- com.stardog.stark.query.io.json.AbstractSPARQLJSONWriter<BindingSet>
-
- com.stardog.stark.query.io.json.SPARQLJSONSelectResultWriter
-
- All Implemented Interfaces:
QueryResultWriter<BindingSet>,SelectQueryResultWriter,QueryResultHandler<BindingSet>,SelectQueryResultHandler
public class SPARQLJSONSelectResultWriter extends AbstractSPARQLJSONWriter<BindingSet> implements SelectQueryResultWriter
SelectQueryResultWriterforselect resultsas SPARQL/JSON- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSPARQLJSONSelectResultWriter.SPARQLJSONSelectResultWriterFactory
-
Field Summary
-
Fields inherited from class com.stardog.stark.query.io.json.AbstractSPARQLJSONWriter
documentOpen, firstTupleWritten, headerComplete, headerOpen, jg, linksFound, mOptions, tupleVariablesFound
-
-
Constructor Summary
Constructors Constructor Description SPARQLJSONSelectResultWriter(java.io.OutputStream theOutputStream, Options theOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidend()Signal that query processing has completedQueryResultFormatformat()Theformatthis writer will serialize output invoidhandle(BindingSet theBindings)Handle a result to a queryvoidvariables(java.util.List<java.lang.String> theVars)The variables in the projection of the query-
Methods inherited from class com.stardog.stark.query.io.json.AbstractSPARQLJSONWriter
endHeader, links, namespace, start, startHeader, writeHeaderFields, writeValue
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.stardog.stark.query.io.QueryResultWriter
links, namespace, start
-
-
-
-
Constructor Detail
-
SPARQLJSONSelectResultWriter
public SPARQLJSONSelectResultWriter(java.io.OutputStream theOutputStream, Options theOptions)
-
-
Method Detail
-
variables
public void variables(@Nonnull java.util.List<java.lang.String> theVars)The variables in the projection of the query- Specified by:
variablesin interfaceSelectQueryResultHandler- Parameters:
theVars- the variables- See Also:
SelectQueryResult.variables()
-
handle
public void handle(@Nonnull BindingSet theBindings) throws ResultWritingFailedHandle a result to a query- Specified by:
handlein interfaceQueryResultHandler<BindingSet>- Specified by:
handlein interfaceQueryResultWriter<BindingSet>- Parameters:
theBindings- the result- Throws:
ResultWritingFailed
-
end
public void end()
Signal that query processing has completed- Specified by:
endin interfaceQueryResultHandler<BindingSet>- Specified by:
endin interfaceQueryResultWriter<BindingSet>- Overrides:
endin classAbstractSPARQLJSONWriter<BindingSet>
-
format
@Nonnull public QueryResultFormat format()
Theformatthis writer will serialize output in- Specified by:
formatin interfaceQueryResultWriter<BindingSet>- Overrides:
formatin classAbstractSPARQLJSONWriter<BindingSet>- Returns:
- the format
-
-