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 final class SPARQLJSONSelectResultWriter extends AbstractSPARQLJSONWriter<BindingSet> implements SelectQueryResultWriter
SelectQueryResultWriter
forselect results
as SPARQL/JSON- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SPARQLJSONSelectResultWriter.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 void
end()
Signal that query processing has completedQueryResultFormat
format()
Theformat
this writer will serialize output invoid
handle(BindingSet theBindings)
Handle a result to a queryvoid
variables(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, 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:
variables
in interfaceSelectQueryResultHandler
- Parameters:
theVars
- the variables- See Also:
SelectQueryResult.variables()
-
handle
public void handle(@Nonnull BindingSet theBindings) throws ResultWritingFailed
Handle a result to a query- Specified by:
handle
in interfaceQueryResultHandler<BindingSet>
- Specified by:
handle
in interfaceQueryResultWriter<BindingSet>
- Parameters:
theBindings
- the result- Throws:
ResultWritingFailed
-
end
public void end()
Signal that query processing has completed- Specified by:
end
in interfaceQueryResultHandler<BindingSet>
- Specified by:
end
in interfaceQueryResultWriter<BindingSet>
- Overrides:
end
in classAbstractSPARQLJSONWriter<BindingSet>
-
format
@Nonnull public QueryResultFormat format()
Theformat
this writer will serialize output in- Specified by:
format
in interfaceQueryResultWriter<BindingSet>
- Overrides:
format
in classAbstractSPARQLJSONWriter<BindingSet>
- Returns:
- the format
-
-