Package com.stardog.stark.query.io.json
Class AbstractSPARQLJSONWriter<T>
java.lang.Object
com.stardog.stark.query.io.json.AbstractSPARQLJSONWriter<T>
- All Implemented Interfaces:
QueryResultWriter<T>,QueryResultHandler<T>
- Direct Known Subclasses:
SPARQLJSONBooleanResultWriter,SPARQLJSONSelectResultWriter
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected booleanprotected booleanprotected final com.fasterxml.jackson.core.JsonGeneratorprotected booleanprotected final Optionsprotected boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSPARQLJSONWriter(OutputStream theOutput, Options theOptions) -
Method Summary
Modifier and TypeMethodDescriptionvoidend()Signal that query processing has completedprotected voidformat()Theformatthis writer will serialize output invoidHandle the set of links from the resultvoidvoidstart()Indicates that writing has begun.protected voidprotected voidprotected voidwriteValue(Value value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.stardog.stark.query.io.QueryResultWriter
handle
-
Field Details
-
jg
protected final com.fasterxml.jackson.core.JsonGenerator jg -
mOptions
-
firstTupleWritten
protected boolean firstTupleWritten -
documentOpen
protected boolean documentOpen -
headerOpen
protected boolean headerOpen -
headerComplete
protected boolean headerComplete -
tupleVariablesFound
protected boolean tupleVariablesFound -
linksFound
protected boolean linksFound
-
-
Constructor Details
-
AbstractSPARQLJSONWriter
-
-
Method Details
-
start
public void start()Indicates that writing has begun.- Specified by:
startin interfaceQueryResultHandler<T>- Specified by:
startin interfaceQueryResultWriter<T>
-
links
Handle the set of links from the result- Specified by:
linksin interfaceQueryResultHandler<T>- Specified by:
linksin interfaceQueryResultWriter<T>- Parameters:
theLinks- The links- See Also:
-
namespace
- Specified by:
namespacein interfaceQueryResultWriter<T>- Throws:
ResultWritingFailed
-
end
public void end()Signal that query processing has completed- Specified by:
endin interfaceQueryResultHandler<T>- Specified by:
endin interfaceQueryResultWriter<T>
-
startHeader
protected void startHeader() -
writeHeaderFields
- Throws:
IOException
-
endHeader
protected void endHeader() -
writeValue
- Throws:
IOException
-
format
Theformatthis writer will serialize output in- Specified by:
formatin interfaceQueryResultWriter<T>- Returns:
- the format
-