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
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
Modifier and TypeMethodDescriptionformat()The format this parser can parsedefault voidparse(InputStream theStream, P theHandler) Parse the content using thedefault options.voidparse(InputStream theStream, P theHandler, Options theOptions) Parse the results.
-
Method Details
-
format
The format this parser can parse- Returns:
- the format
-
parse
Parse 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 resultsIOException- if there was an error while reading from the stream
-
parse
void parse(@Nonnull InputStream theStream, @Nonnull P theHandler, @Nonnull Options theOptions) throws IOException Parse 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 resultsIOException- if there was an error while reading from the stream
-