Package com.sun.tools.txw2

Examples of com.sun.tools.txw2.XmlSchemaLoader


            l.merge(simpleType(st.getMember(i)));
        return l;
    }

    public Leaf listSimpleType(XSListSimpleType st) {
        return new List(st.getLocator(),simpleType(st.getItemType()));
    }
View Full Code Here


    public Leaf makeOptional(Leaf leaf, LocatorImpl locator, AnnotationsImpl annotations) throws BuildException {
        return leaf.merge(new Empty(locator));
    }

    public Leaf makeList(Leaf leaf, LocatorImpl locator, AnnotationsImpl annotations) throws BuildException {
        return new List(locator,leaf);
    }
View Full Code Here

        return new Main(opts).run();
    }

    private int run() {
        try {
            NodeSet ns = opts.source.build(opts);
            ns.write(opts);
            opts.codeModel.build(opts.codeWriter);
            return 0;
        } catch (IOException e) {
            opts.errorListener.error(new SAXParseException(e.getMessage(),null,e));
            return 1;
View Full Code Here

    private final Grammar grammar = new Grammar();

    private XmlSchemaBuilder(XSSchemaSet xs,TxwOptions opts) {
        this.schemaSet = xs;
        grammar.addChild(new Empty(null));
        this.nodeSet = new NodeSet(opts,grammar);
        this.dtf = new DatatypeFactory(opts.codeModel);
    }
View Full Code Here

        DatatypeLibraryLoader loader = new DatatypeLibraryLoader(getClass().getClassLoader());
        Leaf pattern = (Leaf)parseable.parse(new CheckingSchemaBuilder(stage1,options.errorListener,
            new CascadingDatatypeLibraryFactory(
                new BuiltinDatatypeLibraryFactory(loader),loader)));

        return new NodeSet(options,pattern);
    }
View Full Code Here

            def = grammar.get(mg.getName()); // TODO: name collision detection and avoidance
            modelGroups.put(mg,def);

            def.addChild(mg.getModelGroup().apply(this));
        }
        return new Ref(mg.getLocator(),def);
    }
View Full Code Here

                def.addChild(ct.getContentType().apply(this));
                attHolder(ct, def);
            }
        }

        return new Ref(ct.getLocator(),def);
    }
View Full Code Here

        if(def==null) {
            def = grammar.get(ag.getName());
            attGroups.put(ag,def);
            attHolder(ag,def);
        }
        return new Ref(ag.getLocator(),def);
    }
View Full Code Here

    GrammarImpl(Scope<Leaf,ParsedElementAnnotation,LocatorImpl,AnnotationsImpl,CommentListImpl> scope) {
        super(scope,new com.sun.tools.txw2.model.Grammar());
    }

    public Leaf endGrammar(LocatorImpl locator, AnnotationsImpl annotations) throws BuildException {
        return new Ref(locator,grammar,com.sun.tools.txw2.model.Grammar.START);
    }
View Full Code Here

    public Leaf makeParentRef(String name, LocatorImpl locator, AnnotationsImpl annotations) throws BuildException {
        return parent.makeRef(name,locator,annotations);
    }

    public Leaf makeRef(String name, LocatorImpl locator, AnnotationsImpl annotations) throws BuildException {
        return new Ref(locator,grammar,name);
    }
View Full Code Here

TOP

Related Classes of com.sun.tools.txw2.XmlSchemaLoader

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.