Package org.apache.wsif.compiler.schema.tools

Examples of org.apache.wsif.compiler.schema.tools.Schema2Java


     * Create a map of all schema simple types and there Java equivalents.
     */
    public static void createSimpleTypesMap() {
        synchronized (simpleTypesMapCreated) {
            if (!simpleTypesMapCreated.booleanValue()) {
                new Schema2Java(
                    WSIFConstants.NS_URI_1999_SCHEMA_XSD).getRegistry(
                    simpleTypesMap);
                new Schema2Java(
                    WSIFConstants.NS_URI_2000_SCHEMA_XSD).getRegistry(
                    simpleTypesMap);
                new Schema2Java(
                    WSIFConstants.NS_URI_2001_SCHEMA_XSD).getRegistry(
                    simpleTypesMap);
                simpleTypesMapCreated = new Boolean(true);
            }
        }
View Full Code Here


      }
        typeReg = new HashMap();
        List typesElList = Utils.getAllTypesElements(def);
        if (typesElList.size() > 0) {
            String schemaURI1999 = WSIFConstants.NS_URI_1999_SCHEMA_XSD;
            Schema2Java s2j1999 = new Schema2Java(schemaURI1999);
            QName qElemSchema1999 = new QName(schemaURI1999, "schema");
            String schemaURI2000 = WSIFConstants.NS_URI_2000_SCHEMA_XSD;
            Schema2Java s2j2000 = new Schema2Java(schemaURI2000);
            QName qElemSchema2000 = new QName(schemaURI2000, "schema");
            String schemaURI2001 = WSIFConstants.NS_URI_2001_SCHEMA_XSD;
            Schema2Java s2j2001 = new Schema2Java(schemaURI2001);
            QName qElemSchema2001 = new QName(schemaURI2001, "schema");

            Iterator typesElIterator = typesElList.iterator();
            while (typesElIterator.hasNext()) {
                UnknownExtensibilityElement unknExEl =
                    (UnknownExtensibilityElement) typesElIterator.next();
                Element schemaEl = unknExEl.getElement();
                try {
                    if (QNameUtils.matches(qElemSchema1999, schemaEl)
                        || QNameUtils.matches(qElemSchema2000, schemaEl)
                        || QNameUtils.matches(qElemSchema2001, schemaEl)) {
                        //Hashtable typeReg = new Hashtable();
                        if (QNameUtils.matches(qElemSchema1999, schemaEl))
                            s2j1999.createJavaMapping(schemaEl, typeReg);
                        else if (QNameUtils.matches(qElemSchema2000, schemaEl))
                            s2j2000.createJavaMapping(schemaEl, typeReg);
                        else
                            s2j2001.createJavaMapping(schemaEl, typeReg);
                    }
                } catch (Exception e) {
              Trc.ignoredException(e);
                    //ignored
                }
View Full Code Here

      }
        typeReg = new HashMap();
        List typesElList = Utils.getAllTypesElements(def);
        if (typesElList.size() > 0) {
            String schemaURI1999 = WSIFConstants.NS_URI_1999_SCHEMA_XSD;
            Schema2Java s2j1999 = new Schema2Java(schemaURI1999);
            QName qElemSchema1999 = new QName(schemaURI1999, "schema");
            String schemaURI2000 = WSIFConstants.NS_URI_2000_SCHEMA_XSD;
            Schema2Java s2j2000 = new Schema2Java(schemaURI2000);
            QName qElemSchema2000 = new QName(schemaURI2000, "schema");
            String schemaURI2001 = WSIFConstants.NS_URI_2001_SCHEMA_XSD;
            Schema2Java s2j2001 = new Schema2Java(schemaURI2001);
            QName qElemSchema2001 = new QName(schemaURI2001, "schema");

            Iterator typesElIterator = typesElList.iterator();
            while (typesElIterator.hasNext()) {
                UnknownExtensibilityElement unknExEl =
                    (UnknownExtensibilityElement) typesElIterator.next();
                Element schemaEl = unknExEl.getElement();
                try {
                    if (QNameUtils.matches(qElemSchema1999, schemaEl)
                        || QNameUtils.matches(qElemSchema2000, schemaEl)
                        || QNameUtils.matches(qElemSchema2001, schemaEl)) {
                        //Hashtable typeReg = new Hashtable();
                        if (QNameUtils.matches(qElemSchema1999, schemaEl))
                            s2j1999.createJavaMapping(schemaEl, typeReg);
                        else if (QNameUtils.matches(qElemSchema2000, schemaEl))
                            s2j2000.createJavaMapping(schemaEl, typeReg);
                        else
                            s2j2001.createJavaMapping(schemaEl, typeReg);
                    }
                } catch (Exception e) {
              Trc.ignoredException(e);
                    //ignored
                }
View Full Code Here

TOP

Related Classes of org.apache.wsif.compiler.schema.tools.Schema2Java

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.