Class AbstractDataExporterQueryResultWriter
java.lang.Object
com.complexible.common.rdf.query.resultio.AbstractDataExporterQueryResultWriter
- All Implemented Interfaces:
QueryResultWriter<BindingSet>,SelectQueryResultWriter,QueryResultHandler<BindingSet>,SelectQueryResultHandler
- Direct Known Subclasses:
HTMLQueryResultWriter,TextTableQueryResultWriter
public abstract class AbstractDataExporterQueryResultWriter
extends Object
implements SelectQueryResultWriter
- Since:
- 1.2
- Version:
- 6.0
- Author:
- Evren Sirin, Michael Grove
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected RDFValueColumn[]protected TextTabularOutputprotected final PrintStreamprotected Object[] -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractDataExporterQueryResultWriter(OutputStream theOut, Options theOptions, QueryResultFormat theFormat) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNamespaces(Iterable<Namespace> theNamespaces) protected abstract com.brsanthu.dataexporter.DataExporterCreates the exporter and sets its optionsvoidend()Signal that query processing has completedformat()Theformatthis writer will serialize output invoidhandle(BindingSet theBinding) Handle a result to a queryvoidHandle the set of links from the resultvoidvoidstart()Indicates that writing has begun.voidThe variables in the projection of the query
-
Field Details
-
mOut
-
mExporter
-
mColCount
protected int mColCount -
mColumns
-
mResult
-
-
Constructor Details
-
AbstractDataExporterQueryResultWriter
protected AbstractDataExporterQueryResultWriter(OutputStream theOut, Options theOptions, QueryResultFormat theFormat)
-
-
Method Details
-
format
Theformatthis writer will serialize output in- Specified by:
formatin interfaceQueryResultWriter<BindingSet>- Returns:
- the format
-
links
Handle the set of links from the result- Specified by:
linksin interfaceQueryResultHandler<BindingSet>- Specified by:
linksin interfaceQueryResultWriter<BindingSet>- Parameters:
theList- The links- See Also:
-
namespace
- Specified by:
namespacein interfaceQueryResultWriter<BindingSet>- Throws:
ResultWritingFailed
-
addNamespaces
-
start
public void start()Indicates that writing has begun.- Specified by:
startin interfaceQueryResultHandler<BindingSet>- Specified by:
startin interfaceQueryResultWriter<BindingSet>
-
variables
The variables in the projection of the query- Specified by:
variablesin interfaceSelectQueryResultHandler- Parameters:
theSelectVars- the variables- See Also:
-
handle
Handle a result to a query- Specified by:
handlein interfaceQueryResultHandler<BindingSet>- Specified by:
handlein interfaceQueryResultWriter<BindingSet>- Parameters:
theBinding- the result
-
end
public void end()Signal that query processing has completed- Specified by:
endin interfaceQueryResultHandler<BindingSet>- Specified by:
endin interfaceQueryResultWriter<BindingSet>
-
createExporter
protected abstract com.brsanthu.dataexporter.DataExporter createExporter()Creates the exporter and sets its options- Returns:
- a DataExporter object
-