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 resultsin 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 classSPARQLTSVResultWriter.SPARQLTSVResultWriterFactoryDefault 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 voidend()Signal that query processing has completedQueryResultFormatformat()Theformatthis writer will serialize output invoidhandle(BindingSet theBindings)Handle a result to a queryvoidlinks(java.util.List<java.lang.String> theLinks)Handle the set of links from the resultvoidnamespace(java.lang.String thePrefix, java.lang.String theIRI)voidstart()Indicates that writing has begun.voidvariables(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()
Theformatthis writer will serialize output in- Specified by:
formatin interfaceQueryResultWriter<BindingSet>- Returns:
- the format
-
end
public void end()
Signal that query processing has completed- Specified by:
endin interfaceQueryResultHandler<BindingSet>- Specified by:
endin interfaceQueryResultWriter<BindingSet>
-
links
public void links(@Nonnull java.util.List<java.lang.String> theLinks)Handle the set of links from the result- Specified by:
linksin interfaceQueryResultHandler<BindingSet>- Specified by:
linksin interfaceQueryResultWriter<BindingSet>- Parameters:
theLinks- The links- See Also:
- "link"
-
start
public void start()
Description copied from interface:QueryResultWriterIndicates that writing has begun.- Specified by:
startin interfaceQueryResultHandler<BindingSet>- Specified by:
startin interfaceQueryResultWriter<BindingSet>
-
handle
public void handle(@Nonnull BindingSet theBindings) throws ResultWritingFailedHandle a result to a query- Specified by:
handlein interfaceQueryResultHandler<BindingSet>- Specified by:
handlein 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:
namespacein 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:
variablesin interfaceSelectQueryResultHandler- Parameters:
theVars- the variables- See Also:
SelectQueryResult.variables()
-
-