FileDocCategorySizeDatePackage
WSDDArrayMapping.javaAPI DocApache Axis 1.42777Sat Apr 22 18:57:28 BST 2006org.apache.axis.deployment.wsdd

WSDDArrayMapping

public class WSDDArrayMapping extends WSDDTypeMapping
A WSDDArrayMapping is simply a WSDDTypeMapping which has preset values for the serializer and deserializer attributes. This enables the following slightly simplified syntax when expressing an array mapping: <arrayMapping qname="prefix:local" languageSpecificType="java:class" innerType="prefix:local"/>

Fields Summary
private QName
innerType
array item type
Constructors Summary
public WSDDArrayMapping()
Default constructor


           
      
    
public WSDDArrayMapping(Element e)

        super(e);
        Attr innerTypeAttr = e.getAttributeNode(ATTR_INNER_TYPE);
        if (innerTypeAttr != null) {
            String qnameStr = innerTypeAttr.getValue();
            innerType = XMLUtils.getQNameFromString(qnameStr, e);
        }
        serializer = ARRAY_SERIALIZER_FACTORY;
        deserializer = ARRAY_DESERIALIZER_FACTORY;
    
Methods Summary
protected javax.xml.namespace.QNamegetElementName()

        return QNAME_ARRAYMAPPING;
    
public javax.xml.namespace.QNamegetInnerType()

return
Returns the innerType.

        return innerType;
    
public voidwriteToContext(org.apache.axis.encoding.SerializationContext context)

        AttributesImpl attrs = new AttributesImpl();

        String typeStr = context.qName2String(typeQName);
        attrs.addAttribute("", ATTR_LANG_SPEC_TYPE, ATTR_LANG_SPEC_TYPE, "CDATA", typeStr);

        String qnameStr = context.qName2String(qname);
        attrs.addAttribute("", ATTR_QNAME, ATTR_QNAME, "CDATA", qnameStr);

        String innerTypeStr = context.qName2String(innerType);
        attrs.addAttribute("", ATTR_INNER_TYPE, ATTR_INNER_TYPE, "CDATA", innerTypeStr);

        context.startElement(QNAME_ARRAYMAPPING, attrs);
        context.endElement();