Class SPARQLCSVResultWriter
- java.lang.Object
-
- com.stardog.stark.query.io.text.csv.SPARQLCSVResultWriter
-
- All Implemented Interfaces:
QueryResultWriter<BindingSet>
,SelectQueryResultWriter
,QueryResultHandler<BindingSet>
,SelectQueryResultHandler
public final class SPARQLCSVResultWriter extends java.lang.Object implements SelectQueryResultWriter
Writer
implements for SPARQL/CSV query result format- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
- See Also:
SelectQueryResult
,QueryResultFormats.CSV
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SPARQLCSVResultWriter.CSVRWFactory
Factory
for creatingSPARQLCSVResultWriter
-
Constructor Summary
Constructors Constructor Description SPARQLCSVResultWriter(java.io.OutputStream theOutputStream, 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
-
SPARQLCSVResultWriter
public SPARQLCSVResultWriter(@Nonnull java.io.OutputStream theOutputStream, @Nonnull 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
-
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()
-
start
public void start()
Indicates that writing has begun.- Specified by:
start
in interfaceQueryResultHandler<BindingSet>
- Specified by:
start
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"
-
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
-
end
public void end()
Signal that query processing has completed- Specified by:
end
in interfaceQueryResultHandler<BindingSet>
- Specified by:
end
in interfaceQueryResultWriter<BindingSet>
-
-