com.sun.xml.bind.unmarshaller
Class SAXUnmarshallerHandlerImpl

java.lang.Object
  extended by com.sun.xml.bind.unmarshaller.SAXUnmarshallerHandlerImpl
All Implemented Interfaces:
SAXUnmarshallerHandler, UnmarshallingContext, javax.xml.bind.UnmarshallerHandler, javax.xml.bind.ValidationEventHandler, javax.xml.namespace.NamespaceContext, org.relaxng.datatype.ValidationContext, org.xml.sax.ContentHandler

Deprecated. in JAXB1.0.1

public class SAXUnmarshallerHandlerImpl
extends java.lang.Object
implements SAXUnmarshallerHandler, UnmarshallingContext

Implementation of UnmarshallerHandler. This object converts SAX events into unmarshaller events and cooridnates the entire unmarshalling process.

Since:
JAXB1.0

Constructor Summary
SAXUnmarshallerHandlerImpl(UnmarshallerImpl _parent, TypeRegistry _reg)
          Deprecated.  
 
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 characters(char[] buf, int start, int len)
          Deprecated.  
 void consumeAttribute(int idx)
          Deprecated. Fires an attribute event for the specified attribute.
protected  void consumeText(java.lang.String str, boolean ignorable)
          Deprecated.  
 void endDocument()
          Deprecated.  
 void endElement(java.lang.String uri, java.lang.String local, java.lang.String qname)
          Deprecated.  
 void endPrefixMapping(java.lang.String prefix)
          Deprecated. Removes a namespace declaration.
 int getAttribute(java.lang.String uri, java.lang.String local)
          Deprecated. Gets the index of the attribute with the specified name.
 java.lang.String getBaseUri()
          Deprecated.  
 UnmarshallingEventHandler getCurrentEventHandler()
          Deprecated. Gets the current handler.
 ContentHandlerEx getCurrentHandler()
          Deprecated.  
 org.xml.sax.Locator getLocator()
          Deprecated. Gets the current source location information.
 java.lang.String getNamespaceURI(java.lang.String prefix)
          Deprecated.  
 UnmarshallableObject getObjectFromId(java.lang.String id)
          Deprecated. Looks up the ID table and gets associated object.
 java.lang.String getPrefix(java.lang.String uri)
          Deprecated.  
 java.util.Iterator getPrefixes(java.lang.String uri)
          Deprecated.  
 java.lang.Object getResult()
          Deprecated.  
 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.
 boolean handleEvent(javax.xml.bind.ValidationEvent event)
          Deprecated.  
 void ignorableWhitespace(char[] buf, int start, int len)
          Deprecated.  
 boolean isNotation(java.lang.String s)
          Deprecated.  
 boolean isUnparsedEntity(java.lang.String s)
          Deprecated.  
 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(java.lang.String target, java.lang.String data)
          Deprecated.  
 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 reportAndThrow(UnreportedException e)
          Deprecated.  
 java.lang.String resolveNamespacePrefix(java.lang.String prefix)
          Deprecated.  
 void setDocumentLocator(org.xml.sax.Locator loc)
          Deprecated.  
 void setTracer(Tracer t)
          Deprecated.  
 void skippedEntity(java.lang.String name)
          Deprecated.  
 void startDocument()
          Deprecated.  
 void startElement(java.lang.String uri, java.lang.String local, java.lang.String qName, org.xml.sax.Attributes atts)
          Deprecated.  
 void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
          Deprecated. Adds a new namespace declaration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAXUnmarshallerHandlerImpl

public SAXUnmarshallerHandlerImpl(UnmarshallerImpl _parent,
                                  TypeRegistry _reg)
Deprecated. 
Method Detail

getTypeRegistry

public TypeRegistry getTypeRegistry()
Deprecated. 
Description copied from interface: UnmarshallingContext
Obtains a reference to the current type registry.

Specified by:
getTypeRegistry in interface UnmarshallingContext

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Deprecated. 
Specified by:
startDocument in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Deprecated. 
Specified by:
endDocument in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

startElement

public void startElement(java.lang.String uri,
                         java.lang.String local,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
Deprecated. 
Specified by:
startElement in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

endElement

public final void endElement(java.lang.String uri,
                             java.lang.String local,
                             java.lang.String qname)
                      throws org.xml.sax.SAXException
Deprecated. 
Specified by:
endElement in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

getResult

public java.lang.Object getResult()
                           throws javax.xml.bind.UnmarshalException
Deprecated. 
Specified by:
getResult in interface javax.xml.bind.UnmarshallerHandler
Throws:
javax.xml.bind.UnmarshalException

pushContentHandler

public void pushContentHandler(UnmarshallingEventHandler handler,
                               int memento)
Deprecated. 
Description copied from interface: UnmarshallingContext
Pushes the current content handler into the stack and registers the newly specified content handler so that it can receive SAX events.

Specified by:
pushContentHandler in interface UnmarshallingContext
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

public void popContentHandler()
                       throws UnreportedException
Deprecated. 
Description copied from interface: UnmarshallingContext
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.

Specified by:
popContentHandler in interface UnmarshallingContext
Throws:
UnreportedException

getCurrentHandler

public ContentHandlerEx getCurrentHandler()
Deprecated. 

Description copied from interface: UnmarshallingContext
Gets the current handler.

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

Specified by:
getCurrentHandler in interface UnmarshallingContext

getCurrentEventHandler

public UnmarshallingEventHandler getCurrentEventHandler()
Deprecated. 
Description copied from interface: UnmarshallingContext
Gets the current handler.

Specified by:
getCurrentEventHandler in interface UnmarshallingContext

consumeText

protected void consumeText(java.lang.String str,
                           boolean ignorable)
                    throws UnreportedException
Deprecated. 
Throws:
UnreportedException

characters

public final void characters(char[] buf,
                             int start,
                             int len)
Deprecated. 
Specified by:
characters in interface org.xml.sax.ContentHandler

ignorableWhitespace

public final void ignorableWhitespace(char[] buf,
                                      int start,
                                      int len)
Deprecated. 
Specified by:
ignorableWhitespace in interface org.xml.sax.ContentHandler

startPrefixMapping

public void startPrefixMapping(java.lang.String prefix,
                               java.lang.String uri)
Deprecated. 
Description copied from interface: UnmarshallingContext
Adds a new namespace declaration. This method should be called by the generated code.

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

endPrefixMapping

public void endPrefixMapping(java.lang.String prefix)
Deprecated. 
Description copied from interface: UnmarshallingContext
Removes a namespace declaration. This method should be called by the generated code.

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

resolveNamespacePrefix

public java.lang.String resolveNamespacePrefix(java.lang.String prefix)
Deprecated. 
Specified by:
resolveNamespacePrefix in interface org.relaxng.datatype.ValidationContext

getPrefixes

public java.util.Iterator getPrefixes(java.lang.String uri)
Deprecated. 
Specified by:
getPrefixes in interface javax.xml.namespace.NamespaceContext

getPrefix

public java.lang.String getPrefix(java.lang.String uri)
Deprecated. 
Specified by:
getPrefix in interface javax.xml.namespace.NamespaceContext

getNamespaceURI

public java.lang.String getNamespaceURI(java.lang.String prefix)
Deprecated. 
Specified by:
getNamespaceURI in interface javax.xml.namespace.NamespaceContext

pushAttributes

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

Specified by:
pushAttributes in interface UnmarshallingContext

popAttributes

public void popAttributes()
Deprecated. 
Description copied from interface: UnmarshallingContext
Discards the previously stored attribute set. This method should be called by the generated code when it "eats" a leaveElement event.

Specified by:
popAttributes in interface UnmarshallingContext

getUnconsumedAttributes

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

Specified by:
getUnconsumedAttributes in interface UnmarshallingContext

getAttribute

public int getAttribute(java.lang.String uri,
                        java.lang.String local)
Deprecated. 
Description copied from interface: UnmarshallingContext
Gets the index of the attribute with the specified name. This is usually faster when you only need to test with a simple name.

Specified by:
getAttribute in interface UnmarshallingContext
Returns:
-1 if not found.

consumeAttribute

public void consumeAttribute(int idx)
                      throws UnreportedException
Deprecated. 
Description copied from interface: UnmarshallingContext
Fires an attribute event for the specified attribute.

Specified by:
consumeAttribute in interface UnmarshallingContext
Throws:
UnreportedException

addPatcher

public void addPatcher(java.lang.Runnable job)
Deprecated. 
Description copied from interface: UnmarshallingContext
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.

Specified by:
addPatcher in interface UnmarshallingContext
Parameters:
job - The run method of this object is called.

addToIdTable

public java.lang.String addToIdTable(java.lang.String id)
Deprecated. 
Description copied from interface: UnmarshallingContext
Adds the object which is currently being unmarshalled to the ID table.

Specified by:
addToIdTable in interface UnmarshallingContext
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

public UnmarshallableObject getObjectFromId(java.lang.String id)
Deprecated. 
Description copied from interface: UnmarshallingContext
Looks up the ID table and gets associated object.

Specified by:
getObjectFromId in interface UnmarshallingContext
Returns:
If there is no object associated with the given id, this method returns null.

skippedEntity

public void skippedEntity(java.lang.String name)
Deprecated. 
Specified by:
skippedEntity in interface org.xml.sax.ContentHandler

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
Deprecated. 
Specified by:
processingInstruction in interface org.xml.sax.ContentHandler

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator loc)
Deprecated. 
Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler

getLocator

public org.xml.sax.Locator getLocator()
Deprecated. 
Description copied from interface: UnmarshallingContext
Gets the current source location information.

Specified by:
getLocator in interface UnmarshallingContext

handleEvent

public boolean handleEvent(javax.xml.bind.ValidationEvent event)
Deprecated. 
Specified by:
handleEvent in interface javax.xml.bind.ValidationEventHandler

reportAndThrow

public void reportAndThrow(UnreportedException e)
                    throws org.xml.sax.SAXException
Deprecated. 
Throws:
org.xml.sax.SAXException

getBaseUri

public java.lang.String getBaseUri()
Deprecated. 
Specified by:
getBaseUri in interface org.relaxng.datatype.ValidationContext

isUnparsedEntity

public boolean isUnparsedEntity(java.lang.String s)
Deprecated. 
Specified by:
isUnparsedEntity in interface org.relaxng.datatype.ValidationContext

isNotation

public boolean isNotation(java.lang.String s)
Deprecated. 
Specified by:
isNotation in interface org.relaxng.datatype.ValidationContext

setTracer

public void setTracer(Tracer t)
Deprecated. 

getTracer

public Tracer getTracer()
Deprecated. 
Description copied from interface: UnmarshallingContext
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.

Specified by:
getTracer in interface UnmarshallingContext