public abstract class AbstractQueryResultWriter extends Object implements QueryResultWriter
QueryResultWriters offering common functionality for query result writers.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractQueryResultWriter()
Default constructor.
|
protected |
AbstractQueryResultWriter(OutputStream out) |
| Modifier and Type | Method and Description |
|---|---|
Optional<OutputStream> |
getOutputStream()
Gets the
OutputStream this writer writes to, if it uses one. |
Collection<RioSetting<?>> |
getSupportedSettings() |
WriterConfig |
getWriterConfig()
Retrieves the current writer configuration as a single object.
|
void |
handleSolution(BindingSet bindingSet)
Handles a solution.
|
protected void |
handleSolutionImpl(BindingSet bindings)
Extending classes must implement this method instead of overriding
handleSolution(BindingSet) in order
to benefit from automatic handling of RDF* encoding. |
void |
setWriterConfig(WriterConfig config)
Sets all supplied writer configuration options.
|
void |
startQueryResult(List<String> bindingNames)
Indicates the start of a sequence of Solutions.
|
protected boolean |
xsdStringToPlainLiteral() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitendHeader, getQueryResultFormat, handleNamespace, handleStylesheet, startDocument, startHeaderendQueryResult, handleBoolean, handleLinksprotected AbstractQueryResultWriter()
protected AbstractQueryResultWriter(OutputStream out)
public Optional<OutputStream> getOutputStream()
QueryResultWriterOutputStream this writer writes to, if it uses one.getOutputStream in interface QueryResultWriterpublic void setWriterConfig(WriterConfig config)
QueryResultWritersetWriterConfig in interface QueryResultWriterconfig - a writer configuration object.public WriterConfig getWriterConfig()
QueryResultWritergetWriterConfig in interface QueryResultWriterpublic Collection<RioSetting<?>> getSupportedSettings()
getSupportedSettings in interface QueryResultWriterRioSettings that are supported by this QueryResultWriter.public void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException
QueryResultHandlerstartQueryResult in interface QueryResultHandlerbindingNames - An ordered set of binding names.TupleQueryResultHandlerException - If there was an error during the starting of the query result handler.
This exception may be thrown if the QueryResultHandler.handleBoolean(boolean)
method was called before this method and the handler cannot process both
boolean and tuple results simultaneously.public void handleSolution(BindingSet bindingSet) throws TupleQueryResultHandlerException
QueryResultHandlerhandleSolution in interface QueryResultHandlerbindingSet - A single set of tuple results, with binding names bound to values. Each of the binding names in
the solution must have previously been registered with the QueryResultHandler.startQueryResult(List)
method.TupleQueryResultHandlerException - If there was an error during the handling of the query solution. This
exception may be thrown if the QueryResultHandler.handleBoolean(boolean) method
was called before this method and the handler cannot process both
boolean and tuple results simultaneously.protected void handleSolutionImpl(BindingSet bindings) throws TupleQueryResultHandlerException
handleSolution(BindingSet) in order
to benefit from automatic handling of RDF* encoding.bindings - the solution to handleTupleQueryResultHandlerExceptionprotected boolean xsdStringToPlainLiteral()
Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.