FileDocCategorySizeDatePackage
JaxrpcMappingDescriptorNode.javaAPI DocGlassfish v2 API6991Fri May 04 22:31:38 BST 2007com.sun.enterprise.deployment.node

JaxrpcMappingDescriptorNode

public class JaxrpcMappingDescriptorNode extends com.sun.enterprise.deployment.node.BundleNode implements com.sun.enterprise.deployment.node.RootXMLNode
Root node for jaxrpc mapping deployment descriptor
author
Kenneth Saks
version

Fields Summary
public static final com.sun.enterprise.deployment.node.XMLElement
ROOT_ELEMENT
public static final String
SCHEMA_ID
private static final List
systemIDs
private static final Set
complexElements
private com.sun.enterprise.deployment.JaxrpcMappingDescriptor
descriptor
private String
javaPackage
private boolean
complexMapping
Constructors Summary
public JaxrpcMappingDescriptorNode()

        descriptor = new JaxrpcMappingDescriptor();
    
Methods Summary
public java.lang.ObjectgetDescriptor()

return
the descriptor instance to associate with this XMLNode

        return descriptor;
    
public java.lang.StringgetDocType()

return
the DOCTYPE of the XML file

        return null;
    
protected java.lang.StringgetSchemaURL()

return
the complete URL for J2EE schemas

       return WebServicesTagNames.IBM_NAMESPACE + "/" + getSystemID();
    
public java.lang.StringgetSpecVersion()

return
the default spec version level this node complies to

        return "1.1";
    
public java.lang.StringgetSystemID()

return
the SystemID of the XML file

        return SCHEMA_ID;
    
public java.util.ListgetSystemIDs()

return
the list of SystemID of the XML schema supported

        return systemIDs;
    
protected com.sun.enterprise.deployment.node.XMLElementgetXMLRootTag()

return
the XML tag associated with this XMLNode

        return ROOT_ELEMENT;
    
private static java.util.SetinitComplexElements()


        
        Set complexElements = new HashSet();
        complexElements.add(WebServicesTagNames.JAVA_XML_TYPE_MAPPING);
        complexElements.add(WebServicesTagNames.EXCEPTION_MAPPING);
        complexElements.add(WebServicesTagNames.SERVICE_INTERFACE_MAPPING);
        complexElements.add
            (WebServicesTagNames.SERVICE_ENDPOINT_INTERFACE_MAPPING);
        return Collections.unmodifiableSet(complexElements);
    
private static java.util.ListinitSystemIDs()

        ArrayList<String> systemIDs = new ArrayList<String>();
        systemIDs.add(SCHEMA_ID);
        return Collections.unmodifiableList(systemIDs);
    
public voidsetElementValue(com.sun.enterprise.deployment.node.XMLElement element, java.lang.String value)
receives notiification of the value for a particular tag

param
element the xml element
param
value it's associated value

   
        if (complexMapping) {
            // We only gather namespace->package mapping. In exhaustive(complex)
            // mapping case, it's enough to just capture the fact that we
            // have complex mapping info.  The actual processing of the elements
            // will be done by mapping file modeler during deployment
            return;
        } else if(WebServicesTagNames.PACKAGE_TYPE.equals(element.getQName())) {
            javaPackage = value;
        } else if(WebServicesTagNames.NAMESPACE_URI.equals(element.getQName())){
            descriptor.addMapping(javaPackage, value);
            javaPackage = null;
        } else {
            super.setElementValue(element, value);
        }
    
public voidstartElement(com.sun.enterprise.deployment.node.XMLElement element, org.xml.sax.Attributes attributes)

        if( complexMapping ) {
            // NOTE : we don't call super.startElement in this case because
            // we don't need to process any of the attributes
            return;
        } else if( complexElements.contains(element.getQName()) ) {
            complexMapping = true;
            descriptor.setIsSimpleMapping(false);
            // NOTE : we don't call super.startElement in this case because
            // we don't need to process any of the attributes
        } else {
            super.startElement(element, attributes);
        }