Class BinaryQueryResultWriter
- java.lang.Object
-
- org.eclipse.rdf4j.query.resultio.AbstractQueryResultWriter
-
- org.eclipse.rdf4j.query.resultio.binary.BinaryQueryResultWriter
-
- All Implemented Interfaces:
org.eclipse.rdf4j.common.io.ByteSink,org.eclipse.rdf4j.common.io.Sink,QueryResultHandler,QueryResultWriter,TupleQueryResultWriter,TupleQueryResultHandler
public class BinaryQueryResultWriter extends AbstractQueryResultWriter implements TupleQueryResultWriter, org.eclipse.rdf4j.common.io.ByteSink
Writer for the binary tuple result format. The format is explained inBinaryQueryResultConstants.- Author:
- Arjohn Kampman
-
-
Field Summary
Fields Modifier and Type Field Description protected booleantupleVariablesFound
-
Constructor Summary
Constructors Constructor Description BinaryQueryResultWriter(OutputStream out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendHeader()voidendQueryResult()voiderror(QueryErrorType errType, String msg)Writes an error msg to the stream.OutputStreamgetOutputStream()TupleQueryResultFormatgetQueryResultFormat()Collection<org.eclipse.rdf4j.rio.RioSetting<?>>getSupportedSettings()TupleQueryResultFormatgetTupleQueryResultFormat()voidhandleBoolean(boolean value)voidhandleLinks(List<String> linkUrls)voidhandleNamespace(String prefix, String uri)protected voidhandleSolutionImpl(BindingSet bindingSet)voidhandleStylesheet(String stylesheetUrl)voidstartDocument()voidstartHeader()voidstartQueryResult(List<String> bindingNames)-
Methods inherited from class org.eclipse.rdf4j.query.resultio.AbstractQueryResultWriter
getFileFormat, getWriterConfig, handleSolution, setWriterConfig, xsdStringToPlainLiteral
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.rdf4j.query.QueryResultHandler
handleSolution
-
Methods inherited from interface org.eclipse.rdf4j.query.resultio.QueryResultWriter
getWriterConfig, setWriterConfig
-
-
-
-
Constructor Detail
-
BinaryQueryResultWriter
public BinaryQueryResultWriter(OutputStream out)
-
-
Method Detail
-
getOutputStream
public OutputStream getOutputStream()
- Specified by:
getOutputStreamin interfaceorg.eclipse.rdf4j.common.io.ByteSink
-
getTupleQueryResultFormat
public final TupleQueryResultFormat getTupleQueryResultFormat()
- Specified by:
getTupleQueryResultFormatin interfaceTupleQueryResultWriter
-
getQueryResultFormat
public final TupleQueryResultFormat getQueryResultFormat()
- Specified by:
getQueryResultFormatin interfaceQueryResultWriter
-
getSupportedSettings
public Collection<org.eclipse.rdf4j.rio.RioSetting<?>> getSupportedSettings()
- Specified by:
getSupportedSettingsin interfaceQueryResultWriter- Overrides:
getSupportedSettingsin classAbstractQueryResultWriter
-
startDocument
public void startDocument() throws TupleQueryResultHandlerException- Specified by:
startDocumentin interfaceQueryResultWriter- Throws:
TupleQueryResultHandlerException
-
startQueryResult
public void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException
- Specified by:
startQueryResultin interfaceQueryResultHandler- Overrides:
startQueryResultin classAbstractQueryResultWriter- Throws:
TupleQueryResultHandlerException
-
endQueryResult
public void endQueryResult() throws TupleQueryResultHandlerException- Specified by:
endQueryResultin interfaceQueryResultHandler- Throws:
TupleQueryResultHandlerException
-
handleSolutionImpl
protected void handleSolutionImpl(BindingSet bindingSet) throws TupleQueryResultHandlerException
- Overrides:
handleSolutionImplin classAbstractQueryResultWriter- Throws:
TupleQueryResultHandlerException
-
handleNamespace
public void handleNamespace(String prefix, String uri) throws QueryResultHandlerException
- Specified by:
handleNamespacein interfaceQueryResultWriter- Throws:
QueryResultHandlerException
-
error
public void error(QueryErrorType errType, String msg) throws IOException
Writes an error msg to the stream.- Parameters:
errType- The error type.msg- The error message.- Throws:
IOException- When the error could not be written to the stream.
-
handleStylesheet
public void handleStylesheet(String stylesheetUrl) throws QueryResultHandlerException
- Specified by:
handleStylesheetin interfaceQueryResultWriter- Throws:
QueryResultHandlerException
-
startHeader
public void startHeader() throws QueryResultHandlerException- Specified by:
startHeaderin interfaceQueryResultWriter- Throws:
QueryResultHandlerException
-
handleLinks
public void handleLinks(List<String> linkUrls) throws QueryResultHandlerException
- Specified by:
handleLinksin interfaceQueryResultHandler- Throws:
QueryResultHandlerException
-
endHeader
public void endHeader() throws QueryResultHandlerException- Specified by:
endHeaderin interfaceQueryResultWriter- Throws:
QueryResultHandlerException
-
handleBoolean
public void handleBoolean(boolean value) throws QueryResultHandlerException- Specified by:
handleBooleanin interfaceQueryResultHandler- Throws:
QueryResultHandlerException
-
-