Package org.eclipse.rdf4j.query.resultio
Class AbstractQueryResultWriter
- java.lang.Object
-
- org.eclipse.rdf4j.query.resultio.AbstractQueryResultWriter
-
- All Implemented Interfaces:
org.eclipse.rdf4j.common.io.Sink,QueryResultHandler,QueryResultWriter
public abstract class AbstractQueryResultWriter extends Object implements QueryResultWriter, org.eclipse.rdf4j.common.io.Sink
Base class forQueryResultWriters offering common functionality for query result writers.- Author:
- Peter Ansell
-
-
Constructor Summary
Constructors Constructor Description AbstractQueryResultWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.rdf4j.common.lang.FileFormatgetFileFormat()Collection<RioSetting<?>>getSupportedSettings()WriterConfiggetWriterConfig()Retrieves the current writer configuration as a single object.voidhandleSolution(BindingSet bindingSet)protected voidhandleSolutionImpl(BindingSet bindings)Extending classes must implement this method instead of overridinghandleSolution(BindingSet)in order to benefit from automatic handling of RDF-star encoding.voidsetWriterConfig(WriterConfig config)Sets all supplied writer configuration options.voidstartQueryResult(List<String> bindingNames)protected booleanxsdStringToPlainLiteral()-
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
endQueryResult, handleBoolean, handleLinks
-
Methods inherited from interface org.eclipse.rdf4j.query.resultio.QueryResultWriter
endHeader, getQueryResultFormat, handleNamespace, handleStylesheet, startDocument, startHeader
-
-
-
-
Method Detail
-
setWriterConfig
public void setWriterConfig(WriterConfig config)
Description copied from interface:QueryResultWriterSets all supplied writer configuration options.- Specified by:
setWriterConfigin interfaceQueryResultWriter- Parameters:
config- a writer configuration object.
-
getWriterConfig
public WriterConfig getWriterConfig()
Description copied from interface:QueryResultWriterRetrieves the current writer configuration as a single object.- Specified by:
getWriterConfigin interfaceQueryResultWriter- Returns:
- a writer configuration object representing the current configuration of the writer.
-
getSupportedSettings
public Collection<RioSetting<?>> getSupportedSettings()
- Specified by:
getSupportedSettingsin interfaceQueryResultWriter- Returns:
- A collection of
RioSettings that are supported by thisQueryResultWriter.
-
getFileFormat
public org.eclipse.rdf4j.common.lang.FileFormat getFileFormat()
- Specified by:
getFileFormatin interfaceorg.eclipse.rdf4j.common.io.Sink
-
startQueryResult
public void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException
- Specified by:
startQueryResultin interfaceQueryResultHandler- Throws:
TupleQueryResultHandlerException
-
handleSolution
public void handleSolution(BindingSet bindingSet) throws TupleQueryResultHandlerException
- Specified by:
handleSolutionin interfaceQueryResultHandler- Throws:
TupleQueryResultHandlerException
-
handleSolutionImpl
protected void handleSolutionImpl(BindingSet bindings) throws TupleQueryResultHandlerException
Extending classes must implement this method instead of overridinghandleSolution(BindingSet)in order to benefit from automatic handling of RDF-star encoding.- Parameters:
bindings- the solution to handle- Throws:
TupleQueryResultHandlerException- Since:
- 3.2.0
-
xsdStringToPlainLiteral
protected boolean xsdStringToPlainLiteral()
-
-