Class AbstractSPARQLXMLParser
- java.lang.Object
-
- org.eclipse.rdf4j.query.resultio.AbstractQueryResultParser
-
- org.eclipse.rdf4j.query.resultio.sparqlxml.AbstractSPARQLXMLParser
-
- All Implemented Interfaces:
QueryResultParser,ErrorHandler
- Direct Known Subclasses:
SPARQLBooleanXMLParser,SPARQLResultsXMLParser
public abstract class AbstractSPARQLXMLParser extends AbstractQueryResultParser implements ErrorHandler
Abstract base class for SPARQL Results XML Parsers.- Author:
- Peter Ansell
-
-
Field Summary
-
Fields inherited from class org.eclipse.rdf4j.query.resultio.AbstractQueryResultParser
handler, valueFactory
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractSPARQLXMLParser()protectedAbstractSPARQLXMLParser(org.eclipse.rdf4j.model.ValueFactory valueFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiderror(SAXParseException exception)voidfatalError(SAXParseException exception)Collection<org.eclipse.rdf4j.rio.RioSetting<Boolean>>getCompulsoryXmlFeatureSettings()Returns a collection of settings that will always be set as XML parser features usingXMLReader.setFeature(String, boolean).Collection<org.eclipse.rdf4j.rio.RioSetting<?>>getCompulsoryXmlPropertySettings()Returns a collection of settings that will always be set as XML parser properties usingXMLReader.setProperty(String, Object)Collection<org.eclipse.rdf4j.rio.RioSetting<Boolean>>getOptionalXmlFeatureSettings()Returns a collection of settings that will be used, if set inAbstractQueryResultParser.getParserConfig(), as XML parser features usingXMLReader.setFeature(String, boolean).Collection<org.eclipse.rdf4j.rio.RioSetting<?>>getOptionalXmlPropertySettings()Returns a collection of settings that will be used, if set inAbstractQueryResultParser.getParserConfig(), as XML parser properties usingXMLReader.setProperty(String, Object)Collection<org.eclipse.rdf4j.rio.RioSetting<?>>getSupportedSettings()voidparseQueryResult(InputStream in)protected booleanparseQueryResultInternal(InputStream in, boolean attemptParseBoolean, boolean attemptParseTuple)protected voidreportWarning(String msg)voidwarning(SAXParseException exception)-
Methods inherited from class org.eclipse.rdf4j.query.resultio.AbstractQueryResultParser
getParseErrorListener, getParseLocationListener, getParserConfig, set, setParseErrorListener, setParseLocationListener, setParserConfig, setQueryResultHandler, setValueFactory
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.rdf4j.query.resultio.QueryResultParser
getQueryResultFormat
-
-
-
-
Method Detail
-
parseQueryResult
public void parseQueryResult(InputStream in) throws IOException, QueryResultParseException, QueryResultHandlerException
- Specified by:
parseQueryResultin interfaceQueryResultParser- Throws:
IOExceptionQueryResultParseExceptionQueryResultHandlerException
-
parseQueryResultInternal
protected boolean parseQueryResultInternal(InputStream in, boolean attemptParseBoolean, boolean attemptParseTuple) throws IOException, QueryResultParseException, QueryResultHandlerException
-
reportWarning
protected void reportWarning(String msg)
-
getCompulsoryXmlPropertySettings
public Collection<org.eclipse.rdf4j.rio.RioSetting<?>> getCompulsoryXmlPropertySettings()
Returns a collection of settings that will always be set as XML parser properties usingXMLReader.setProperty(String, Object)Subclasses can override this to specify more supported settings.
- Returns:
- A collection of
RioSettings that indicate which properties will always be setup usingXMLReader.setProperty(String, Object).
-
getCompulsoryXmlFeatureSettings
public Collection<org.eclipse.rdf4j.rio.RioSetting<Boolean>> getCompulsoryXmlFeatureSettings()
Returns a collection of settings that will always be set as XML parser features usingXMLReader.setFeature(String, boolean).Subclasses can override this to specify more supported settings.
- Returns:
- A collection of
RioSettings that indicate which boolean settings will always be setup usingXMLReader.setFeature(String, boolean).
-
getOptionalXmlPropertySettings
public Collection<org.eclipse.rdf4j.rio.RioSetting<?>> getOptionalXmlPropertySettings()
Returns a collection of settings that will be used, if set inAbstractQueryResultParser.getParserConfig(), as XML parser properties usingXMLReader.setProperty(String, Object)Subclasses can override this to specify more supported settings.
- Returns:
- A collection of
RioSettings that indicate which properties can be setup usingXMLReader.setProperty(String, Object).
-
getOptionalXmlFeatureSettings
public Collection<org.eclipse.rdf4j.rio.RioSetting<Boolean>> getOptionalXmlFeatureSettings()
Returns a collection of settings that will be used, if set inAbstractQueryResultParser.getParserConfig(), as XML parser features usingXMLReader.setFeature(String, boolean).Subclasses can override this to specify more supported settings.
- Returns:
- A collection of
RioSettings that indicate which boolean settings can be setup usingXMLReader.setFeature(String, boolean).
-
getSupportedSettings
public Collection<org.eclipse.rdf4j.rio.RioSetting<?>> getSupportedSettings()
- Specified by:
getSupportedSettingsin interfaceQueryResultParser- Overrides:
getSupportedSettingsin classAbstractQueryResultParser
-
warning
public void warning(SAXParseException exception) throws SAXException
- Specified by:
warningin interfaceErrorHandler- Throws:
SAXException
-
error
public void error(SAXParseException exception) throws SAXException
- Specified by:
errorin interfaceErrorHandler- Throws:
SAXException
-
fatalError
public void fatalError(SAXParseException exception) throws SAXException
- Specified by:
fatalErrorin interfaceErrorHandler- Throws:
SAXException
-
-