public interface QueryResultParser
Modifier and Type | Method and Description |
---|---|
ParserConfig |
getParserConfig()
Retrieves the current parser configuration as a single object.
|
QueryResultFormat |
getQueryResultFormat()
Gets the query result format that this parser can parse.
|
Collection<RioSetting<?>> |
getSupportedSettings() |
void |
parseQueryResult(InputStream in)
Parse the query results out of the given
InputStream into the handler setup using
setQueryResultHandler(QueryResultHandler) . |
<T> QueryResultParser |
set(RioSetting<T> setting,
T value)
Set a setting on the parser, and return this parser object to allow chaining.
|
QueryResultParser |
setParseErrorListener(ParseErrorListener el)
Sets the ParseErrorListener that will be notified of any errors that this parser finds during parsing.
|
QueryResultParser |
setParseLocationListener(ParseLocationListener ll)
Sets the ParseLocationListener that will be notified of the parser's progress during the parse process.
|
QueryResultParser |
setParserConfig(ParserConfig config)
Sets all supplied parser configuration options.
|
QueryResultParser |
setQueryResultHandler(QueryResultHandler handler)
Sets the
QueryResultHandler to be used when parsing query results using
parseQueryResult(InputStream) . |
QueryResultParser |
setValueFactory(ValueFactory valueFactory)
Sets the ValueFactory that the parser will use to create Value objects for the parsed query result.
|
QueryResultFormat getQueryResultFormat()
QueryResultFormat
supported by this parser.QueryResultParser setQueryResultHandler(QueryResultHandler handler)
QueryResultHandler
to be used when parsing query results using
parseQueryResult(InputStream)
.handler
- The QueryResultHandler
to use for handling results.QueryResultParser setValueFactory(ValueFactory valueFactory)
valueFactory
- The value factory that the parser should use.QueryResultParser setParseErrorListener(ParseErrorListener el)
el
- The ParseErrorListener that will be notified of errors or warnings.QueryResultParser setParseLocationListener(ParseLocationListener ll)
ll
- The ParseLocationListener that will be notified of the parser's progress.void parseQueryResult(InputStream in) throws IOException, QueryResultParseException, QueryResultHandlerException
InputStream
into the handler setup using
setQueryResultHandler(QueryResultHandler)
.in
- The InputStream
to parse the results from.IOException
- If there is an exception from the InputStream.QueryResultParseException
- If the query results are not parsable by this parser.QueryResultHandlerException
- If the QueryResultHandler
set in
setQueryResultHandler(QueryResultHandler)
throws an exception.QueryResultParser setParserConfig(ParserConfig config)
config
- a parser configuration object.ParserConfig getParserConfig()
Collection<RioSetting<?>> getSupportedSettings()
RioSetting
s that are supported by this QueryResultParser.<T> QueryResultParser set(RioSetting<T> setting, T value)
setting
- The setting to change.value
- The value to change.Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.