Package org.apache.xerces.xs

Examples of org.apache.xerces.xs.XSSimpleTypeDefinition


     
      XSWildcard xsAttrWildcard = xsType.getAttributeWildcard();
      if(xsAttrWildcard != null)
         assertNotNull("Type " + typeBinding.getQName() + " has AnyAttributeBinding", typeBinding.getAnyAttribute());
     
      XSSimpleTypeDefinition xsSimpleType = xsType.getSimpleType();
      if(xsSimpleType != null)
      {
         TypeBinding simpleTypeBinding = typeBinding.getSimpleType();
         assertNotNull("Type " + typeBinding.getQName() + " has simple TypeBinding", simpleTypeBinding);
         assertEquivalent(xsSimpleType, simpleTypeBinding);
View Full Code Here


            {
               addVariableMappingMap(xm, jxtm, javaType);
            }

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

   {
      for (int i = 0; i < attributes.getLength(); i++)
      {
         XSAttributeUse obj = (XSAttributeUse)attributes.item(i);
         XSAttributeDeclaration att = obj.getAttrDeclaration();
         XSSimpleTypeDefinition simple = att.getTypeDefinition();
         addJavaXMLTypeMap(simple, "none", "", "", jxtm.getJavaWsdlMapping(), true);
         VariableMapping vm = new VariableMapping(jxtm);
         String name = att.getName();
         vm.setXmlAttributeName(name);
         // JBWS-1170 Convert characters which are illegal in Java identifiers
View Full Code Here

         ct.setContentType(XSComplexTypeDefinition.CONTENTTYPE_EMPTY);
         xt = ct;
      }
      else
      {
         XSSimpleTypeDefinition xstype = (new SchemaDVFactoryImpl()).getBuiltInType(localpart);
         xt = new JBossXSSimpleTypeDefinition(xstype);

      }
      return xt;
   }
View Full Code Here

      {
         short der = type.getDerivationMethod();

         if (XSConstants.DERIVATION_EXTENSION == der)
         {
            XSSimpleTypeDefinition xssimple = type.getSimpleType();
            QName q = new QName(xssimple.getNamespace(), xssimple.getName());
            QName qn = schemautils.patchXSDQName(q);
            Class javaType = typeMapping.getJavaType(qn);
            String jtype = null;
            if (javaType.isArray())
            {
View Full Code Here

         int len = xsobjlist.getLength();
         for (int i = 0; i < len; i++)
         {
            XSAttributeUse obj = (XSAttributeUse)xsobjlist.item(i);
            XSAttributeDeclaration att = obj.getAttrDeclaration();
            XSSimpleTypeDefinition xstype = att.getTypeDefinition();
            QName qn = SchemaUtils.handleSimpleType(xstype);
            boolean primitive = obj.getRequired();
            VAR v = createVAR(qn, att.getName(), getPackageName(xstype.getNamespace()), primitive);
            if (vars == null)
               vars = new ArrayList();
            vars.add(v);
         }
      }
View Full Code Here

            if (Constants.NS_SCHEMA_XSD.equals(nsuri) && "anyType".equals(tname)) continue;
            xsdJava.createJavaFile(ctype, dirloc.getPath(), packageName, xsmodel);
         }
         else if (type instanceof XSSimpleTypeDefinition)
         {
            XSSimpleTypeDefinition stype = (XSSimpleTypeDefinition)type;
            //Ignore xsd:anyType
            String nsuri = type.getNamespace();
            String tname = type.getName();
            if (Constants.NS_SCHEMA_XSD.equals(nsuri) && "anyType".equals(tname)) continue;
            xsdJava.createJavaFile(stype, dirloc.getPath(), packageName, xsmodel);
View Full Code Here

        }

        // If the content model of this complex type is simple, then we create a
        // PropDef corresponding to the XML text node defined by this content model.
        if (ctdef.getContentType() == XSComplexTypeDefinition.CONTENTTYPE_SIMPLE) {
            XSSimpleTypeDefinition stdef = ctdef.getSimpleType();
            //set to non-mandatory, single-value property called "jcr:xmlcharacters"
            PropDef propDef = simpleTypeToPropDef(stdef, XML_CONTENT_PROPERTY_NAME, false, false);
            propDefList.add(propDef);

            // If the content model of this complex type is element or mixed then we must convert the
View Full Code Here

            XSTypeDefinition tDef = eDec.getTypeDefinition();

            // If this element declaration is of simple type
            // then it is converted into a property def
            if (tDef.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE) {
                XSSimpleTypeDefinition stDef = (XSSimpleTypeDefinition) tDef;
                PropDef propDef = simpleTypeToPropDef(stDef, name, mandatory, multiple);
                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

        // Since this is an attribute declaration we assume it converts to
        // a single value property (we ignore the XML Schema List Type)
        boolean multiple = false;

        // Get the simple type def for this attribute
        XSSimpleTypeDefinition std = ad.getTypeDefinition();

        // convert it to a propdef
        return simpleTypeToPropDef(std, name, mandatory, multiple);
    }
View Full Code Here

TOP

Related Classes of org.apache.xerces.xs.XSSimpleTypeDefinition

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.