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

Examples of org.apache.ws.jaxme.generator.sg.SchemaSG


      "  </jaxb:schemaBindings>\n" +
      " </xsd:appinfo></xsd:annotation>\n" +
      " <xsd:element name='non-positive-integer' type='xsd:nonPositiveInteger'/> \n" +
      "</xsd:schema> \n";

    SchemaSG jschema = parse(schema, "testNonPositiveInteger.xsd");

    // simple, atomic, with restriction and maxExclusive and maxInclusive
    TypeSG npi = jschema.getElements()[0].getTypeSG();
    assertTrue(!npi.isComplex());
    SimpleTypeSG npis = npi.getSimpleTypeSG();
    assertTrue(npis.isAtomic());
    assertTrue(!npis.isList());
    assertTrue(!npis.isUnion());
View Full Code Here


      "  </jaxb:schemaBindings>\n" +
      " </xsd:appinfo></xsd:annotation>\n" +
      " <xsd:element name='negative-integer' type='xsd:negativeInteger'/> \n" +
      "</xsd:schema> \n";

    SchemaSG jschema = parse(schema, "testNegativeInteger.xsd");

    // simple, atomic, with restrictions on maxInclusive and MaxExclusive
    TypeSG ni = jschema.getElements()[0].getTypeSG();
    assertTrue(!ni.isComplex());
    SimpleTypeSG nis = ni.getSimpleTypeSG();
    assertTrue(nis.isAtomic());
    assertTrue(!nis.isList());
    assertTrue(!nis.isUnion());
View Full Code Here

      "  </jaxb:schemaBindings>\n" +
      " </xsd:appinfo></xsd:annotation>\n" +
      " <xsd:element name='non-negative-integer' type='xsd:nonNegativeInteger'/> \n" +
      "</xsd:schema> \n";

    SchemaSG jschema = parse(schema, "testNonNegativeIntegerType.xsd");

    // simple, atomic, with restriction on minInclusive and minExclusive
    TypeSG nni = jschema.getElements()[0].getTypeSG();
    assertTrue(!nni.isComplex());
    SimpleTypeSG nnis = nni.getSimpleTypeSG();
    assertTrue(nnis.isAtomic());
    assertTrue(!nnis.isList());
    assertTrue(!nnis.isUnion());
View Full Code Here

      "  </jaxb:schemaBindings>\n" +
      " </xsd:appinfo></xsd:annotation>\n" +
      " <xsd:element name='positive-integer' type='xsd:positiveInteger'/> \n" +
      "</xsd:schema> \n";

    SchemaSG jschema = parse(schema, "testPositiveIntegerType.xsd");

    // simple, atomic, with restriction on minInclusive and minExclusive
    TypeSG pi = jschema.getElements()[0].getTypeSG();
    assertTrue(!pi.isComplex());
    SimpleTypeSG pis = pi.getSimpleTypeSG();
    assertTrue(pis.isAtomic());
    assertTrue(!pis.isList());
    assertTrue(!pis.isUnion());
View Full Code Here

      "  </jaxb:schemaBindings>\n" +
      " </xsd:appinfo></xsd:annotation>\n" +
      " <xsd:element name='integer' type='xsd:integer'/> \n" +
      "</xsd:schema> \n";

    SchemaSG jschema = parse(schema, "testIntegerType.xsd");

    // simple, atomic, with restriction on fractionDigits
    ObjectSG[] elements = jschema.getElements();
    TypeSG i = elements[0].getTypeSG();
    assertTrue(!i.isComplex());
    SimpleTypeSG is = i.getSimpleTypeSG();
    assertTrue(is.isAtomic());
    assertTrue(!is.isList());
View Full Code Here

      "  </jaxb:schemaBindings>\n" +
      " </xs:appinfo></xs:annotation>\n" +
      " <xs:element name='some-nmtokens' type='xs:NMTOKENS'/> \n" +
      "</xs:schema> \n";

    SchemaSG jschema = parse(schema, "testNmTokensType.xsd");

    // list of one or more nmtoken's
    ObjectSG[] elements = jschema.getElements();
    assertEquals(1, elements.length);
    TypeSG nmts = elements[0].getTypeSG();
    assertTrue(!nmts.isComplex());
    SimpleTypeSG nmtss = nmts.getSimpleTypeSG();
    assertTrue(!nmtss.isAtomic());
View Full Code Here

        "        </xs:sequence>\n" +
        "      </xs:choice>\n" +
        "    </xs:complexType>\n" +
        "  </xs:element>\n" +
        "</xs:schema>\n";
        SchemaSG schema = parse(schemaSpec, "testMultipleGroupRejected.xsd");
        try {
          schema.generate();
          fail("Expected an exception");
        } catch (SAXException e) {
          assertTrue(e.getMessage().indexOf("Model groups with maxOccurs > 1 are not yet supported.") != -1);
        }
    }
View Full Code Here

      }

      for (int i = 0;  i < schemaFiles.length;  i++) {
        log("Reading schema file " + schemaFiles[i], Project.MSG_VERBOSE);
        try {
      SchemaSG schemaSG = generator.generate(schemaFiles[i]);
          if (producesFilesSet != null) {
            JavaSourceFactory jsf = schemaSG.getJavaSourceFactory();
            File targetDirectory = getTarget();
            for (Iterator iter = jsf.getJavaSources();  iter.hasNext()) {
              JavaSource js = (JavaSource) iter.next();
              File f = jsf.getLocation(targetDirectory, js).getAbsoluteFile();
              producesFilesSet.remove(f);
View Full Code Here

    XSParser parser = factory.newXSParser();
    log.finest(mName, "Parser = " + parser + ", validating = " + getGenerator().isValidating());
    parser.setValidating(getGenerator().isValidating());
    XSSchema schema = parser.parse(pSource);
    log.finest(mName, "Schema = " + schema);
    SchemaSG result = factory.getSchemaSG(schema);
    log.finest(mName, "<-", result);
    return result;
  }
View Full Code Here

  }

  public Object newSimpleTypeSG(TypeSG pController) throws SAXException {
    final String mName = "newSimpleTypeSG";
    log.finest(mName, "->");
    SchemaSG schema = pController.getSchema();
    SimpleTypeSGChain result = newSimpleTypeSG(pController, schema.getFactory(), schema, xsType);
    log.finest(mName, "<-", result);
    return result;
  }
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.generator.sg.SchemaSG

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.