Package com.stardog.stark.query.io
Interface QueryResultParser<P extends QueryResultHandler>
-
- All Known Subinterfaces:
BooleanQueryResultParser,SelectQueryResultParser
- All Known Implementing Classes:
BinarySelectQueryResultParser,SPARQLCSVResultParser,SPARQLJSONBooleanResultParser,SPARQLJSONSelectResultParser,SPARQLTSVResultParser,SPARQLXMLBooleanResultParser,SPARQLXMLSelectResultParser,TextBooleanQueryResultParser
@ThreadSafe public interface QueryResultParser<P extends QueryResultHandler>Parser for serialized
query results- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
- Implementation Requirements:
- Implementations of this interface should include a zero argument constructor so that they can be created
by the
ServiceLoader. They are also expected to be *thread safe*;
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description QueryResultFormatformat()The format this parser can parsedefault voidparse(java.io.InputStream theStream, P theHandler)Parse the content using thedefault options.voidparse(java.io.InputStream theStream, P theHandler, Options theOptions)Parse the results.
-
-
-
Method Detail
-
format
@Nonnull QueryResultFormat format()
The format this parser can parse- Returns:
- the format
-
parse
default void parse(@Nonnull java.io.InputStream theStream, @Nonnull P theHandler) throws java.io.IOExceptionParse the content using thedefault options.- Parameters:
theStream- the stream to read fromtheHandler- the handler to pass parse events to- Throws:
InvalidQueryResults- if there was an error while parsing the resultsjava.io.IOException- if there was an error while reading from the stream
-
parse
void parse(@Nonnull java.io.InputStream theStream, @Nonnull P theHandler, @Nonnull Options theOptions) throws java.io.IOExceptionParse the results.- Parameters:
theStream- the stream to read fromtheHandler- the handler to pass parse events totheOptions- the parsing options- Throws:
InvalidQueryResults- if there was an error while parsing the resultsjava.io.IOException- if there was an error while reading from the stream
-
-