Package com.stardog.stark.query.io.json
Class SPARQLJSONBooleanResultWriter
- java.lang.Object
-
- com.stardog.stark.query.io.json.AbstractSPARQLJSONWriter<java.lang.Boolean>
-
- com.stardog.stark.query.io.json.SPARQLJSONBooleanResultWriter
-
- All Implemented Interfaces:
BooleanQueryResultHandler
,BooleanQueryResultWriter
,QueryResultWriter<java.lang.Boolean>
,QueryResultHandler<java.lang.Boolean>
public final class SPARQLJSONBooleanResultWriter extends AbstractSPARQLJSONWriter<java.lang.Boolean> implements BooleanQueryResultWriter
Writer
forboolean results
in SPARQL/JSON.- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SPARQLJSONBooleanResultWriter.SPARQLJSONBooleanResultWriterFactory
-
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 SPARQLJSONBooleanResultWriter(java.io.OutputStream theOutput, Options theOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryResultFormat
format()
Theformat
this writer will serialize output invoid
handle(java.lang.Boolean theResult)
Handle a result to a query-
Methods inherited from class com.stardog.stark.query.io.json.AbstractSPARQLJSONWriter
end, 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
end, links, namespace, start
-
-
-
-
Constructor Detail
-
SPARQLJSONBooleanResultWriter
public SPARQLJSONBooleanResultWriter(@Nonnull java.io.OutputStream theOutput, @Nonnull Options theOptions)
-
-
Method Detail
-
handle
public void handle(@Nonnull java.lang.Boolean theResult) throws ResultWritingFailed
Handle a result to a query- Specified by:
handle
in interfaceBooleanQueryResultHandler
- Specified by:
handle
in interfaceQueryResultHandler<java.lang.Boolean>
- Specified by:
handle
in interfaceQueryResultWriter<java.lang.Boolean>
- Parameters:
theResult
- the result- Throws:
ResultWritingFailed
-
format
@Nonnull public QueryResultFormat format()
Theformat
this writer will serialize output in- Specified by:
format
in interfaceQueryResultWriter<java.lang.Boolean>
- Overrides:
format
in classAbstractSPARQLJSONWriter<java.lang.Boolean>
- Returns:
- the format
-
-