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

Examples of org.apache.ws.jaxme.generator.sg.impl.JAXBSchemaReader


*/
public class ParserTest extends BaseTestCase {
  public ParserTest(String arg) { super(arg); }

  protected SchemaSG parse(String pSchema, String pSystemId) throws Exception {
    JAXBSchemaReader r = getSchemaReader();
    InputSource isource = new InputSource(new StringReader(pSchema));
    isource.setSystemId(pSystemId);
    return r.parse(isource);
  }
View Full Code Here


    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

          "  <xs:attribute name='id' type='xs:ID'/>\n" +
          "</xs:schema>\n";

      InputSource isource = new InputSource(new StringReader(schemaSpec));
      isource.setSystemId("jira46.xsd");
      JAXBSchemaReader r = getSchemaReader();
      XSParser parser = r.getSGFactory().newXSParser();
      parser.setValidating(false);
      XSSchema schema = parser.parse(isource);
      XSAttribute[] attrs = schema.getAttributes();
      assertEquals(1, attrs.length);
      XSAttribute idAttr = attrs[0];
View Full Code Here

        System.err.println("Additional instances of " + SGFactoryChain.class.getName()
                           + " may be specified only, if the schema reader is an instance of "
                           + JAXBSchemaReader.class.getName());
        System.exit(1);
      }
      JAXBSchemaReader jsr = (JAXBSchemaReader) sr;
      for (int i = 0;  i < sgFactoryChains.size();  i++) {
        jsr.addSGFactoryChain((Class) sgFactoryChains.get(i));
      }
    }

    if (target != null) {
      g.setTargetDirectory(new File(target));
View Full Code Here

  public SchemaReader getSchemaReader() {
    if (schemaReader == null) {
      if (isExtension()) {
        return new JaxMeSchemaReader();
      } else {
        return new JAXBSchemaReader();
      }
    } else {
      return (SchemaReader) schemaReader.getInstance(SchemaReader.class);
    }
  }
View Full Code Here

//                xmlObjectsVector.add(new InputSource(new StringReader(s)));
//            }

            File outputDir = 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);
View Full Code Here

//                xmlObjectsVector.add(new InputSource(new StringReader(s)));
//            }

            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);
View Full Code Here

   * "org.apache.ws.jaxme.generator.sg.impl.JaxMeSchemaReader" (a subclass of JAXBSchemaReader
   * with JaxMe specific extensions).</p>
   */
  public SchemaReader getSchemaReader() {
    if (schemaReader == null) {
      return new JAXBSchemaReader();
    } else {
      return (SchemaReader) schemaReader.getInstance(SchemaReader.class);
    }
  }
View Full Code Here

public class ParserTest extends BaseTestCase {
  public ParserTest(String arg) { super(arg); }

  protected SchemaSG parse(String pSchema, String pSystemId) throws Exception {
    Generator generator = new GeneratorImpl();
    JAXBSchemaReader r = new JAXBSchemaReader();
    generator.setSchemaReader(r);
    r.setGenerator(generator);
    InputSource isource = new InputSource(new StringReader(pSchema));
    isource.setSystemId(pSystemId);
    return r.parse(isource);
  }
View Full Code Here

   * "org.apache.ws.jaxme.generator.sg.impl.JaxMeSchemaReader" (a subclass of JAXBSchemaReader
   * with JaxMe specific extensions).</p>
   */
  public SchemaReader getSchemaReader() {
    if (schemaReader == null) {
      return new JAXBSchemaReader();
    } else {
      return (SchemaReader) schemaReader.getInstance(SchemaReader.class);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.generator.sg.impl.JAXBSchemaReader

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.