Package org.jibx.schema.codegen.custom

Examples of org.jibx.schema.codegen.custom.SchemasetCustom


        return null;
    }

    @SuppressWarnings("unchecked")
    private SchemasetCustom defaultSchemasetCustom(Map<String, Element> smap) {
        SchemasetCustom customRoot = new SchemasetCustom((SchemasetCustom)null);
        Set<String> schemaIds = smap.keySet();
        for (String schemaId : schemaIds) {
            SchemaCustom schemaCustom = new SchemaCustom(customRoot);
            schemaCustom.setName(schemaId);
            schemaCustom.setForceTypes(Boolean.TRUE);
            customRoot.getChildren().add(schemaCustom);
        }
        for (ISchemaResolver r : resolvers) {
            SchemaCustom schemaCustom = new SchemaCustom(customRoot);
            schemaCustom.setName(r.getName());
            schemaCustom.setForceTypes(Boolean.TRUE);
            customRoot.getChildren().add(schemaCustom);                   
        }
        return customRoot;
    }
View Full Code Here


            codegen.setFileset(resolvers);

            // Set Customization
            String[] bindingFiles = (String[])context.get(ToolConstants.CFG_BINDING);
            SchemasetCustom customRoot;
            if (bindingFiles == null || bindingFiles.length == 0) {
                customRoot = defaultSchemasetCustom(schemaMap);
            } else {
                customRoot = SchemasetCustom.loadCustomizations(bindingFiles[0], handler);
            }
View Full Code Here

        return null;
    }

    @SuppressWarnings("unchecked")
    private SchemasetCustom defaultSchemasetCustom(Map<String, Element> smap) {
        SchemasetCustom customRoot = new SchemasetCustom((SchemasetCustom)null);
        Set<String> schemaIds = smap.keySet();
        for (String schemaId : schemaIds) {
            SchemaCustom schemaCustom = new SchemaCustom(customRoot);
            schemaCustom.setName(schemaId);
            schemaCustom.setForceTypes(Boolean.TRUE);
            schemaCustom.setNamespace(smap.get(schemaId).getAttribute("targetNamespace"));
            customRoot.getChildren().add(schemaCustom);
        }
        for (JibxSchemaResolver r : resolvers) {
            if (!schemaIds.contains(r.getId())) {
                SchemaCustom schemaCustom = new SchemaCustom(customRoot);
                schemaCustom.setName(r.getName());
                schemaCustom.setNamespace(r.getElement().getAttribute("targetNamespace"));
                schemaCustom.setForceTypes(Boolean.TRUE);
                customRoot.getChildren().add(schemaCustom);
            }
        }
        return customRoot;
    }
View Full Code Here

            codegen.setFileset(resolvers);

            // Set Customization
            String[] bindingFiles = (String[])context.get(ToolConstants.CFG_BINDING);
            SchemasetCustom customRoot;
            if (bindingFiles == null || bindingFiles.length == 0) {
                customRoot = defaultSchemasetCustom(schemaMap);
            } else {
                customRoot = SchemasetCustom.loadCustomizations(bindingFiles[0], handler);
            }
View Full Code Here

        return null;
    }

    @SuppressWarnings("unchecked")
    private SchemasetCustom defaultSchemasetCustom(Map<String, Element> smap) {
        SchemasetCustom customRoot = new SchemasetCustom((SchemasetCustom)null);
        Set<String> schemaIds = smap.keySet();
        for (String schemaId : schemaIds) {
            SchemaCustom schemaCustom = new SchemaCustom(customRoot);
            schemaCustom.setName(schemaId);
            schemaCustom.setForceTypes(Boolean.TRUE);
            schemaCustom.setNamespace(smap.get(schemaId).getAttribute("targetNamespace"));
            customRoot.getChildren().add(schemaCustom);
        }
        for (JibxSchemaResolver r : resolvers) {
            if (!schemaIds.contains(r.getId())) {
                SchemaCustom schemaCustom = new SchemaCustom(customRoot);
                schemaCustom.setName(r.getName());
                schemaCustom.setNamespace(r.getElement().getAttribute("targetNamespace"));
                schemaCustom.setForceTypes(Boolean.TRUE);
                customRoot.getChildren().add(schemaCustom);
            }
        }
        return customRoot;
    }
View Full Code Here

TOP

Related Classes of org.jibx.schema.codegen.custom.SchemasetCustom

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.