Examples of XSSimpleTypeDefinition


Examples of org.apache.xerces.xs.XSSimpleTypeDefinition

        printDataInternalParameterList(privateImplSourceFile);
        privateImplSourceFile.println();
        privateImplSourceFile.println("{");

        if (hasChardata) {
            XSSimpleTypeDefinition simpleType = Util.findSimpleTypeDefinition(typeDefinition);
            String template = null;
            String simpleTypeValiTmpl = null;
            switch (Util.findVariety(simpleType)) {
            case ATOMIC:
                if (Util.hasFacetEnum(simpleType) && Util.isStringType(simpleType, config)) {
View Full Code Here

Examples of org.apache.xerces.xs.XSSimpleTypeDefinition

        stream.print(config.getIndentation());
        stream.println("if ( !validationResult ) return false;");
        stream.println();
        printComplexValidationBlockClose(stream);

        XSSimpleTypeDefinition simpleType = null;
        if (typeDefinition instanceof XSSimpleTypeDefinition) {
            simpleType = (XSSimpleTypeDefinition) typeDefinition;
        }
        Variety variety = Util.findVariety(simpleType);

        boolean printDefaultImpl = true;
        if (hasChardata) {
            if (simpleType == null) {
                simpleType = Util.findSimpleTypeDefinition(typeDefinition);
                variety = Util.findVariety(simpleType);
            }
            XSSimpleTypeDefinition listType = null;
            if (variety == Variety.LIST) {
                listType = simpleType;
                simpleType = Util.findListItemType(simpleType);
            }
            String xsdType = Util.findXSDSimpleTypeString(simpleType, config);
View Full Code Here

Examples of org.apache.xerces.xs.XSSimpleTypeDefinition

        stream.println("union Data");
        stream.print(config.getIndentation());
        stream.println("{");
        // for (XSSimpleTypeDefinition memberType : memberTypes) {
        for (int i = 0; i < memberTypes.size(); i++) {
            XSSimpleTypeDefinition memberType = memberTypes.get(i);
            stream.print(config.getIndentation());
            stream.print(config.getIndentation());
            stream.print(findCorrectCppTypeAsUnionMember(simpleType, memberType));
            stream.print(" " + memberNames.get(i));
            stream.println(";");
View Full Code Here

Examples of org.apache.xerces.xs.XSSimpleTypeDefinition

                stream.println("}");
            }
        }

        boolean simpleTypeStreamValidationRequired = false;
        XSSimpleTypeDefinition simpleType = Util.findSimpleTypeDefinition(element.getTypeDefinition());
        if (simpleType != null) {
            if (Util.hasStreamingFacets(simpleType)) {
                simpleTypeStreamValidationRequired = true;
            }
        }
View Full Code Here

Examples of org.apache.xerces.xs.XSSimpleTypeDefinition

        stream.println("{");

        // TODO no vali block

        XSComplexTypeDefinition complexType = null;
        XSSimpleTypeDefinition simpleType = null;
        if (typeDefinition instanceof XSComplexTypeDefinition) {
            complexType = (XSComplexTypeDefinition) typeDefinition;
        } else if (typeDefinition instanceof XSSimpleTypeDefinition) {
            simpleType = (XSSimpleTypeDefinition) typeDefinition;
        }
View Full Code Here

Examples of org.apache.xerces.xs.XSSimpleTypeDefinition

                            + Util.replaceCharactersForbiddenInCppIdentifiers(element.getName());
                }
            }
            xsSimpleType2validationFunctionName.put(type, name);

            XSSimpleTypeDefinition itemType = type.getItemType();
            if (itemType != null) {
                // TODO check if it is save to pass unchanged cppName here.
                createSimpleValidationFunctionName(cppName, element, itemType);
            }
        }
View Full Code Here

Examples of org.apache.xerces.xs.XSSimpleTypeDefinition

            for (int i = 0; i < attributeUses.getLength(); i++) {
                XSObject item = attributeUses.item(i);
                if (item instanceof XSAttributeUse) {
                    XSAttributeUse attrUse = (XSAttributeUse) item;
                    XSSimpleTypeDefinition simpleType = Util.getType(attrUse);
                    createSimpleValidationFunctionName(element2ElementName.get(element).cppElementName, element,
                            simpleType);
                }
            }
        }
        XSSimpleTypeDefinition simpleType = Util.findSimpleTypeDefinition(element.getTypeDefinition());
        if (simpleType != null) {
            if (Util.hasStreamingFacets(simpleType)) {
                createComplexValidationDataStructName(element2ElementName.get(element).cppElementName, element,
                        simpleType);
            }
View Full Code Here

Examples of org.apache.xerces.xs.XSSimpleTypeDefinition

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

      }
      return xt;
   }
View Full Code Here

Examples of org.apache.xerces.xs.XSSimpleTypeDefinition

                countAttrPresent = true;
                break;
            }
        }
        if (countAttrPresent) {
            XSSimpleTypeDefinition simpleType = Util.findSimpleTypeDefinition(element.getTypeDefinition());
            if (simpleType != null) {
                Variety variety = Util.findVariety(simpleType);
                if (variety == Variety.LIST) {
                    return true;
                }
View Full Code Here

Examples of org.apache.xerces.xs.XSSimpleTypeDefinition

        String xsNamespace = config.getXSNamespace();
        if (typeMapping.containsKey(type.getName()) && namespace.equals(xsNamespace)) {
            return type;
        } else {
            XSTypeDefinition baseType = type.getBaseType();
            XSSimpleTypeDefinition simpleBaseType = findSimpleTypeDefinition(baseType);
            if (simpleBaseType != null) {
                return findBuildinBaseType(simpleBaseType, config);
            } else {
                return null;
            }
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.