Examples of SchemaType


Examples of org.apache.xmlbeans.SchemaType

        return findJavaType(sType).replace('$', '.');
    }

    static boolean xmlTypeForPropertyIsUnion(SchemaProperty sProp)
    {
        SchemaType sType = sProp.javaBasedOnType();
        return (sType.isSimpleType() && sType.getSimpleVariety() == SchemaType.UNION);
    }
View Full Code Here

Examples of org.apache.xmlbeans.SchemaType

    String javaTypeForProperty(SchemaProperty sProp)
    {
        // The type to use is the XML object....
        if (sProp.getJavaTypeCode() == SchemaProperty.XML_OBJECT)
        {
            SchemaType sType = sProp.javaBasedOnType();
            return findJavaType(sType).replace('$', '.');
        }

        switch (sProp.getJavaTypeCode())
        {
            case SchemaProperty.JAVA_BOOLEAN:
                return "boolean";
            case SchemaProperty.JAVA_FLOAT:
                return "float";
            case SchemaProperty.JAVA_DOUBLE:
                return "double";
            case SchemaProperty.JAVA_BYTE:
                return "byte";
            case SchemaProperty.JAVA_SHORT:
                return "short";
            case SchemaProperty.JAVA_INT:
                return "int";
            case SchemaProperty.JAVA_LONG:
                return "long";

            case SchemaProperty.JAVA_BIG_DECIMAL:
                return "java.math.BigDecimal";
            case SchemaProperty.JAVA_BIG_INTEGER:
                return "java.math.BigInteger";
            case SchemaProperty.JAVA_STRING:
                return "java.lang.String";
            case SchemaProperty.JAVA_BYTE_ARRAY:
                return "byte[]";
            case SchemaProperty.JAVA_GDATE:
                return "org.apache.xmlbeans.GDate";
            case SchemaProperty.JAVA_GDURATION:
                return "org.apache.xmlbeans.GDuration";
            case SchemaProperty.JAVA_DATE:
                return "java.util.Date";
            case SchemaProperty.JAVA_QNAME:
                return "javax.xml.namespace.QName";
            case SchemaProperty.JAVA_LIST:
                return "java.util.List";
            case SchemaProperty.JAVA_CALENDAR:
                return "java.util.Calendar";

            case SchemaProperty.JAVA_ENUM:
                SchemaType sType = sProp.javaBasedOnType();
                if (sType.getSimpleVariety() == SchemaType.UNION)
                    sType = sType.getUnionCommonBaseType();
                assert sType.getBaseEnumType() != null;
                return findJavaType(sType.getBaseEnumType()).replace('$', '.') + ".Enum";

            case SchemaProperty.JAVA_OBJECT:
                return "java.lang.Object";

            default:
View Full Code Here

Examples of org.apache.xmlbeans.SchemaType

            emit("void remove" + propertyName + "(int i);");
        }
    }

    String getAtomicRestrictionType(SchemaType sType) {
        SchemaType pType = sType.getPrimitiveType();
        switch (pType.getBuiltinTypeCode())
        {
            case SchemaType.BTC_ANY_SIMPLE:
                return "org.apache.xmlbeans.impl.values.XmlAnySimpleTypeImpl";
            case SchemaType.BTC_BOOLEAN:
                return "org.apache.xmlbeans.impl.values.JavaBooleanHolderEx";
View Full Code Here

Examples of org.apache.xmlbeans.SchemaType

            sType = sType.getBaseType();
        return sType;
    }

    String getBaseClass(SchemaType sType) {
        SchemaType baseType = findBaseType(sType.getBaseType());

        switch (sType.getSimpleVariety())
        {
            case SchemaType.NOT_SIMPLE:
                // non-simple-content: inherit from base type impl
                if (!XmlObject.type.equals(baseType))
                    return baseType.getFullJavaImplName();
                return "org.apache.xmlbeans.impl.values.XmlComplexContentImpl";

            case SchemaType.ATOMIC:
                // We should only get called for restrictions
                assert(! sType.isBuiltinType());
View Full Code Here

Examples of org.apache.xmlbeans.SchemaType

                // there is a simple type restriction.  So property getters need to
                // be implemented "from scratch" for each derived complex type
                // Moreover, attribute or element properties can be removed via restriction,
                // but we still need to implement them because this class is supposed to
                // also implement all the interfaces
                SchemaType baseType = sType.getBaseType();
                List extraProperties = null;
                while (!baseType.isSimpleType() && !baseType.isBuiltinType())
                {
                    SchemaProperty[] baseProperties = baseType.getDerivedProperties();
                    for (int i = 0; i < baseProperties.length; i++)
                        if (!(baseProperties[i].isAttribute() &&
                                sType.getAttributeProperty(baseProperties[i].getName()) != null))
                        {
                            if (extraProperties == null)
                                extraProperties = new ArrayList();
                            extraProperties.add(baseProperties[i]);
                        }
                    baseType = baseType.getBaseType();
                }

                properties = sType.getProperties();
                if (extraProperties != null)
                {
View Full Code Here

Examples of org.apache.xmlbeans.SchemaType

        // We have to see if this is redefined, because if it is we have
        // to include all properties associated to its supertypes
        QName name = sType.getName();
        if (name != null && name.equals(sType.getBaseType().getName()))
        {
            SchemaType sType2 = sType.getBaseType();
            // Walk all the redefined types and record any properties
            // not present in sType, because the redefined types do not
            // have a generated class to represent them
            SchemaProperty[] props = sType.getDerivedProperties();
            Map propsByName = new LinkedHashMap();
            for (int i = 0; i < props.length; i++)
                propsByName.put(props[i].getName(), props[i]);
            while (sType2 != null && name.equals(sType2.getName()))
            {
                props = sType2.getDerivedProperties();
                for (int i = 0; i < props.length; i++)
                    if (!propsByName.containsKey(props[i].getName()))
                        propsByName.put(props[i].getName(), props[i]);
                sType2 = sType2.getBaseType();
            }
            return (SchemaProperty[]) propsByName.values().toArray(new SchemaProperty[0]);
        }
        else
            return sType.getDerivedProperties();
View Full Code Here

Examples of org.apache.xmlbeans.SchemaType

            assignGlobalJavaNames(allSeenTypes);

        // now fully javaize everything deeply.
        for (int i = 0; i < allSeenTypes.size(); i++)
        {
            SchemaType gType = (SchemaType)allSeenTypes.get(i);
            if (javaize)
            {
                javaizeType((SchemaTypeImpl)gType);
                String className = gType.getFullJavaName();
                if (className != null)
                    state.addClassname(className.replace('$', '.'), gType);
            }
            else
                skipJavaizingType((SchemaTypeImpl)gType);
            allSeenTypes.addAll(Arrays.asList(gType.getAnonymousTypes()));
            // We need to javaize the anonymous types defined inside redefined types
            // since redefined type do not get a Java class of their own.
            // The exception is complex types derived by restriction, since in this case
            // anonymous types are not inherited
            addAnonymousTypesFromRedefinition(gType, allSeenTypes);
View Full Code Here

Examples of org.apache.xmlbeans.SchemaType

                    sImpl = (SchemaTypeImpl) sImpl.getBaseEnumType();
                }
                else
                {
                    SchemaStringEnumEntry[] entryArray = new SchemaStringEnumEntry[enumVals.length];
                    SchemaType basedOn = sImpl.getBaseEnumType();
                    if (basedOn == sImpl)
                    {
                        Set usedNames = new HashSet();
                        for (int i = 0; i < enumVals.length; i++)
                        {
                            String val = enumVals[i].getStringValue();

                            entryArray[i] = new SchemaStringEnumEntryImpl(val, i + 1, pickConstantName(usedNames, val));
                        }
                    }
                    else
                    {
                        for (int i = 0; i < enumVals.length; i++)
                        {
                            String val = enumVals[i].getStringValue();
                            entryArray[i] = basedOn.enumEntryForString(val);
                        }
                    }
                    sImpl.setStringEnumEntries(entryArray);
                }
            }
View Full Code Here

Examples of org.codehaus.xfire.wsdl.SchemaType

        MessagePartInfo part = info.addMessagePart(name, XmlSchemaElement.class);
        part.setIndex(index);
        part.setSchemaElement(globalElement);
        part.setWrappedType(type);
       
        SchemaType st = getBindingProvider().getSchemaType(schemaType, service);
        part.setSchemaType(st);
    }
View Full Code Here

Examples of org.geotools.gce.imagemosaic.catalog.index.SchemaType

        final String _coverageName = coverageName.toString();
        // get the coverage definition for this variable, at this stage this exists otherwise we would have skipped it!
        final Coverage coverage = ancillaryFileManager.coveragesMapping.get(_coverageName);
       
        // now check the schema creation
        SchemaType schema = coverage.getSchema();
        String schemaDef=schema!=null?schema.getAttributes():null;
       
        // no schema was defined yet, let's create a default one
        if (schema == null||schema.getAttributes()==null) {
            // TODO incapsulate in coveragedescriptor
            schemaDef = suggestSchemaFromCoordinateSystem(coverage, coordinateSystem);
           
            //set the schema name to be the coverageName
            ancillaryFileManager.setSchema(coverage,coverage.getName(),schemaDef);  
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.