Package com.stardog.stark.query.io
Interface QueryResultWriter<T>
-
- All Superinterfaces:
QueryResultHandler<T>
- All Known Subinterfaces:
BooleanQueryResultWriter
,PathQueryResultWriter
,SelectQueryResultWriter
- All Known Implementing Classes:
AbstractDataExporterQueryResultWriter
,AbstractSPARQLJSONWriter
,AbstractSPARQLXMLWriter
,BinarySelectQueryResultWriter
,HTMLQueryResultWriter
,SPARQLCSVResultWriter
,SPARQLJSONBooleanResultWriter
,SPARQLJSONSelectResultWriter
,SPARQLTSVResultWriter
,SPARQLXMLBooleanResultWriter
,SPARQLXMLSelectResultWriter
,TextBooleanQueryResultWriter
,TextPathQueryResultWriter
,TextTablePathQueryResultWriter
,TextTableQueryResultWriter
public interface QueryResultWriter<T> extends QueryResultHandler<T>
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
end()
Signal that query processing has completedQueryResultFormat
format()
Theformat
this writer will serialize output invoid
handle(T theResult)
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.
-
-
-
Method Detail
-
end
void end() throws ResultWritingFailed
Description copied from interface:QueryResultHandler
Signal that query processing has completed- Specified by:
end
in interfaceQueryResultHandler<T>
- Throws:
ResultWritingFailed
-
links
void links(@Nonnull java.util.List<java.lang.String> theLinks) throws ResultWritingFailed
Description copied from interface:QueryResultHandler
Handle the set of links from the result- Specified by:
links
in interfaceQueryResultHandler<T>
- Parameters:
theLinks
- The links- Throws:
ResultWritingFailed
- See Also:
- "link"
-
start
void start() throws ResultWritingFailed
Indicates that writing has begun.- Specified by:
start
in interfaceQueryResultHandler<T>
- Throws:
ResultWritingFailed
- if writing failed.- Implementation Requirements:
- This method can only be called once
-
handle
void handle(@Nonnull T theResult) throws ResultWritingFailed
Description copied from interface:QueryResultHandler
Handle a result to a query- Specified by:
handle
in interfaceQueryResultHandler<T>
- Parameters:
theResult
- the result- Throws:
ResultWritingFailed
-
namespace
void namespace(@Nonnull java.lang.String thePrefix, @Nonnull java.lang.String theIRI) throws ResultWritingFailed
- Throws:
ResultWritingFailed
-
format
@Nonnull QueryResultFormat format()
Theformat
this writer will serialize output in- Returns:
- the format
-
-