Package org.eclipse.rdf4j.rio.helpers
Class XMLReaderBasedParser
- java.lang.Object
-
- org.eclipse.rdf4j.rio.helpers.AbstractRDFParser
-
- org.eclipse.rdf4j.rio.helpers.XMLReaderBasedParser
-
- All Implemented Interfaces:
RDFParser
- Direct Known Subclasses:
RDFXMLParser
,TriXParser
public abstract class XMLReaderBasedParser extends AbstractRDFParser
Base class for Rio parsers that are based on a SAXXMLReader
.- Author:
- Jeen Broekstra
-
-
Field Summary
-
Fields inherited from class org.eclipse.rdf4j.rio.helpers.AbstractRDFParser
rdfHandler, valueFactory
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
XMLReaderBasedParser(ValueFactory f)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<RioSetting<Boolean>>
getCompulsoryXmlFeatureSettings()
Returns a collection of settings that will always be set as XML parser features usingXMLReader.setFeature(String, boolean)
.Collection<RioSetting<?>>
getCompulsoryXmlPropertySettings()
Returns a collection of settings that will always be set as XML parser properties usingXMLReader.setProperty(String, Object)
Collection<RioSetting<Boolean>>
getOptionalXmlFeatureSettings()
Returns a collection of settings that will be used, if set inAbstractRDFParser.getParserConfig()
, as XML parser features usingXMLReader.setFeature(String, boolean)
.Collection<RioSetting<?>>
getOptionalXmlPropertySettings()
Returns a collection of settings that will be used, if set inAbstractRDFParser.getParserConfig()
, as XML parser properties usingXMLReader.setProperty(String, Object)
protected XMLReader
getXMLReader()
Creates an XML Reader configured using the current parser settings.-
Methods inherited from class org.eclipse.rdf4j.rio.helpers.AbstractRDFParser
clear, clearBNodeIDMap, createBNode, createBNode, createLiteral, createLiteral, createNode, createNode, createStatement, createStatement, createURI, getNamespace, getParseErrorListener, getParseLocationListener, getParserConfig, getRDFHandler, getSupportedSettings, initializeNamespaceTableFromConfiguration, preserveBNodeIDs, reportError, reportError, reportError, reportError, reportError, reportFatalError, reportFatalError, reportFatalError, reportFatalError, reportFatalError, reportLocation, reportWarning, reportWarning, resolveURI, set, setBaseURI, setBaseURI, setNamespace, setParseErrorListener, setParseLocationListener, setParserConfig, setPreserveBNodeIDs, setRDFHandler, setValueFactory
-
-
-
-
Constructor Detail
-
XMLReaderBasedParser
protected XMLReaderBasedParser(ValueFactory f)
-
-
Method Detail
-
getCompulsoryXmlPropertySettings
public Collection<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
RioSetting
s that indicate which properties will always be setup usingXMLReader.setProperty(String, Object)
.
-
getCompulsoryXmlFeatureSettings
public Collection<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
RioSetting
s that indicate which boolean settings will always be setup usingXMLReader.setFeature(String, boolean)
.
-
getOptionalXmlPropertySettings
public Collection<RioSetting<?>> getOptionalXmlPropertySettings()
Returns a collection of settings that will be used, if set inAbstractRDFParser.getParserConfig()
, as XML parser properties usingXMLReader.setProperty(String, Object)
Subclasses can override this to specify more supported settings.
- Returns:
- A collection of
RioSetting
s that indicate which properties can be setup usingXMLReader.setProperty(String, Object)
.
-
getOptionalXmlFeatureSettings
public Collection<RioSetting<Boolean>> getOptionalXmlFeatureSettings()
Returns a collection of settings that will be used, if set inAbstractRDFParser.getParserConfig()
, as XML parser features usingXMLReader.setFeature(String, boolean)
.Subclasses can override this to specify more supported settings.
- Returns:
- A collection of
RioSetting
s that indicate which boolean settings can be setup usingXMLReader.setFeature(String, boolean)
.
-
getXMLReader
protected XMLReader getXMLReader() throws SAXException
Creates an XML Reader configured using the current parser settings.- Returns:
- a configured
XMLReader
- Throws:
SAXException
- if an error occurs during configuration.
-
-