org.apache.axis.encoding
Class MapSerializer

java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--org.apache.axis.message.SOAPHandler
              |
              +--org.apache.axis.encoding.Deserializer
                    |
                    +--org.apache.axis.encoding.MapSerializer
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, java.io.Serializable, Serializer

public class MapSerializer
extends Deserializer
implements Serializer

A MapSerializer is be used to serialize and deserialize Maps using the SOAP-ENC encoding style.

Author:
Glen Daniels (gdaniels@macromedia.com)
See Also:
Serialized Form

Inner Class Summary
static class MapSerializer.Factory
           
 
Inner classes inherited from class org.apache.axis.encoding.Deserializer
Deserializer.FieldTarget, Deserializer.MethodTarget
 
Field Summary
static DeserializerFactory factory
           
static java.lang.Object KEYHINT
           
static java.lang.Object NILHINT
           
static java.lang.Object VALHINT
           
 
Fields inherited from class org.apache.axis.encoding.Deserializer
isComplete, targets, value
 
Fields inherited from class org.apache.axis.message.SOAPHandler
myElement
 
Constructor Summary
MapSerializer()
           
 
Method Summary
protected  void doPut(java.lang.Object key, java.lang.Object value)
           
 SOAPHandler onStartChild(java.lang.String namespace, java.lang.String localName, java.lang.String prefix, org.xml.sax.Attributes attributes, DeserializationContext context)
           
 void onStartElement(java.lang.String namespace, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes, DeserializationContext context)
          Subclasses override this
 void serialize(QName name, org.xml.sax.Attributes attributes, java.lang.Object value, SerializationContext context)
          Serialize a Map Walk the collection of keys, serializing each key/value pair inside an element.
 
Methods inherited from class org.apache.axis.encoding.Deserializer
copyValueTargets, endElement, getValue, onEndElement, registerCallback, registerValueTarget, registerValueTarget, setValue, startElement, valueComplete
 
Methods inherited from class org.apache.axis.message.SOAPHandler
onEndChild
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, 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

KEYHINT

public static final java.lang.Object KEYHINT

VALHINT

public static final java.lang.Object VALHINT

NILHINT

public static final java.lang.Object NILHINT

factory

public static DeserializerFactory factory
Constructor Detail

MapSerializer

public MapSerializer()
Method Detail

serialize

public void serialize(QName name,
                      org.xml.sax.Attributes attributes,
                      java.lang.Object value,
                      SerializationContext context)
               throws java.io.IOException
Serialize a Map Walk the collection of keys, serializing each key/value pair inside an element.
Specified by:
serialize in interface Serializer
Parameters:
name - the desired QName for the element
attributes - the desired attributes for the element
value - the Object to serialize
context - the SerializationContext in which to do all this
Throws:
java.io.IOException -  

onStartElement

public void onStartElement(java.lang.String namespace,
                           java.lang.String localName,
                           java.lang.String qName,
                           org.xml.sax.Attributes attributes,
                           DeserializationContext context)
                    throws org.xml.sax.SAXException
Description copied from class: Deserializer
Subclasses override this
Overrides:
onStartElement in class Deserializer

onStartChild

public SOAPHandler onStartChild(java.lang.String namespace,
                                java.lang.String localName,
                                java.lang.String prefix,
                                org.xml.sax.Attributes attributes,
                                DeserializationContext context)
                         throws org.xml.sax.SAXException
Overrides:
onStartChild in class Deserializer

doPut

protected void doPut(java.lang.Object key,
                     java.lang.Object value)


Copyright © 2001 Apache XML Project. All Rights Reserved.