Implementation of a JMUnmarshallerHandler; the
UnmarshallerHandler receives SAX events which he silently
discards, as long as the first startElement
event is seen. Depending on namespace URI and local name,
the Unmarshallerhandler creates a new instance of JMHandler
and from now on forwards all SAX events to the JMHandler.
addElementParser
public void addElementParser(JMSAXElementParser pParser)
Adds a parser for an nested element to the stack of parsers.
addSimpleAtomicState
public void addSimpleAtomicState()
Indicates, that the handler is parsing a simple, atomic element.
characters
public void characters(char[] pChars,
int pOffset,
int pLen)
throws SAXException
endDocument
public void endDocument()
throws SAXException
endElement
public void endElement(String pNamespaceURI,
String pLocalName,
String pQName)
throws SAXException
endPrefixMapping
public void endPrefixMapping(String pPrefix)
throws SAXException
getDocumentLocator
public Locator getDocumentLocator()
Returns an instance of Locator
, if it has
been set, or null.
- getDocumentLocator in interface JMUnmarshallerHandler
org.xml.sax.ContentHandler.setDocumentLocator(org.xml.sax.Locator)
getResult
public Object getResult()
throws JAXBException,
IllegalStateException
Returns the unmarshalled object. This method may be invoked
after an endDocument()
event only. An
IllegalStateException
is thrown otherwise.
- getResult in interface UnmarshallerHandler
- The unmarshalled object, never null. (An
IllegalStateException
is thrown, if no data is
available.
JAXBException
- An error occurred. Note, that the
UnmarshallerHandler
throws a
org.xml.sax.SAXException
if an error occurs while
unmarshalling the object. In such cases the
JAXBException
is typically nested within the
org.xml.sax.SAXException
.
ignorableWhitespace
public void ignorableWhitespace(char[] pChars,
int pStart,
int pLen)
throws SAXException
parseConversionEvent
public void parseConversionEvent(String pMsg,
Exception pException)
throws SAXException
processingInstruction
public void processingInstruction(String pTarget,
String pData)
throws SAXException
setDocumentLocator
public void setDocumentLocator(Locator pLocator)
skippedEntity
public void skippedEntity(String pName)
throws SAXException
startDocument
public void startDocument()
throws SAXException
startElement
public void startElement(String pNamespaceURI,
String pLocalName,
String pQName,
Attributes pAttrs)
throws SAXException
startPrefixMapping
public void startPrefixMapping(String pPrefix,
String pURI)
throws SAXException
testGroupParser
public boolean testGroupParser(JMSAXGroupParser pParser,
String pNamespaceURI,
String pLocalName,
String pQName,
Attributes pAttrs)
throws SAXException
Tests, whether the group parser accepts the element.
If so, adds the group parser to the stack.
validationEvent
public void validationEvent(int pSeverity,
String pMsg,
String pErrorCode,
Exception pException)
throws SAXException