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 voidend()Signal that query processing has completedQueryResultFormatformat()Theformatthis writer will serialize output invoidhandle(T theResult)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.
-
-
-
Method Detail
-
end
void end() throws ResultWritingFailed
Description copied from interface:QueryResultHandlerSignal that query processing has completed- Specified by:
endin interfaceQueryResultHandler<T>- Throws:
ResultWritingFailed
-
links
void links(@Nonnull java.util.List<java.lang.String> theLinks) throws ResultWritingFailedDescription copied from interface:QueryResultHandlerHandle the set of links from the result- Specified by:
linksin interfaceQueryResultHandler<T>- Parameters:
theLinks- The links- Throws:
ResultWritingFailed- See Also:
- "link"
-
start
void start() throws ResultWritingFailedIndicates that writing has begun.- Specified by:
startin interfaceQueryResultHandler<T>- Throws:
ResultWritingFailed- if writing failed.- Implementation Requirements:
- This method can only be called once
-
handle
void handle(@Nonnull T theResult) throws ResultWritingFailedDescription copied from interface:QueryResultHandlerHandle a result to a query- Specified by:
handlein 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()
Theformatthis writer will serialize output in- Returns:
- the format
-
-