Class SPARQLTSVResultWriter
- java.lang.Object
-
- com.stardog.stark.query.io.text.tsv.SPARQLTSVResultWriter
-
- All Implemented Interfaces:
QueryResultWriter<BindingSet>
,SelectQueryResultWriter
,QueryResultHandler<BindingSet>
,SelectQueryResultHandler
public final class SPARQLTSVResultWriter extends java.lang.Object implements SelectQueryResultWriter
Implementation of writing
query results
in SPARQL/TSV format.- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
- See Also:
QueryResultFormats.TSV
,SPARQLTSVResultParser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SPARQLTSVResultWriter.SPARQLTSVResultWriterFactory
Default factory implementation forSPARQLTSVResultWriter
-
Constructor Summary
Constructors Constructor Description SPARQLTSVResultWriter(java.io.OutputStream theStream, Options theOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
end()
Signal that query processing has completedQueryResultFormat
format()
Theformat
this writer will serialize output invoid
handle(BindingSet theBindings)
Handle a result to a queryvoid
links(java.util.List<java.lang.String> theLinks)
Handle the set of links from the resultvoid
namespace(java.lang.String thePrefix, java.lang.String theIRI)
void
start()
Indicates that writing has begun.void
variables(java.util.List<java.lang.String> theVars)
The variables in the projection of the query
-
-
-
Constructor Detail
-
SPARQLTSVResultWriter
public SPARQLTSVResultWriter(java.io.OutputStream theStream, Options theOptions)
-
-
Method Detail
-
format
@Nonnull public QueryResultFormat format()
Theformat
this writer will serialize output in- Specified by:
format
in interfaceQueryResultWriter<BindingSet>
- Returns:
- the format
-
end
public void end()
Signal that query processing has completed- Specified by:
end
in interfaceQueryResultHandler<BindingSet>
- Specified by:
end
in interfaceQueryResultWriter<BindingSet>
-
links
public void links(@Nonnull java.util.List<java.lang.String> theLinks)
Handle the set of links from the result- Specified by:
links
in interfaceQueryResultHandler<BindingSet>
- Specified by:
links
in interfaceQueryResultWriter<BindingSet>
- Parameters:
theLinks
- The links- See Also:
- "link"
-
start
public void start()
Description copied from interface:QueryResultWriter
Indicates that writing has begun.- Specified by:
start
in interfaceQueryResultHandler<BindingSet>
- Specified by:
start
in interfaceQueryResultWriter<BindingSet>
-
handle
public void handle(@Nonnull BindingSet theBindings) throws ResultWritingFailed
Handle a result to a query- Specified by:
handle
in interfaceQueryResultHandler<BindingSet>
- Specified by:
handle
in interfaceQueryResultWriter<BindingSet>
- Parameters:
theBindings
- the result- Throws:
ResultWritingFailed
-
namespace
public void namespace(@Nonnull java.lang.String thePrefix, @Nonnull java.lang.String theIRI) throws ResultWritingFailed
- Specified by:
namespace
in 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:
variables
in interfaceSelectQueryResultHandler
- Parameters:
theVars
- the variables- See Also:
SelectQueryResult.variables()
-
-