Class BinarySelectQueryResultWriter
- java.lang.Object
-
- com.stardog.stark.query.io.binary.BinarySelectQueryResultWriter
-
- All Implemented Interfaces:
BinaryQueryResultConstants,QueryResultWriter<BindingSet>,SelectQueryResultWriter,QueryResultHandler<BindingSet>,SelectQueryResultHandler
public final class BinarySelectQueryResultWriter extends java.lang.Object implements SelectQueryResultWriter, BinaryQueryResultConstants
WriterforSelectQueryResultin a binary format- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
- See Also:
QueryResultFormats.BINARY
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBinarySelectQueryResultWriter.BinarySelectQueryResultWriterFactory
-
Field Summary
-
Fields inherited from interface com.stardog.stark.query.io.binary.BinaryQueryResultConstants
BNODE_RECORD_MARKER, DATATYPE_LITERAL_RECORD_MARKER, DEFAULT_GRAPH_RECORD_MARKER, EMPTY_ROW_RECORD_MARKER, ERROR_RECORD_MARKER, FORMAT_VERSION, LANG_LITERAL_RECORD_MARKER, MAGIC_NUMBER, MALFORMED_QUERY_ERROR, NAMED_GRAPH_RECORD_MARKER, NAMESPACE_RECORD_MARKER, NULL_RECORD_MARKER, PLAIN_LITERAL_RECORD_MARKER, QNAME_RECORD_MARKER, QUERY_EVALUATION_ERROR, REPEAT_RECORD_MARKER, STATEMENT_RECORD_MARKER, TABLE_END_RECORD_MARKER, URI_RECORD_MARKER
-
-
Constructor Summary
Constructors Constructor Description BinarySelectQueryResultWriter(java.io.OutputStream theWriter, 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 queryvoidlinks(java.util.List<java.lang.String> theLinks)Handle the set of links from the resultvoidnamespace(java.lang.String thePrefix, java.lang.String theIRI)voidstart()Indicates that writing has begun.voidvariables(java.util.List<java.lang.String> theVars)The variables in the projection of the query
-
-
-
Constructor Detail
-
BinarySelectQueryResultWriter
public BinarySelectQueryResultWriter(java.io.OutputStream theWriter, Options theOptions)
-
-
Method Detail
-
start
public void start() throws ResultWritingFailedIndicates that writing has begun.- Specified by:
startin interfaceQueryResultHandler<BindingSet>- Specified by:
startin interfaceQueryResultWriter<BindingSet>- Throws:
ResultWritingFailed- if writing failed.
-
namespace
public void namespace(@Nonnull java.lang.String thePrefix, @Nonnull java.lang.String theIRI) throws ResultWritingFailed- Specified by:
namespacein interfaceQueryResultWriter<BindingSet>- Throws:
ResultWritingFailed
-
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() throws ResultWritingFailedSignal that query processing has completed- Specified by:
endin interfaceQueryResultHandler<BindingSet>- Specified by:
endin interfaceQueryResultWriter<BindingSet>- Throws:
ResultWritingFailed
-
links
public void links(@Nonnull java.util.List<java.lang.String> theLinks) throws ResultWritingFailedHandle the set of links from the result- Specified by:
linksin interfaceQueryResultHandler<BindingSet>- Specified by:
linksin interfaceQueryResultWriter<BindingSet>- Parameters:
theLinks- The links- Throws:
ResultWritingFailed- See Also:
- "link"
-
format
@Nonnull public QueryResultFormat format()
Theformatthis writer will serialize output in- Specified by:
formatin interfaceQueryResultWriter<BindingSet>- Returns:
- the format
-
-