Package org.geotools.maven.xmlcodegen

Examples of org.geotools.maven.xmlcodegen.SchemaGenerator


     
        Object[] arguments = (Object[]) argument;
        Schema schema = (Schema) arguments[0];
        String prefix = (String) arguments[1];
        prefix = prefix.toUpperCase();
        SchemaGenerator sg = (SchemaGenerator) arguments[2];
        List<AttributeType> types = sg.sort();

    stringBuffer.append(TEXT_2);
   
        Map<String, String> ns2import = new HashMap<String, String>();
        for (Schema imported : sg.getImports()) {
            String fullClassName = imported.getClass().getName();
            String className = fullClassName.substring(fullClassName.lastIndexOf(".")+1);
            ns2import.put(imported.getURI(), className);

    stringBuffer.append(TEXT_3);
    stringBuffer.append(fullClassName);
    stringBuffer.append(TEXT_4);
   
        }

    stringBuffer.append(TEXT_5);
    stringBuffer.append(prefix);
    stringBuffer.append(TEXT_6);
   
        Map<Name, String> typeBindings = sg.getTypeBindings();
        for (AttributeType type : types) {
            Name name = type.getName();

    stringBuffer.append(TEXT_7);
   
            XSDTypeDefinition xsdType = sg.getXSDType(type);
            StringWriter writer = new StringWriter();

            SAXTransformerFactory txFactory =
                    (SAXTransformerFactory) SAXTransformerFactory.newInstance();
            TransformerHandler xmls;
View Full Code Here

TOP

Related Classes of org.geotools.maven.xmlcodegen.SchemaGenerator

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.