public class SAXUnmarshallerHandlerImpl extends Object implements SAXUnmarshallerHandler, UnmarshallingContext
UnmarshallerHandler.
This object converts SAX events into unmarshaller events and
cooridnates the entire unmarshalling process.| Constructor and Description |
|---|
SAXUnmarshallerHandlerImpl(UnmarshallerImpl _parent,
TypeRegistry _reg)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPatcher(Runnable job)
Deprecated.
Adds a job that will be executed at the last of the unmarshalling.
|
String |
addToIdTable(String id)
Deprecated.
Adds the object which is currently being unmarshalled
to the ID table.
|
void |
characters(char[] buf,
int start,
int len)
Deprecated.
|
void |
consumeAttribute(int idx)
Deprecated.
Fires an attribute event for the specified attribute.
|
protected void |
consumeText(String str,
boolean ignorable)
Deprecated.
|
void |
endDocument()
Deprecated.
|
void |
endElement(String uri,
String local,
String qname)
Deprecated.
|
void |
endPrefixMapping(String prefix)
Deprecated.
Removes a namespace declaration.
|
int |
getAttribute(String uri,
String local)
Deprecated.
Gets the index of the attribute with the specified name.
|
String |
getBaseUri()
Deprecated.
Returns the base URI of the context.
|
UnmarshallingEventHandler |
getCurrentEventHandler()
Deprecated.
Gets the current handler.
|
ContentHandlerEx |
getCurrentHandler()
Deprecated.
|
Locator |
getLocator()
Deprecated.
Gets the current source location information.
|
String |
getNamespaceURI(String prefix)
Deprecated.
|
UnmarshallableObject |
getObjectFromId(String id)
Deprecated.
Looks up the ID table and gets associated object.
|
String |
getPrefix(String uri)
Deprecated.
|
Iterator |
getPrefixes(String uri)
Deprecated.
|
Object |
getResult()
Deprecated.
|
Tracer |
getTracer()
Deprecated.
Gets a tracer object.
|
TypeRegistry |
getTypeRegistry()
Deprecated.
Obtains a reference to the current type registry.
|
Attributes |
getUnconsumedAttributes()
Deprecated.
Gets all the unconsumed attributes.
|
boolean |
handleEvent(ValidationEvent event)
Deprecated.
|
void |
ignorableWhitespace(char[] buf,
int start,
int len)
Deprecated.
|
boolean |
isNotation(String s)
Deprecated.
Checks if a notation is declared with the
specified name.
|
boolean |
isUnparsedEntity(String s)
Deprecated.
Checks if an unparsed entity is declared with the
specified name.
|
void |
popAttributes()
Deprecated.
Discards the previously stored attribute set.
|
void |
popContentHandler()
Deprecated.
Pops a content handler from the stack and registers
it as the current content handler.
|
void |
processingInstruction(String target,
String data)
Deprecated.
|
void |
pushAttributes(Attributes atts)
Deprecated.
Stores a new attribute set.
|
void |
pushContentHandler(UnmarshallingEventHandler handler,
int memento)
Deprecated.
Pushes the current content handler into the stack
and registers the newly specified content handler so
that it can receive SAX events.
|
void |
reportAndThrow(UnreportedException e)
Deprecated.
|
String |
resolveNamespacePrefix(String prefix)
Deprecated.
Resolves a namespace prefix to the corresponding namespace URI.
|
void |
setDocumentLocator(Locator loc)
Deprecated.
|
void |
setTracer(Tracer t)
Deprecated.
|
void |
skippedEntity(String name)
Deprecated.
|
void |
startDocument()
Deprecated.
|
void |
startElement(String uri,
String local,
String qName,
Attributes atts)
Deprecated.
|
void |
startPrefixMapping(String prefix,
String uri)
Deprecated.
Adds a new namespace declaration.
|
public SAXUnmarshallerHandlerImpl(UnmarshallerImpl _parent, TypeRegistry _reg)
public TypeRegistry getTypeRegistry()
UnmarshallingContextgetTypeRegistry in interface UnmarshallingContextpublic void startDocument()
throws SAXException
startDocument in interface ContentHandlerSAXExceptionpublic void endDocument()
throws SAXException
endDocument in interface ContentHandlerSAXExceptionpublic void startElement(String uri, String local, String qName, Attributes atts) throws SAXException
startElement in interface ContentHandlerSAXExceptionpublic final void endElement(String uri, String local, String qname) throws SAXException
endElement in interface ContentHandlerSAXExceptionpublic Object getResult() throws UnmarshalException
getResult in interface UnmarshallerHandlerUnmarshalExceptionpublic void pushContentHandler(UnmarshallingEventHandler handler, int memento)
UnmarshallingContextpushContentHandler in interface UnmarshallingContextmemento - When this newly specified handler will be removed from the stack,
the leaveChild event will be fired to the parent handler
with this memento.public void popContentHandler()
throws UnreportedException
UnmarshallingContextThis method will also fire the leaveChild event with the associated memento.
popContentHandler in interface UnmarshallingContextUnreportedExceptionpublic ContentHandlerEx getCurrentHandler()
UnmarshallingContextReturns the same object as the getCurrentEventHandler but in a different type.
getCurrentHandler in interface UnmarshallingContextpublic UnmarshallingEventHandler getCurrentEventHandler()
UnmarshallingContextgetCurrentEventHandler in interface UnmarshallingContextprotected void consumeText(String str, boolean ignorable) throws UnreportedException
UnreportedExceptionpublic final void characters(char[] buf,
int start,
int len)
characters in interface ContentHandlerpublic final void ignorableWhitespace(char[] buf,
int start,
int len)
ignorableWhitespace in interface ContentHandlerpublic void startPrefixMapping(String prefix, String uri)
UnmarshallingContextstartPrefixMapping in interface UnmarshallingContextstartPrefixMapping in interface ContentHandlerpublic void endPrefixMapping(String prefix)
UnmarshallingContextendPrefixMapping in interface UnmarshallingContextendPrefixMapping in interface ContentHandlerpublic String resolveNamespacePrefix(String prefix)
ValidationContextIf the prefix is "" (empty string), it indicates an unprefixed value. The callee should resolve it as for an unprefixed element, rather than for an unprefixed attribute.
If the prefix is "xml", then the callee must resolve this prefix into "http://www.w3.org/XML/1998/namespace", as defined in the XML Namespaces Recommendation.
resolveNamespacePrefix in interface ValidationContextpublic Iterator getPrefixes(String uri)
getPrefixes in interface NamespaceContextpublic String getPrefix(String uri)
getPrefix in interface NamespaceContextpublic String getNamespaceURI(String prefix)
getNamespaceURI in interface NamespaceContextpublic void pushAttributes(Attributes atts)
UnmarshallingContextpushAttributes in interface UnmarshallingContextpublic void popAttributes()
UnmarshallingContextpopAttributes in interface UnmarshallingContextpublic Attributes getUnconsumedAttributes()
UnmarshallingContextgetUnconsumedAttributes in interface UnmarshallingContextpublic int getAttribute(String uri, String local)
UnmarshallingContextgetAttribute in interface UnmarshallingContextpublic void consumeAttribute(int idx)
throws UnreportedException
UnmarshallingContextconsumeAttribute in interface UnmarshallingContextUnreportedExceptionpublic void addPatcher(Runnable job)
UnmarshallingContextaddPatcher in interface UnmarshallingContextjob - The run method of this object is called.public String addToIdTable(String id)
UnmarshallingContextaddToIdTable in interface UnmarshallingContextpublic UnmarshallableObject getObjectFromId(String id)
UnmarshallingContextgetObjectFromId in interface UnmarshallingContextpublic void skippedEntity(String name)
skippedEntity in interface ContentHandlerpublic void processingInstruction(String target, String data)
processingInstruction in interface ContentHandlerpublic void setDocumentLocator(Locator loc)
setDocumentLocator in interface ContentHandlerpublic Locator getLocator()
UnmarshallingContextgetLocator in interface UnmarshallingContextpublic boolean handleEvent(ValidationEvent event)
handleEvent in interface ValidationEventHandlerpublic void reportAndThrow(UnreportedException e) throws SAXException
SAXExceptionpublic String getBaseUri()
ValidationContextgetBaseUri in interface ValidationContextpublic boolean isUnparsedEntity(String s)
ValidationContextisUnparsedEntity in interface ValidationContextpublic boolean isNotation(String s)
ValidationContextisNotation in interface ValidationContextpublic void setTracer(Tracer t)
public Tracer getTracer()
UnmarshallingContextgetTracer in interface UnmarshallingContextCopyright © 2015 Oracle Corporation. All Rights Reserved.