|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.util.xml.AbstractXMLReader org.springframework.util.xml.AbstractStaxXMLReader
abstract class AbstractStaxXMLReader
Abstract base class for SAX XMLReader
implementations that use StAX as a basis.
AbstractXMLReader.setContentHandler(org.xml.sax.ContentHandler)
,
AbstractXMLReader.setDTDHandler(org.xml.sax.DTDHandler)
,
AbstractXMLReader.setEntityResolver(org.xml.sax.EntityResolver)
,
AbstractXMLReader.setErrorHandler(org.xml.sax.ErrorHandler)
Nested Class Summary | |
---|---|
private static class |
AbstractStaxXMLReader.StaxLocator
Implementation of the Locator interface that is based on a StAX Location . |
Field Summary | |
---|---|
private static java.lang.String |
IS_STANDALONE_FEATURE_NAME
|
private java.lang.Boolean |
isStandalone
|
private static java.lang.String |
NAMESPACE_PREFIXES_FEATURE_NAME
|
private boolean |
namespacePrefixesFeature
|
private java.util.Map<java.lang.String,java.lang.String> |
namespaces
|
private static java.lang.String |
NAMESPACES_FEATURE_NAME
|
private boolean |
namespacesFeature
|
Constructor Summary | |
---|---|
AbstractStaxXMLReader()
|
Method Summary | |
---|---|
protected void |
endPrefixMapping(java.lang.String prefix)
Ends the prefix mapping for the given prefix. |
boolean |
getFeature(java.lang.String name)
Throws a SAXNotRecognizedException exception. |
protected boolean |
hasNamespacePrefixesFeature()
Indicates whether the SAX feature http://xml.org/sax/features/namespaces-prefixes is turned on. |
protected boolean |
hasNamespacesFeature()
Indicates whether the SAX feature http://xml.org/sax/features/namespaces is turned on. |
private void |
parse()
|
void |
parse(org.xml.sax.InputSource ignored)
Parse the StAX XML reader passed at construction-time. |
void |
parse(java.lang.String ignored)
Parse the StAX XML reader passed at construction-time. |
protected abstract void |
parseInternal()
Template-method that parses the StAX reader passed at construction-time. |
void |
setFeature(java.lang.String name,
boolean value)
Throws a SAXNotRecognizedException exception. |
protected void |
setStandalone(boolean standalone)
|
protected void |
startPrefixMapping(java.lang.String prefix,
java.lang.String namespace)
Starts the prefix mapping for the given prefix. |
protected java.lang.String |
toQualifiedName(javax.xml.namespace.QName qName)
Convert a QName to a qualified name, as used by DOM and SAX. |
Methods inherited from class org.springframework.util.xml.AbstractXMLReader |
---|
getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getLexicalHandler, getProperty, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String NAMESPACES_FEATURE_NAME
private static final java.lang.String NAMESPACE_PREFIXES_FEATURE_NAME
private static final java.lang.String IS_STANDALONE_FEATURE_NAME
private boolean namespacesFeature
private boolean namespacePrefixesFeature
private java.lang.Boolean isStandalone
private final java.util.Map<java.lang.String,java.lang.String> namespaces
Constructor Detail |
---|
AbstractStaxXMLReader()
Method Detail |
---|
public boolean getFeature(java.lang.String name) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
AbstractXMLReader
SAXNotRecognizedException
exception.
getFeature
in interface org.xml.sax.XMLReader
getFeature
in class AbstractXMLReader
org.xml.sax.SAXNotRecognizedException
- always
org.xml.sax.SAXNotSupportedException
public void setFeature(java.lang.String name, boolean value) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
AbstractXMLReader
SAXNotRecognizedException
exception.
setFeature
in interface org.xml.sax.XMLReader
setFeature
in class AbstractXMLReader
org.xml.sax.SAXNotRecognizedException
- always
org.xml.sax.SAXNotSupportedException
protected void setStandalone(boolean standalone)
protected boolean hasNamespacesFeature()
http://xml.org/sax/features/namespaces
is turned on.
protected boolean hasNamespacePrefixesFeature()
http://xml.org/sax/features/namespaces-prefixes
is turned on.
protected java.lang.String toQualifiedName(javax.xml.namespace.QName qName)
QName
to a qualified name, as used by DOM and SAX.
The returned string has a format of prefix:localName
if the
prefix is set, or just localName
if not.
qName
- the QName
public final void parse(org.xml.sax.InputSource ignored) throws org.xml.sax.SAXException
NOTE:: The given InputSource
is not read, but ignored.
ignored
- is ignored
org.xml.sax.SAXException
- a SAX exception, possibly wrapping a XMLStreamException
public final void parse(java.lang.String ignored) throws org.xml.sax.SAXException
NOTE:: The given system identifier is not read, but ignored.
ignored
- is ignored
org.xml.sax.SAXException
- A SAX exception, possibly wrapping a XMLStreamException
private void parse() throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected abstract void parseInternal() throws org.xml.sax.SAXException, javax.xml.stream.XMLStreamException
org.xml.sax.SAXException
javax.xml.stream.XMLStreamException
protected void startPrefixMapping(java.lang.String prefix, java.lang.String namespace) throws org.xml.sax.SAXException
org.xml.sax.SAXException
ContentHandler.startPrefixMapping(String, String)
protected void endPrefixMapping(java.lang.String prefix) throws org.xml.sax.SAXException
org.xml.sax.SAXException
ContentHandler.endPrefixMapping(String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |