|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.helpers.DefaultHandler com.openharbor.beck.sax.DefaultSAXContentHandler
Handles XML data from a SAX2 event stream.
Field Summary | |
protected org.apache.commons.logging.Log |
log
|
protected MapFromXML |
mapper
|
protected org.xml.sax.helpers.NamespaceSupport |
namespaces
|
protected boolean |
needNamespaceContext
|
Constructor Summary | |
DefaultSAXContentHandler()
|
Method Summary | |
void |
characters(char[] ch,
int start,
int length)
Add text content to current object. |
protected void |
clear()
Release all resources and subsequently behave as though newly returned from MapFromXML.newContentHandler. |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
Process end of element. |
java.lang.String |
getBaseURI()
The base URI to be used when resolving an external reference or reporting an error. |
org.xml.sax.EntityResolver |
getEntityResolver()
The current algorithm for resolving external references. |
MapFromXML |
getMapFromXML()
|
protected XMLReceiver |
getReceiver()
|
java.lang.Object |
getResult()
|
static java.util.Map |
newAttributeMap(org.xml.sax.Attributes attrs)
|
java.lang.Object |
removeResult()
Get the Java object that was copied from the XML document and also release all resources and subsequently behave as though newly returned from MapFromXML.newContentHandler. |
XMLName |
resolveNamespace(java.lang.String qname,
boolean isAttribute)
Resolve an XML name to its namespace URI and local part. |
void |
setBaseURI(java.lang.String uri)
|
void |
setEntityResolver(org.xml.sax.EntityResolver e)
|
void |
setMapFromXML(MapFromXML mapper)
|
protected void |
setReceiver(XMLReceiver receiver)
|
void |
startDocument()
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String raw,
org.xml.sax.Attributes attrs)
Start element. |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
|
protected void |
throwSAXException(java.lang.String message,
java.lang.Exception e)
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xml.sax.ContentHandler |
endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity |
Field Detail |
protected final org.apache.commons.logging.Log log
protected MapFromXML mapper
protected org.xml.sax.helpers.NamespaceSupport namespaces
protected boolean needNamespaceContext
Constructor Detail |
public DefaultSAXContentHandler()
Method Detail |
public void setMapFromXML(MapFromXML mapper)
setMapFromXML
in interface MapFromXML.Aware
public MapFromXML getMapFromXML()
getMapFromXML
in interface MapFromXML.Aware
protected void setReceiver(XMLReceiver receiver)
protected XMLReceiver getReceiver()
public void setBaseURI(java.lang.String uri)
setBaseURI
in interface SAXContentHandler
public java.lang.String getBaseURI()
XMLContext
getBaseURI
in interface XMLContext
public void setEntityResolver(org.xml.sax.EntityResolver e)
setEntityResolver
in interface SAXContentHandler
public org.xml.sax.EntityResolver getEntityResolver()
XMLContext
getEntityResolver
in interface XMLContext
protected void clear()
public XMLName resolveNamespace(java.lang.String qname, boolean isAttribute) throws UnknownNamespaceException
XMLContext
resolveNamespace
in interface XMLContext
qname
- an XML local name or qualified name (of the form prefix:localPart).isAttribute
- whether this is the name of an XML attribute.
The resolution algorithm for an attribute name
is slightly different than for an element name.
UnknownNamespaceException
- the qname's prefix has not been defined
(by an xmlns:prefix declaration).public java.lang.Object getResult()
getResult
in interface SAXContentHandler
public java.lang.Object removeResult()
SAXContentHandler
removeResult
in interface SAXContentHandler
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws org.xml.sax.SAXException
startPrefixMapping
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public static java.util.Map newAttributeMap(org.xml.sax.Attributes attrs)
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String raw, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
protected void throwSAXException(java.lang.String message, java.lang.Exception e) throws org.xml.sax.SAXException
org.xml.sax.SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |