org.jboss.axis.encoding
Interface DeserializationContext

All Superinterfaces:
DeserializationContext (src)
All Known Implementing Classes:
DeserializationContextImpl (src)

public interface DeserializationContext
extends DeserializationContext (src)

This interface describes the AXIS DeserializationContext, note that an AXIS compliant DeserializationContext must extend the org.xml.sax.helpers.DefaultHandler.


Method Summary
 void addObjectById(java.lang.String _id, java.lang.Object obj)
          Add the object associated with this id (where id is the value of an id= attribute, i.e.
 SOAPElementAxisImpl (src) getCurElement()
          Get current MessageElement
 java.util.ArrayList getCurrentNSMappings()
          Get the Namespace Mappings.
 int getCurrentRecordPos()
          Get the current position in the record.
 Deserializer (src) getDeserializer(java.lang.Class cls, QName (src)  xmlType)
          Get a Deserializer which can turn a given xml type into a given Java type
 Deserializer (src) getDeserializerForClass(java.lang.Class cls)
          Convenience method to get the Deserializer for a specific java class from its meta data.
 Deserializer (src) getDeserializerForType(QName (src)  xmlType)
          Convenience method to get the Deserializer for a specific xmlType.
 SOAPElementAxisImpl (src) getElementByID(java.lang.String id)
          Get the MessageElement for the indicated id (where id is the #value of an href) If the MessageElement has not been processed, the MessageElement will be returned.
 SOAPEnvelopeAxisImpl (src) getEnvelope()
          Get Envelope
 MessageContext (src) getMessageContext()
          Get MessageContext
 java.lang.String getNamespaceURI(java.lang.String prefix)
          Get the Namespace for a particular prefix
 java.lang.Object getObjectByRef(java.lang.String href)
          Gets the MessageElement or actual Object value associated with the href value.
 QName (src) getQNameFromString(java.lang.String qNameStr)
          Construct a QName from a string of the form :
 SAX2EventRecorder (src) getRecorder()
          Get Event Recorder
 int getStartOfMappingsPos()
          Get the start of the mapping position
 QName (src) getTypeFromAttributes(java.lang.String namespace, java.lang.String localName, org.xml.sax.Attributes attrs)
          Create a QName for the type of the element defined by localName and namespace with the specified attributes.
 QName (src) getTypeFromXSITypeAttr(java.lang.String namespace, java.lang.String localName, org.xml.sax.Attributes attrs)
          Create a QName for the type of the element defined by localName and namespace from the XSI type.
 TypeMapping (src) getTypeMapping()
          Get the TypeMapping for this DeserializationContext
 TypeMappingRegistry (src) getTypeMappingRegistry()
          Get the TypeMappingRegistry we're using.
 boolean isDoneParsing()
          Return if done parsing document.
 boolean isNil(org.xml.sax.Attributes attrs)
          Convenenience method that returns true if the value is nil (due to the xsi:nil) attribute.
 boolean isProcessingRef()
          Are we in the midst of processing an href target? If so, we shouldn't be pushing the element stack...
 void parse()
          Create a parser and parse the inputSource
 SOAPHandler (src) popElementHandler()
           
 void pushElementHandler(SOAPHandler (src)  handler)
          Handler management methods
 void pushNewElement(SOAPElementAxisImpl (src)  elem)
          Push the MessageElement into the recorder
 void registerElementByID(java.lang.String id, SOAPElementAxisImpl (src)  elem)
          Register the MessageElement with this id (where id is id= form without the #) This routine is called when the MessageElement with an id is read.
 void registerFixup(java.lang.String href, Deserializer (src)  dser)
          During deserialization, an element with an href=#id may be encountered before the element defining id=id is read.
 void registerResolverForID(java.lang.String id, IDResolver (src)  resolver)
          Each id can have its own kind of resolver.
 void replaceElementHandler(SOAPHandler (src)  handler)
           
 void setCurElement(SOAPElementAxisImpl (src)  el)
          Set current MessageElement
 void setProcessingRef(boolean ref)
          Indicate if we're in the midst of processing an href target, in which case we shouldn't be pushing the element stack.
 void setRecorder(SAX2EventRecorder (src)  recorder)
          Set Event Recorder
 

Method Detail

parse

public void parse()
           throws org.xml.sax.SAXException
Create a parser and parse the inputSource

Throws:
org.xml.sax.SAXException

getCurElement

public SOAPElementAxisImpl (src)  getCurElement()
Get current MessageElement


setCurElement

public void setCurElement(SOAPElementAxisImpl (src)  el)
Set current MessageElement


getMessageContext

public MessageContext (src)  getMessageContext()
Get MessageContext


getEnvelope

public SOAPEnvelopeAxisImpl (src)  getEnvelope()
Get Envelope


getRecorder

public SAX2EventRecorder (src)  getRecorder()
Get Event Recorder


setRecorder

public void setRecorder(SAX2EventRecorder (src)  recorder)
Set Event Recorder


getCurrentNSMappings

public java.util.ArrayList getCurrentNSMappings()
Get the Namespace Mappings. Returns null if none are present.


getNamespaceURI

public java.lang.String getNamespaceURI(java.lang.String prefix)
Get the Namespace for a particular prefix


getQNameFromString

public QName (src)  getQNameFromString(java.lang.String qNameStr)
Construct a QName from a string of the form :

Parameters:
qNameStr - is the prefixed name from the xml text
Returns:
QName

getTypeFromXSITypeAttr

public QName (src)  getTypeFromXSITypeAttr(java.lang.String namespace,
                                    java.lang.String localName,
                                    org.xml.sax.Attributes attrs)
Create a QName for the type of the element defined by localName and namespace from the XSI type.

Parameters:
namespace - of the element
localName - is the local name of the element
attrs - are the attributes on the element

getTypeFromAttributes

public QName (src)  getTypeFromAttributes(java.lang.String namespace,
                                   java.lang.String localName,
                                   org.xml.sax.Attributes attrs)
Create a QName for the type of the element defined by localName and namespace with the specified attributes.

Parameters:
namespace - of the element
localName - is the local name of the element
attrs - are the attributes on the element

isNil

public boolean isNil(org.xml.sax.Attributes attrs)
Convenenience method that returns true if the value is nil (due to the xsi:nil) attribute.

Parameters:
attrs - are the element attributes.
Returns:
true if xsi:nil is true

getDeserializer

public Deserializer (src)  getDeserializer(java.lang.Class cls,
                                    QName (src)  xmlType)
Get a Deserializer which can turn a given xml type into a given Java type


getDeserializerForType

public Deserializer (src)  getDeserializerForType(QName (src)  xmlType)
Convenience method to get the Deserializer for a specific xmlType.

Parameters:
xmlType - is QName for a type to deserialize
Returns:
Deserializer

getDeserializerForClass

public Deserializer (src)  getDeserializerForClass(java.lang.Class cls)
Convenience method to get the Deserializer for a specific java class from its meta data.

Parameters:
cls - is the Class used to find the deserializer
Returns:
Deserializer

getTypeMapping

public TypeMapping (src)  getTypeMapping()
Get the TypeMapping for this DeserializationContext


getTypeMappingRegistry

public TypeMappingRegistry (src)  getTypeMappingRegistry()
Get the TypeMappingRegistry we're using.

Returns:
TypeMapping or null

getElementByID

public SOAPElementAxisImpl (src)  getElementByID(java.lang.String id)
Get the MessageElement for the indicated id (where id is the #value of an href) If the MessageElement has not been processed, the MessageElement will be returned. If the MessageElement has been processed, the actual object value is stored with the id and this routine will return null.

Parameters:
id - is the value of an href attribute
Returns:
MessageElement or null

getObjectByRef

public java.lang.Object getObjectByRef(java.lang.String href)
Gets the MessageElement or actual Object value associated with the href value. The return of a MessageElement indicates that the referenced element has not been processed. If it is not a MessageElement, the Object is the actual deserialized value. In addition, this method is invoked to get Object values via Attachments.

Returns:
MessageElement other Object or null

addObjectById

public void addObjectById(java.lang.String _id,
                          java.lang.Object obj)
Add the object associated with this id (where id is the value of an id= attribute, i.e. it does not start with #). This routine is called to associate the deserialized object with the id specified on the XML element.

Parameters:
obj - is the deserialized object for this id.

registerFixup

public void registerFixup(java.lang.String href,
                          Deserializer (src)  dser)
During deserialization, an element with an href=#id may be encountered before the element defining id=id is read. In these cases, the getObjectByRef method above will return null. The deserializer is placed in a table keyed by href (a fixup table). After the element id is processed, the deserializer is informed of the value so that it can update its target(s) with the value.

Parameters:
href - (#id syntax)
dser - is the deserializer of the element

registerElementByID

public void registerElementByID(java.lang.String id,
                                SOAPElementAxisImpl (src)  elem)
Register the MessageElement with this id (where id is id= form without the #) This routine is called when the MessageElement with an id is read. If there is a Deserializer in our fixup list (described above), the 'fixup' deserializer is given to the MessageElement. When the MessageElement is completed, the 'fixup' deserializer is informed and it can set its targets.

Parameters:
id - (id name without the #)
elem - is the MessageElement

registerResolverForID

public void registerResolverForID(java.lang.String id,
                                  IDResolver (src)  resolver)
Each id can have its own kind of resolver. This registers a resolver for the id.


getCurrentRecordPos

public int getCurrentRecordPos()
Get the current position in the record.


getStartOfMappingsPos

public int getStartOfMappingsPos()
Get the start of the mapping position


pushNewElement

public void pushNewElement(SOAPElementAxisImpl (src)  elem)
Push the MessageElement into the recorder


pushElementHandler

public void pushElementHandler(SOAPHandler (src)  handler)
Handler management methods


replaceElementHandler

public void replaceElementHandler(SOAPHandler (src)  handler)

popElementHandler

public SOAPHandler (src)  popElementHandler()

isDoneParsing

public boolean isDoneParsing()
Return if done parsing document.


setProcessingRef

public void setProcessingRef(boolean ref)
Indicate if we're in the midst of processing an href target, in which case we shouldn't be pushing the element stack.

Parameters:
ref -

isProcessingRef

public boolean isProcessingRef()
Are we in the midst of processing an href target? If so, we shouldn't be pushing the element stack...

Returns: