com.sun.xml.bind.unmarshaller
Interface UnmarshallingContext

All Superinterfaces:
org.xml.sax.ContentHandler, javax.xml.namespace.NamespaceContext, org.relaxng.datatype.ValidationContext, javax.xml.bind.ValidationEventHandler
All Known Implementing Classes:
SAXUnmarshallerHandlerImpl

Deprecated. in JAXB1.0.1

public interface UnmarshallingContext
extends org.relaxng.datatype.ValidationContext, org.xml.sax.ContentHandler, javax.xml.namespace.NamespaceContext, javax.xml.bind.ValidationEventHandler

Methods exposed by the unmarshalling coordinator object to the generated code. This interface will be implemented by the coordinator, which converts whatever events (e.g., SAX) into unmarshalling events.

Errors detected by the ContentHandlerEx-derived classes should be either thrown as UnrepotedException or reported through the handleEvent method of this interface.

Since:
JAXB1.0

Method Summary
 void addPatcher(java.lang.Runnable job)
          Deprecated. Adds a job that will be executed at the last of the unmarshalling.
 java.lang.String addToIdTable(java.lang.String id)
          Deprecated. Adds the object which is currently being unmarshalled to the ID table.
 void consumeAttribute(int idx)
          Deprecated. Fires an attribute event for the specified attribute.
 void endPrefixMapping(java.lang.String prefix)
          Deprecated. Removes a namespace declaration.
 int getAttribute(java.lang.String uri, java.lang.String name)
          Deprecated. Gets the index of the attribute with the specified name.
 UnmarshallingEventHandler getCurrentEventHandler()
          Deprecated. Gets the current handler.
 ContentHandlerEx getCurrentHandler()
          Deprecated. Ue the getCurentEventHandler method.
 org.xml.sax.Locator getLocator()
          Deprecated. Gets the current source location information.
 UnmarshallableObject getObjectFromId(java.lang.String id)
          Deprecated. Looks up the ID table and gets associated object.
 Tracer getTracer()
          Deprecated. Gets a tracer object.
 TypeRegistry getTypeRegistry()
          Deprecated. Obtains a reference to the current type registry.
 org.xml.sax.Attributes getUnconsumedAttributes()
          Deprecated. Gets all the unconsumed attributes.
 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 pushAttributes(org.xml.sax.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 startPrefixMapping(java.lang.String prefix, java.lang.String namespaceUri)
          Deprecated. Adds a new namespace declaration.
 
Methods inherited from interface org.relaxng.datatype.ValidationContext
getBaseUri, isNotation, isUnparsedEntity, resolveNamespacePrefix
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endDocument, endElement, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement
 
Methods inherited from interface javax.xml.namespace.NamespaceContext
getNamespaceURI, getPrefix, getPrefixes
 
Methods inherited from interface javax.xml.bind.ValidationEventHandler
handleEvent
 

Method Detail

getTypeRegistry

TypeRegistry getTypeRegistry()
Deprecated. 
Obtains a reference to the current type registry.


pushContentHandler

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.

Parameters:
memento - When this newly specified handler will be removed from the stack, the leaveChild event will be fired to the parent handler with this memento.

popContentHandler

void popContentHandler()
                       throws UnreportedException
Deprecated. 
Pops a content handler from the stack and registers it as the current content handler.

This method will also fire the leaveChild event with the associated memento.

Throws:
UnreportedException

getCurrentHandler

ContentHandlerEx getCurrentHandler()
Deprecated. Ue the getCurentEventHandler method.

Gets the current handler.

Returns the same object as the getCurrentEventHandler but in a different type.


getCurrentEventHandler

UnmarshallingEventHandler getCurrentEventHandler()
Deprecated. 
Gets the current handler.


startPrefixMapping

void startPrefixMapping(java.lang.String prefix,
                        java.lang.String namespaceUri)
Deprecated. 
Adds a new namespace declaration. This method should be called by the generated code.

Specified by:
startPrefixMapping in interface org.xml.sax.ContentHandler

endPrefixMapping

void endPrefixMapping(java.lang.String prefix)
Deprecated. 
Removes a namespace declaration. This method should be called by the generated code.

Specified by:
endPrefixMapping in interface org.xml.sax.ContentHandler

pushAttributes

void pushAttributes(org.xml.sax.Attributes atts)
Deprecated. 
Stores a new attribute set. This method should be called by the generated code when it "eats" an enterElement event.


popAttributes

void popAttributes()
Deprecated. 
Discards the previously stored attribute set. This method should be called by the generated code when it "eats" a leaveElement event.


getAttribute

int getAttribute(java.lang.String uri,
                 java.lang.String name)
Deprecated. 
Gets the index of the attribute with the specified name. This is usually faster when you only need to test with a simple name.

Returns:
-1 if not found.

getUnconsumedAttributes

org.xml.sax.Attributes getUnconsumedAttributes()
Deprecated. 
Gets all the unconsumed attributes. If you need to find attributes based on more complex filter, you need to use this method.


consumeAttribute

void consumeAttribute(int idx)
                      throws UnreportedException
Deprecated. 
Fires an attribute event for the specified attribute.

Throws:
UnreportedException

addPatcher

void addPatcher(java.lang.Runnable job)
Deprecated. 
Adds a job that will be executed at the last of the unmarshalling. This method is used to support ID/IDREF feature, but it can be used for other purposes as well.

Parameters:
job - The run method of this object is called.

addToIdTable

java.lang.String addToIdTable(java.lang.String id)
Deprecated. 
Adds the object which is currently being unmarshalled to the ID table.

Returns:
Returns the value passed as the parameter. This is a hack, but this makes it easier for ID transducer to do its job.

getObjectFromId

UnmarshallableObject getObjectFromId(java.lang.String id)
Deprecated. 
Looks up the ID table and gets associated object.

Returns:
If there is no object associated with the given id, this method returns null.

getLocator

org.xml.sax.Locator getLocator()
Deprecated. 
Gets the current source location information.


getTracer

Tracer getTracer()
Deprecated. 
Gets a tracer object. Tracer can be used to trace the unmarshalling behavior. Note that to debug the unmarshalling process, you have to configure XJC so that it will emit trace codes in the unmarshaller.