Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.axis.encoding.ser
Class BeanDeserializer  view BeanDeserializer download BeanDeserializer.java

java.lang.Object
  extended byorg.xml.sax.helpers.DefaultHandler
      extended byorg.apache.axis.message.SOAPHandler
          extended byorg.apache.axis.encoding.DeserializerImpl
              extended byorg.apache.axis.encoding.ser.BeanDeserializer
All Implemented Interfaces:
org.apache.axis.encoding.Callback, org.xml.sax.ContentHandler, org.apache.axis.encoding.Deserializer, javax.xml.rpc.encoding.Deserializer, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, java.io.Serializable

public class BeanDeserializer
extends org.apache.axis.encoding.DeserializerImpl
implements java.io.Serializable

General purpose deserializer for an arbitrary java bean.


Field Summary
protected  SimpleDeserializer cacheStringDSer
           
protected  javax.xml.namespace.QName cacheXMLType
           
protected  int collectionIndex
           
protected  org.apache.axis.encoding.Target constructorTarget
          Constructor Target object to use (if constructorToUse != null)
protected  java.lang.reflect.Constructor constructorToUse
          Constructor if no default constructor
(package private)  java.lang.Class javaType
           
protected static org.apache.commons.logging.Log log
           
protected  javax.xml.namespace.QName prevQName
           
protected  java.util.Map propertyMap
           
protected  org.apache.axis.description.TypeDesc typeDesc
          Type metadata about this class for XML deserialization
private  java.io.CharArrayWriter val
           
(package private)  javax.xml.namespace.QName xmlType
           
 
Fields inherited from class org.apache.axis.encoding.DeserializerImpl
componentsReadyFlag, defaultType, id, isEnded, isHref, isNil, targets, value
 
Fields inherited from class org.apache.axis.message.SOAPHandler
myElement
 
Constructor Summary
BeanDeserializer(java.lang.Class javaType, javax.xml.namespace.QName xmlType)
           
BeanDeserializer(java.lang.Class javaType, javax.xml.namespace.QName xmlType, org.apache.axis.description.TypeDesc typeDesc)
           
