Examples of XSComplexTypeDefinition


Examples of org.apache.xerces.xs.XSComplexTypeDefinition

    /**
     * checkAndConvert
     */
    private void checkAndConvert(XSTypeDefinition tDef, String namespace, String nameHint) throws SchemaConversionException {
        if (tDef.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
            XSComplexTypeDefinition ctDef = (XSComplexTypeDefinition) tDef;
            if (ctDef.getContentType() != XSComplexTypeDefinition.CONTENTTYPE_SIMPLE || ctDef.getAttributeUses().getLength() > 0 || ctDef.getAttributeWildcard() != null) {
                convertComplexTypeDef(ctDef, namespace, nameHint);
            }
        }
    }
View Full Code Here

Examples of org.apache.xerces.xs.XSComplexTypeDefinition

                propDefList.add(propDef);

                // If this element declaration is of complex type then
                // it is converted into either node or property def
            } else if (tDef.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
                XSComplexTypeDefinition ctDef = (XSComplexTypeDefinition) tDef;

                // If the complex type definition contains a simple content model
                // and does not contain any attribute uses or attribute wildcards
                // then the enclosing element is converted to a property def
                if (ctDef.getContentType() == XSComplexTypeDefinition.CONTENTTYPE_SIMPLE && ctDef.getAttributeUses().getLength() == 0 && ctDef.getAttributeWildcard() == null) {
                    XSSimpleTypeDefinition std = ctDef.getSimpleType();
                    PropDef pd = simpleTypeToPropDef(std, name, mandatory, multiple);
                    propDefList.add(pd);

                    // If the complex type definition contains a complex content model
                    // or a simple content model with attribute uses or an attribute wildcard
View Full Code Here

Examples of org.apache.xerces.xs.XSComplexTypeDefinition

      if (xt instanceof XSComplexTypeDefinition == false)
         return false;

      StringBuilder tempBuf = new StringBuilder();
      XSComplexTypeDefinition wrapper = (XSComplexTypeDefinition)xt;

      boolean hasAttributes = wrapper.getAttributeUses().getLength() > 0;
      if (hasAttributes)
         throw new WSException("[JAX-RPC 2.3.1.2] Can not unwrap, complex type contains attributes.");

      boolean unwrappedElement = false;

      XSParticle particle = wrapper.getParticle();
      if (particle == null)
      {
         unwrappedElement = true;
      }
      else
View Full Code Here

Examples of org.apache.xerces.xs.XSComplexTypeDefinition

      if (xt instanceof XSComplexTypeDefinition == false)
         throw new WSException("Tried to unwrap a non-complex type.");

      List<MethodParamPartsMapping> partsMappings = new ArrayList<MethodParamPartsMapping>();

      XSComplexTypeDefinition wrapper = (XSComplexTypeDefinition)xt;

      if (wrapper.getAttributeUses().getLength() > 0)
         return false;

      boolean unwrappedElement = false;

      XSParticle particle = wrapper.getParticle();
      if (particle == null)
      {
         return true;
      }
      else
View Full Code Here

Examples of org.apache.xerces.xs.XSComplexTypeDefinition

      if (xt instanceof XSComplexTypeDefinition)
      {

         XSModelGroup xm = null;
         XSComplexTypeDefinition xc = (XSComplexTypeDefinition)xt;
         if (xc.getContentType() != XSComplexTypeDefinition.CONTENTTYPE_EMPTY)
         {
            XSParticle xp = xc.getParticle();
            if (xp != null)
            {
               XSTerm xterm = xp.getTerm();
               if (xterm instanceof XSModelGroup)
                  xm = (XSModelGroup)xterm;
            }
         }

         if ((skipWrapperArray && SchemaUtils.isWrapperArrayType(xt)) == false)
         {
            jxtm = new JavaXmlTypeMapping(jwm);
            String javaType;
            String localName = xt.getName();

            // Anonymous
            if (localName == null)
            {
               String tempName = containingElement + ToolsUtils.firstLetterUpperCase(name);
               javaType = getJavaTypeAsString(null, new QName(tempName), false, true);
               StringBuilder temp = new StringBuilder();
               if (containingType != null && containingType.length() > 0)
                  temp.append(">").append(containingType);
               temp.append(">").append(name);
               localName = temp.toString();
               jxtm.setAnonymousTypeQName(new QName(xt.getNamespace(), localName, "typeNS"));
            }
            else
            {
               javaType = getJavaTypeAsString(null, new QName(localName), false, true);
               jxtm.setRootTypeQName(new QName(xt.getNamespace(), xt.getName(), "typeNS"));
            }

            if (typeNamespace == null)
            {
               typeNamespace = xt.getNamespace();
            }

            if (registeredTypes.contains(javaType))
               return;

            jxtm.setJavaType(javaType);
            jxtm.setQNameScope("complexType");

            registeredTypes.add(javaType);
            jwm.addJavaXmlTypeMappings(jxtm);
            // addJavaXMLTypeMapping(jwm, jxtm

            if (xm != null)
            {
               addVariableMappingMap(xm, jxtm, javaType);
            }

            // Add simple content if it exists
            XSSimpleTypeDefinition simple = xc.getSimpleType();
            if (simple != null)
            {
               addJavaXMLTypeMap(simple, xc.getName(), "", "", jwm, skipWrapperArray);
            }

            // Add attributes
            XSObjectList attributeUses = ((XSComplexTypeDefinition)xc).getAttributeUses();
            if (attributeUses != null)
               addAttributeMappings(attributeUses, jxtm);
         }

         if (xm != null)
            addGroup(xm, name, xc.getName(), jwm);
      }

      // Add enum simpleType support
   }
View Full Code Here

Examples of org.apache.xerces.xs.XSComplexTypeDefinition

   private static boolean isArrayWrapper(XSTypeDefinition type)
   {
      boolean is = false;
      if(XSTypeDefinition.COMPLEX_TYPE == type.getTypeCategory())
      {
         XSComplexTypeDefinition cType = (XSComplexTypeDefinition)type;
         XSParticle particle = cType.getParticle();
         if(particle != null)
         {
            is = particle.getMaxOccursUnbounded() || particle.getMaxOccurs() > 1;
         }
      }
View Full Code Here

Examples of org.apache.xerces.xs.XSComplexTypeDefinition

                                          ParentElement parentBinding)
   {
      XSTypeDefinition type = elementDecl.getTypeDefinition();
      if(type.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE)
      {
         XSComplexTypeDefinition complexType = (XSComplexTypeDefinition)type;
         XSParticle particle = complexType.getParticle();
         if(particle != null)
         {
            bindParticle(doc, parentBinding, particle);
         }
View Full Code Here

Examples of org.apache.xerces.xs.XSComplexTypeDefinition

      content.endElement(element.getNamespace(), element.getName(), qName);
   }

   private void marshalComplexType(XSElementDeclaration element)
   {
      XSComplexTypeDefinition type = (XSComplexTypeDefinition)element.getTypeDefinition();
      XSParticle particle = type.getParticle();

      XSObjectList attributeUses = type.getAttributeUses();
      AttributesImpl attrs = attributeUses.getLength() > 0 ? new AttributesImpl(attributeUses.getLength()) : null;
      for (int i = 0; i < attributeUses.getLength(); ++i)
      {
         XSAttributeUse attrUse = (XSAttributeUse)attributeUses.item(i);
         XSAttributeDeclaration attrDec = attrUse.getAttrDeclaration();
View Full Code Here

Examples of org.apache.xerces.xs.XSComplexTypeDefinition

    /**
     * checkAndConvert
     */
    private void checkAndConvert(XSTypeDefinition tDef, String namespace, String nameHint) throws SchemaConversionException {
        if (tDef.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
            XSComplexTypeDefinition ctDef = (XSComplexTypeDefinition) tDef;
            if (ctDef.getContentType() != XSComplexTypeDefinition.CONTENTTYPE_SIMPLE
                    || ctDef.getAttributeUses().getLength() > 0
                    || ctDef.getAttributeWildcard() != null) {
                convertComplexTypeDef(ctDef, namespace, nameHint);
            }
        }
    }
View Full Code Here

Examples of org.apache.xerces.xs.XSComplexTypeDefinition

                propDefList.add(propDef);

                // If this element declaration is of complex type then
                // it is converted into either node or property def
            } else if (tDef.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
                XSComplexTypeDefinition ctDef = (XSComplexTypeDefinition) tDef;

                // If the complex type definition contains a simple content model
                // and does not contain any attribute uses or attribute wildcards
                // then the enclosing element is converted to a property def
                if (ctDef.getContentType() == XSComplexTypeDefinition.CONTENTTYPE_SIMPLE &&
                        ctDef.getAttributeUses().getLength() == 0 && ctDef.getAttributeWildcard() == null) {
                    XSSimpleTypeDefinition std = ctDef.getSimpleType();
                    PropDef pd = simpleTypeToPropDef(std, name, mandatory, multiple);
                    propDefList.add(pd);

                    // If the complex type definition contains a complex content model
                    // or a simple content model with attribute uses or an attribute wildcard
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.