public abstract class AbstractTupleQueryResultParser extends AbstractQueryResultParser implements TupleQueryResultParser
TupleQueryResultParser
s offering common functionality for query result parsers.handler, valueFactory
Modifier | Constructor and Description |
---|---|
protected |
AbstractTupleQueryResultParser()
Creates a new parser base that, by default, will use an instance of
SimpleValueFactory to create Value
objects. |
protected |
AbstractTupleQueryResultParser(ValueFactory valueFactory)
Creates a new parser base that will use the supplied
ValueFactory to create Value objects. |
Modifier and Type | Method and Description |
---|---|
QueryResultFormat |
getQueryResultFormat()
Gets the query result format that this parser can parse.
|
void |
parseQueryResult(InputStream in)
Parse the query results out of the given
InputStream into the handler setup using
QueryResultParser.setQueryResultHandler(QueryResultHandler) . |
void |
setTupleQueryResultHandler(TupleQueryResultHandler handler)
Sets the TupleQueryResultHandler that will handle the parsed query result data.
|
getParseErrorListener, getParseLocationListener, getParserConfig, getSupportedSettings, set, setParseErrorListener, setParseLocationListener, setParserConfig, setQueryResultHandler, setValueFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTupleQueryResultFormat, parse
getParserConfig, getSupportedSettings, set, setParseErrorListener, setParseLocationListener, setParserConfig, setQueryResultHandler, setValueFactory
protected AbstractTupleQueryResultParser()
SimpleValueFactory
to create Value
objects.protected AbstractTupleQueryResultParser(ValueFactory valueFactory)
ValueFactory
to create Value
objects.public QueryResultFormat getQueryResultFormat()
QueryResultParser
getQueryResultFormat
in interface QueryResultParser
QueryResultFormat
supported by this parser.public void parseQueryResult(InputStream in) throws IOException, QueryResultParseException, QueryResultHandlerException
QueryResultParser
InputStream
into the handler setup using
QueryResultParser.setQueryResultHandler(QueryResultHandler)
.parseQueryResult
in interface QueryResultParser
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
QueryResultParser.setQueryResultHandler(QueryResultHandler)
throws an exception.public void setTupleQueryResultHandler(TupleQueryResultHandler handler)
TupleQueryResultParser
setTupleQueryResultHandler
in interface TupleQueryResultParser
Copyright © 2015-2019 Eclipse Foundation. All Rights Reserved.