BeanDeserializer(java.lang.Class javaType, javax.xml.namespace.QName xmlType, org.apache.axis.description.TypeDesc typeDesc, java.util.Map propertyMap)
           
 
Method Summary
 void characters(char[] chars, int start, int end)
          Receive notification of character data inside an element.
 org.apache.axis.utils.BeanPropertyDescriptor getAnyPropertyDesc()
          Get a BeanPropertyDescriptor which indicates where we should put extensibility elements (i.e.
protected  org.apache.axis.encoding.Deserializer getDeserializer(javax.xml.namespace.QName xmlType, java.lang.Class javaType, java.lang.String href, org.apache.axis.encoding.DeserializationContext context)
          Get the Deserializer for the attribute or child element.
protected  void handleMixedContent()
           
 void onEndElement(java.lang.String namespace, java.lang.String localName, org.apache.axis.encoding.DeserializationContext context)
          onEndElement is called by endElement.
 org.apache.axis.message.SOAPHandler onStartChild(java.lang.String namespace, java.lang.String localName, java.lang.String prefix, org.xml.sax.Attributes attributes, org.apache.axis.encoding.DeserializationContext context)
          Deserializer interface called on each child element encountered in the XML stream.
 void onStartElement(java.lang.String namespace, java.lang.String localName, java.lang.String prefix, org.xml.sax.Attributes attributes, org.apache.axis.encoding.DeserializationContext context)
          Set the bean properties that correspond to element attributes.
 void startElement(java.lang.String namespace, java.lang.String localName, java.lang.String prefix, org.xml.sax.Attributes attributes, org.apache.axis.encoding.DeserializationContext context)
          startElement The ONLY reason that this method is overridden is so that the object value can be set or a reasonable exception is thrown indicating that the object cannot be created.
 
Methods inherited from class org.apache.axis.encoding.DeserializerImpl
addChildDeserializer, componentsReady, endElement, getDefaultType, getMechanismType, getValue, getValue, getValueTargets, moveValueTargets, registerValueTarget, removeValueTargets, setChildValue, setDefaultType, setValue, setValue, valueComplete
 
Methods inherited from class org.apache.axis.message.SOAPHandler
makeNewElement, onEndChild
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log

val

private final java.io.CharArrayWriter val

xmlType

javax.xml.namespace.QName xmlType

javaType

java.lang.Class javaType

propertyMap

protected java.util.Map propertyMap

prevQName

protected javax.xml.namespace.QName prevQName

constructorToUse

protected java.lang.reflect.Constructor constructorToUse
Constructor if no default constructor


constructorTarget

protected org.apache.axis.encoding.Target constructorTarget
Constructor Target object to use (if constructorToUse != null)


typeDesc

protected org.apache.axis.description.TypeDesc typeDesc
Type metadata about this class for XML deserialization


collectionIndex

protected int collectionIndex

cacheStringDSer

protected SimpleDeserializer cacheStringDSer

cacheXMLType

protected javax.xml.namespace.QName cacheXMLType
Constructor Detail

BeanDeserializer

public BeanDeserializer(java.lang.Class javaType,
                        javax.xml.namespace.QName xmlType)

BeanDeserializer

public BeanDeserializer(java.lang.Class javaType,
                        javax.xml.namespace.QName xmlType,
                        org.apache.axis.description.TypeDesc typeDesc)

BeanDeserializer

public BeanDeserializer(java.lang.Class javaType,
                        javax.xml.namespace.QName xmlType,
                        org.apache.axis.description.TypeDesc typeDesc,
                        java.util.Map propertyMap)
Method Detail

startElement

public void startElement(java.lang.String namespace,
                         java.lang.String localName,
                         java.lang.String prefix,
                         org.xml.sax.Attributes attributes,
                         org.apache.axis.encoding.DeserializationContext context)
                  throws org.xml.sax.SAXException
startElement The ONLY reason that this method is overridden is so that the object value can be set or a reasonable exception is thrown indicating that the object cannot be created. This is done at this point so that it occurs BEFORE href/id processing.

Specified by:
startElement in interface org.apache.axis.encoding.Deserializer

onStartChild

public org.apache.axis.message.SOAPHandler onStartChild(java.lang.String namespace,
                                                        java.lang.String localName,
                                                        java.lang.String prefix,
                                                        org.xml.sax.Attributes attributes,
                                                        org.apache.axis.encoding.DeserializationContext context)
                                                 throws org.xml.sax.SAXException
Deserializer interface called on each child element encountered in the XML stream.

Specified by:
onStartChild in interface org.apache.axis.encoding.Deserializer

getAnyPropertyDesc

public org.apache.axis.utils.BeanPropertyDescriptor getAnyPropertyDesc()
Get a BeanPropertyDescriptor which indicates where we should put extensibility elements (i.e. XML which falls under the auspices of an <xsd:any> declaration in the schema)


onStartElement

public void onStartElement(java.lang.String namespace,
                           java.lang.String localName,
                           java.lang.String prefix,
                           org.xml.sax.Attributes attributes,
                           org.apache.axis.encoding.DeserializationContext context)
                    throws org.xml.sax.SAXException
Set the bean properties that correspond to element attributes. This method is invoked after startElement when the element requires deserialization (i.e. the element is not an href and the value is not nil.)

Specified by:
onStartElement in interface org.apache.axis.encoding.Deserializer

getDeserializer

protected org.apache.axis.encoding.Deserializer getDeserializer(javax.xml.namespace.QName xmlType,
                                                                java.lang.Class javaType,
                                                                java.lang.String href,
                                                                org.apache.axis.encoding.DeserializationContext context)
Get the Deserializer for the attribute or child element.


characters

public void characters(char[] chars,
                       int start,
                       int end)
                throws org.xml.sax.SAXException
Description copied from class: org.xml.sax.helpers.DefaultHandler
Receive notification of character data inside an element.

By default, do nothing. Application writers may override this method to take specific actions for each chunk of character data (such as adding the data to a node or buffer, or printing it to a file).

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

onEndElement

public void onEndElement(java.lang.String namespace,
                         java.lang.String localName,
                         org.apache.axis.encoding.DeserializationContext context)
                  throws org.xml.sax.SAXException
Description copied from class: org.apache.axis.encoding.DeserializerImpl
onEndElement is called by endElement. It is not called if the element has an href.

Specified by:
onEndElement in interface org.apache.axis.encoding.Deserializer

handleMixedContent

protected void handleMixedContent()
                           throws org.xml.sax.SAXException