Package org.exolab.castor.xml.schema

Examples of org.exolab.castor.xml.schema.ElementDecl


                }
                //-- use targetNamespace of schema
                break;
            case Structure.ELEMENT:
                //--resolve reference?
                ElementDecl element = (ElementDecl)_annotated;
                if (element.isReference())
                    element = element.getReference();
                
                schema = element.getSchema();
                //-- top-level (use targetNamespace of schema)
                if (element.getParent() == schema)
                    break;
               
                //-- check form (qualified or unqualified)
                form = element.getForm();
                if (form == null) {
                    form = schema.getElementFormDefault();
                }
                if ((form == null) || form.isUnqualified()) {
                    //-- no targetNamespace by default
View Full Code Here


      {
        Structure item = (Structure)groupEnum.nextElement();

        if (item.getStructureType() == Structure.ELEMENT)
        {
          ElementDecl elementDecl = (ElementDecl)item;
          Element childElem;
          if (elementDecl.getSchema() != null) {
            if (elementDecl.getSchema().getElementFormDefault() != null) {
              if (elementDecl.getSchema().getElementFormDefault().isQualified()) {
                childElem = new Element(elementDecl.getName(), "ns1", partElem.getNamespaceURI());
              }
              else
                childElem = new Element(elementDecl.getName());                  
            }
            else
              childElem = new Element(elementDecl.getName());
          }
          else
            childElem = new Element(elementDecl.getName());


          XMLType xmlType = elementDecl.getType();

          if(xmlType != null && xmlType.isComplexType())
          {
            buildComplexPart((ComplexType)xmlType, childElem);
          }
View Full Code Here

    {
      // Get the element name
      String elemName = part.getElementName().getLocalPart();

      // Find the element declaration
      ElementDecl elemDecl = wsdlTypes.getElementDecl(elemName);

      if(elemDecl != null)
      {
        // From the element declaration get the XML type
        xmlType = elemDecl.getType();
      }
    }

    return xmlType;
  }
View Full Code Here

TOP

Related Classes of org.exolab.castor.xml.schema.ElementDecl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.