Package org.apache.ws.jaxme.generator.impl

Examples of org.apache.ws.jaxme.generator.impl.GeneratorImpl


      + "    <xs:complexType>\n"
      + "      <xs:group ref='params' maxOccurs='unbounded'/>\n"
      + "    </xs:complexType>\n"
      + "  </xs:element>\n"
      + "</xs:schema>";
    Generator g = new GeneratorImpl();
    g.setProperty("jaxme.package.name", "org.apache.ws.jaxme.test.jira.jaxme63");
    SchemaReader sr = new JAXBSchemaReader();
    g.setSchemaReader(sr);
    sr.setGenerator(g);
    SchemaSG schema = g.getSchemaReader().parse(new InputSource(new StringReader(xml)));
    try {
      schema.generate();
      fail("Expected exception");
    } catch (SAXException e) {
      assertTrue(e.getMessage().indexOf("Model groups with maxOccurs > 1 are not yet supported.") != -1);
View Full Code Here


            File outputDir = new File(configuration.getOutputLocation(), "src");

            JAXBSchemaReader reader = new JAXBSchemaReader();
            reader.setSupportingExtensions(true);

            GeneratorImpl generator = new GeneratorImpl();
            generator.setTargetDirectory(outputDir);
            generator.setForcingOverwrite(false);
            generator.setSchemaReader(reader);

            for (int i = 0; i < xmlObjectsVector.size(); i++) {
                SchemaSG sg = generator.generate((InputSource) xmlObjectsVector.elementAt(i));
                ObjectSG[] elements = sg.getElements();
                for (int j = 0; j < elements.length; j++) {
                    XsQName qName = elements[j].getName();
                    JavaQName name = elements[j].getClassContext().getXMLInterfaceName();
                    mapper.addTypeMappingName(new QName(qName.getNamespaceURI(), qName.getLocalName()),
View Full Code Here

                    new File(configuration.getOutputLocation(), configuration.getSourceLocation());

            JAXBSchemaReader reader = new JAXBSchemaReader();
            reader.setSupportingExtensions(true);

            GeneratorImpl generator = new GeneratorImpl();
            generator.setTargetDirectory(outputDir);
            generator.setForcingOverwrite(false);
            generator.setSchemaReader(reader);

            for (int i = 0; i < xmlObjectsVector.size(); i++) {
                SchemaSG sg = generator.generate((InputSource)xmlObjectsVector.elementAt(i));
                ObjectSG[] elements = sg.getElements();
                for (int j = 0; j < elements.length; j++) {
                    XsQName qName = elements[j].getName();
                    JavaQName name = elements[j].getClassContext().getXMLInterfaceName();
                    mapper.addTypeMappingName(
View Full Code Here

    isource.setSystemId(pSystemId);
    return r.parse(isource);
  }

  protected JAXBSchemaReader getSchemaReader() {
      Generator generator = new GeneratorImpl();
      JAXBSchemaReader r = new JAXBSchemaReader();
      generator.setSchemaReader(r);
      r.setGenerator(generator);
      return r;
  }
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.generator.impl.GeneratorImpl

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.