|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.ispsoft.jaxme.ObservedHandlerImpl de.ispsoft.jaxme.JMContentHandler
A SAX ContentHandler that reads an XML document. The implementation works as follows: The JMContentHandler can operate as an "outer" ContentHandler which manages a stack of other JMContentHandlers, the "inner" ContentHandlers. Most of these "inner" ContentHandlers are passive (that is, they remain on the stack, doing nothing), with the exception of the innermost ContentHandler who is active and reading a single element.
If the innermost ContentHandler encounters any child elements, it will make itself passive by pushing a new JMContentHandler on the stack which reads the innermost element. Likewise, if the innermost ContentHandler has read its element, it will pop itself from the stack, making the next ContentHandler active.
Field Summary | |
protected ObservedHandler |
currentContentHandler
|
protected java.lang.String |
currentContext
|
protected JMAnyElement |
currentElement
|
Fields inherited from class de.ispsoft.jaxme.ObservedHandlerImpl |
context, level, locator, observer, resultCollection, resultNode |
Constructor Summary | |
JMContentHandler()
Creates a new instance of JMContentHandler |
Method Summary | |
void |
characters(char[] pChars,
int pStart,
int pLen)
|
void |
endElement(java.lang.String pNamespaceURI,
java.lang.String pLocalName,
java.lang.String pQName)
|
void |
endPrefixMapping(java.lang.String pPrefix)
|
boolean |
getAddWhitespace()
Returns whether trailing or prepending whitespace should be added as an unknown child. |
UnmarshallerImpl |
getUnmarshaller()
|
void |
ignorableWhitespace(char[] pChars,
int pStart,
int pLen)
|
protected ObservedHandler |
newContentHandler(java.lang.String pNamespaceURI,
java.lang.String pLocalName)
|
protected JMAnyElement |
newResultNode(java.lang.String pNamespaceURI,
java.lang.String pLocalName)
|
void |
processingInstruction(java.lang.String pTarget,
java.lang.String pData)
|
protected void |
processResultNode(ObservedHandler pHandler)
|
void |
setAddWhitespace(boolean pAddWhitespace)
Sets whether trailing or prepending whitespace should be added as an unknown child. |
void |
setDocumentLocator(org.xml.sax.Locator pLocator)
Sets a document locator. |
void |
setUnmarshaller(UnmarshallerImpl pUnmarshaller)
|
void |
skippedEntity(java.lang.String pEntity)
|
void |
startDocument()
This method is for resetting the ObservedHandlerImpl. |
void |
startElement(java.lang.String pNamespaceURI,
java.lang.String pLocalName,
java.lang.String pQName,
org.xml.sax.Attributes pAttr)
|
void |
startPrefixMapping(java.lang.String pPrefix,
java.lang.String pNamespaceURI)
|
Methods inherited from class de.ispsoft.jaxme.ObservedHandlerImpl |
addResultNode, endDocument, getContext, getContext, getObserver, getResultCollection, getResultNode, getSAXException, getSAXException, setContext, setObserver, setResultCollection |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected JMAnyElement currentElement
protected ObservedHandler currentContentHandler
protected java.lang.String currentContext
Constructor Detail |
public JMContentHandler()
Method Detail |
protected JMAnyElement newResultNode(java.lang.String pNamespaceURI, java.lang.String pLocalName) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected ObservedHandler newContentHandler(java.lang.String pNamespaceURI, java.lang.String pLocalName) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void processResultNode(ObservedHandler pHandler) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void startDocument() throws org.xml.sax.SAXException
ObservedHandlerImpl
This method is for resetting the ObservedHandlerImpl.
Concrete subclasses should call this from within their
own startDocument()
methods.
startDocument
in interface org.xml.sax.ContentHandler
startDocument
in class ObservedHandlerImpl
org.xml.sax.SAXException
public void startElement(java.lang.String pNamespaceURI, java.lang.String pLocalName, java.lang.String pQName, org.xml.sax.Attributes pAttr) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void endElement(java.lang.String pNamespaceURI, java.lang.String pLocalName, java.lang.String pQName) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void ignorableWhitespace(char[] pChars, int pStart, int pLen) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void skippedEntity(java.lang.String pEntity) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void processingInstruction(java.lang.String pTarget, java.lang.String pData) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void endPrefixMapping(java.lang.String pPrefix) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void startPrefixMapping(java.lang.String pPrefix, java.lang.String pNamespaceURI) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void characters(char[] pChars, int pStart, int pLen) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void setDocumentLocator(org.xml.sax.Locator pLocator)
ObservedHandlerImpl
Sets a document locator.
setDocumentLocator
in interface org.xml.sax.ContentHandler
setDocumentLocator
in class ObservedHandlerImpl
public void setUnmarshaller(UnmarshallerImpl pUnmarshaller)
public UnmarshallerImpl getUnmarshaller()
public void setAddWhitespace(boolean pAddWhitespace)
Sets whether trailing or prepending whitespace should be added as an unknown child. Defaults to false.
public boolean getAddWhitespace()
Returns whether trailing or prepending whitespace should be added as an unknown child. Defaults to false.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |