Examples of JAXBSchema


Examples of org.apache.ws.jaxme.xs.jaxb.JAXBSchema

      "</xs:schema>\n";

    JAXBParser parser = newJAXBParser();
    InputSource isource = new InputSource(new StringReader(schemaSource));
    isource.setSystemId("testJAXBJavaType1.xsd");
    JAXBSchema schema = (JAXBSchema) parser.parse(isource);
    XSType a = schema.getType(new XsQName((String) null, "a"));
    JAXBSimpleType ast = (JAXBSimpleType) assertSimpleType(a);
    JAXBJavaType ajjt = ast.getJAXBJavaType();
    assertEquals("java.math.BigDecimal", ajjt.getName());
    assertEquals("javax.xml.bind.DatatypeConverter.parseInteger", ajjt.getParseMethod());
    assertEquals("javax.xml.bind.DatatypeConverter.printInteger", ajjt.getPrintMethod());
    assertTrue(!ajjt.hasNsContext());

    XSElement b = schema.getElement(new XsQName((String) null, "b"));
    XSType bt = b.getType();
    JAXBSimpleType bst = (JAXBSimpleType) assertSimpleType(bt);
    assertEquals(a, assertRestriction(bst));
    assertNull(bst.getJAXBJavaType());

    XSElement c = schema.getElement(new XsQName((String) null, "c"));
    XSType ct = c.getType();
    JAXBSimpleType cst = (JAXBSimpleType) assertSimpleType(ct);
    assertEquals(a, assertRestriction(cst));
    JAXBJavaType cjjt = cst.getJAXBJavaType();
    assertEquals("java.math.BigInteger", cjjt.getName());
View Full Code Here

Examples of org.apache.ws.jaxme.xs.jaxb.JAXBSchema

      "</xs:schema>\n";

    JAXBParser parser = newJAXBParser();
    InputSource isource = new InputSource(new StringReader(schemaSource));
    isource.setSystemId("testJAXBJavaTypesafeEnumClass1.xsd");
    JAXBSchema schema = (JAXBSchema) parser.parse(isource);
    XSType a = schema.getType(new XsQName((String) null, "a"));
    checkJAXBTypesafeEnumClass1AType(a);

    XSType b = schema.getType(new XsQName((String) null, "b"));
    checkJAXBTypesafeEnumClass1BType(b);

    XSElement[] elements = schema.getElements();
    assertEquals(1, elements.length);
    XSElement allTypesElement = elements[0];
    XSGroup allTypesGroup = assertGroup(assertComplexContent(assertComplexType(allTypesElement.getType())));
    assertSequence(allTypesGroup);
    XSParticle[] allTypesChilds = allTypesGroup.getParticles();
View Full Code Here

Examples of org.apache.ws.jaxme.xs.jaxb.JAXBSchema

      "</xs:schema>\n";

    JAXBParser parser = newJAXBParser();
    InputSource isource = new InputSource(new StringReader(schemaSource));
    isource.setSystemId("testJAXBJavaTypesafeEnumClass2.xsd");
    JAXBSchema schema = (JAXBSchema) parser.parse(isource);

    XSType[] types = schema.getTypes();
    assertEquals(7, types.length);


    XSType stringType = types[0];
    checkJAXBTypesafeEnumClass2StringType(stringType);

    XSElement[] elements = schema.getElements();
    assertEquals(1, elements.length);

    XSElement allTypesElement = elements[0];
    XSParticle allTypesElementParticle = assertComplexContent(assertComplexType(allTypesElement.getType()));
    XSGroup group = allTypesElementParticle.getGroup();
View Full Code Here

Examples of org.apache.ws.jaxme.xs.jaxb.JAXBSchema

  }

  public String getCollectionType(SchemaSG pController) {
    XSSchema schema = getXSSchema();
    if (schema instanceof JAXBSchema) {
      JAXBSchema jaxbSchema = (JAXBSchema) schema;
      JAXBGlobalBindings globalBindings = jaxbSchema.getJAXBGlobalBindings();
      if (globalBindings != null) {
        String result = globalBindings.getCollectionType();
        if (result != null) {
          return result;
        }
View Full Code Here

Examples of org.apache.ws.jaxme.xs.jaxb.JAXBSchema

  }

  public boolean isBindingStyleModelGroup(SchemaSG pController) {
    XSSchema schema = getXSSchema();
    if (schema instanceof JAXBSchema) {
      JAXBSchema jaxbSchema = (JAXBSchema) schema;
      JAXBGlobalBindings globalBindings = jaxbSchema.getJAXBGlobalBindings();
      if (globalBindings != null) {
        return globalBindings.isBindingStyleModelGroup();
      }
    }
    return false;
View Full Code Here

Examples of org.apache.ws.jaxme.xs.jaxb.JAXBSchema

  }

  public boolean isChoiceContentProperty(SchemaSG pController) {
    XSSchema schema = getXSSchema();
    if (schema instanceof JAXBSchema) {
      JAXBSchema jaxbSchema = (JAXBSchema) schema;
      JAXBGlobalBindings globalBindings = jaxbSchema.getJAXBGlobalBindings();
      if (globalBindings != null) {
        return globalBindings.isChoiceContentProperty();
      }
    }
    return false;
View Full Code Here

Examples of org.apache.ws.jaxme.xs.jaxb.JAXBSchema

  }

  public boolean isFailFastCheckEnabled(SchemaSG pController) {
    XSSchema schema = getXSSchema();
    if (schema instanceof JAXBSchema) {
      JAXBSchema jaxbSchema = (JAXBSchema) schema;
      JAXBGlobalBindings globalBindings = jaxbSchema.getJAXBGlobalBindings();
      if (globalBindings != null) {
        return globalBindings.isEnableFailFastCheck();
      }
    }
    return false;
View Full Code Here

Examples of org.apache.ws.jaxme.xs.jaxb.JAXBSchema

  }

  public boolean isJavaNamingConventionsEnabled(SchemaSG pController) {
    XSSchema schema = getXSSchema();
    if (schema instanceof JAXBSchema) {
      JAXBSchema jaxbSchema = (JAXBSchema) schema;
      JAXBGlobalBindings globalBindings = jaxbSchema.getJAXBGlobalBindings();
      if (globalBindings != null) {
        return globalBindings.isEnableJavaNamingConventions();
      }
    }
    return true;
View Full Code Here

Examples of org.apache.ws.jaxme.xs.jaxb.JAXBSchema

  }

  public boolean isFixedAttributeConstantProperty(SchemaSG pController) {
    XSSchema schema = getXSSchema();
    if (schema instanceof JAXBSchema) {
      JAXBSchema jaxbSchema = (JAXBSchema) schema;
      JAXBGlobalBindings globalBindings = jaxbSchema.getJAXBGlobalBindings();
      if (globalBindings != null) {
        return globalBindings.isFixedAttributeAsConstantProperty();
      }
    }
    return false;
View Full Code Here

Examples of org.apache.ws.jaxme.xs.jaxb.JAXBSchema

  }

  public boolean isGeneratingIsSetMethod(SchemaSG pController) {
    XSSchema schema = getXSSchema();
    if (schema instanceof JAXBSchema) {
      JAXBSchema jaxbSchema = (JAXBSchema) schema;
      JAXBGlobalBindings globalBindings = jaxbSchema.getJAXBGlobalBindings();
      if (globalBindings != null) {
        return globalBindings.isGenerateIsSetMethod();
      }
    }
    return false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.