public abstract class AbstractQueryResultParser extends Object implements QueryResultParser
QueryResultParser
s offering common functionality for query result parsers.Modifier and Type | Field and Description |
---|---|
protected QueryResultHandler |
handler
The
QueryResultHandler that will handle the parsed query results. |
protected ValueFactory |
valueFactory
The
ValueFactory to use for creating RDF model objects. |
Modifier | Constructor and Description |
---|---|
protected |
AbstractQueryResultParser()
Creates a new parser base that, by default, will use the global instance of
SimpleValueFactory to create
Value objects. |
protected |
AbstractQueryResultParser(ValueFactory valueFactory)
Creates a new parser base that will use the supplied ValueFactory to create Value objects.
|
Modifier and Type | Method and Description |
---|---|
ParseErrorListener |
getParseErrorListener() |
ParseLocationListener |
getParseLocationListener() |
ParserConfig |
getParserConfig()
Retrieves the current parser configuration as a single object.
|
Collection<RioSetting<?>> |
getSupportedSettings() |
<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 el)
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
QueryResultParser.parseQueryResult(InputStream) . |
QueryResultParser |
setValueFactory(ValueFactory valueFactory)
Sets the ValueFactory that the parser will use to create Value objects for the parsed query result.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getQueryResultFormat, parseQueryResult
protected ValueFactory valueFactory
ValueFactory
to use for creating RDF model objects.protected QueryResultHandler handler
QueryResultHandler
that will handle the parsed query results.protected AbstractQueryResultParser()
SimpleValueFactory
to create
Value objects.protected AbstractQueryResultParser(ValueFactory valueFactory)
public QueryResultParser setValueFactory(ValueFactory valueFactory)
QueryResultParser
setValueFactory
in interface QueryResultParser
valueFactory
- The value factory that the parser should use.public QueryResultParser setQueryResultHandler(QueryResultHandler handler)
QueryResultParser
QueryResultHandler
to be used when parsing query results using
QueryResultParser.parseQueryResult(InputStream)
.setQueryResultHandler
in interface QueryResultParser
handler
- The QueryResultHandler
to use for handling results.public QueryResultParser setParserConfig(ParserConfig config)
QueryResultParser
setParserConfig
in interface QueryResultParser
config
- a parser configuration object.public ParserConfig getParserConfig()
QueryResultParser
getParserConfig
in interface QueryResultParser
public QueryResultParser setParseErrorListener(ParseErrorListener el)
QueryResultParser
setParseErrorListener
in interface QueryResultParser
el
- The ParseErrorListener that will be notified of errors or warnings.public ParseErrorListener getParseErrorListener()
public QueryResultParser setParseLocationListener(ParseLocationListener el)
QueryResultParser
setParseLocationListener
in interface QueryResultParser
el
- The ParseLocationListener that will be notified of the parser's progress.public ParseLocationListener getParseLocationListener()
public Collection<RioSetting<?>> getSupportedSettings()
getSupportedSettings
in interface QueryResultParser
RioSetting
s that are supported by this QueryResultParser.public <T> QueryResultParser set(RioSetting<T> setting, T value)
QueryResultParser
set
in interface QueryResultParser
setting
- The setting to change.value
- The value to change.Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.