Examples of JAXBGlobalBindings


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

  public JAXBJavaType[] getJAXBJavaTypes(SchemaSG pController) {
    XSSchema schema = getXSSchema();
    if (schema instanceof JAXBSchema) {
      JAXBSchema jaxbSchema = (JAXBSchema) schema;
      JAXBGlobalBindings globalBindings = jaxbSchema.getJAXBGlobalBindings();
      if (globalBindings != null) {
        return globalBindings.getJavaType();
      }
    }
    return new JAXBJavaType[0];
  }
View Full Code Here

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

  public XsQName[] getTypesafeEnumBase(SchemaSG pController) {
    XSSchema schema = getXSSchema();
    if (schema instanceof JAXBSchema) {
      JAXBSchema jaxbSchema = (JAXBSchema) schema;
      JAXBGlobalBindings globalBindings = jaxbSchema.getJAXBGlobalBindings();
      if (globalBindings != null) {
        return globalBindings.getTypesafeEnumBase();
      }
    }
    return new XsQName[]{XSNCName.getInstance().getName()};
  }
View Full Code Here

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

  public void validate() throws SAXException {
    if (isValidated()) {
      return;
    }
    super.validate();
    JAXBGlobalBindings gBindings = (JAXBGlobalBindings) XSUtil.getSingleAppinfo(getAnnotations(), JAXBGlobalBindings.class);
    globalBindings = gBindings == null ?
      ((JAXBXsObjectFactory) getXsESchema().getObjectFactory()).newJAXBGlobalBindings(getXsESchema()) : gBindings;
  }
View Full Code Here

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

    JAXBParser parser = newJAXBParser();
    InputSource isource = new InputSource(new StringReader(schemaSource));
    isource.setSystemId("testPurchaseOrder.xsd");
    JAXBSchema schema = (JAXBSchema) parser.parse(isource);
    JAXBGlobalBindings globalBindings = schema.getJAXBGlobalBindings();
    assertNotNull(globalBindings);

    XSType[] schemaTypes = schema.getTypes();
    assertNotNull(schemaTypes);
    assertEquals(4, schemaTypes.length);
View Full Code Here

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

   
    JAXBParser parser = newJAXBParser();
    InputSource isource = new InputSource(new StringReader(schemaSource));
    isource.setSystemId("testGlobalBindingsDefaults.xsd");
    JAXBSchema schema = (JAXBSchema) parser.parse(isource);
    JAXBGlobalBindings globalBindings = schema.getJAXBGlobalBindings();
    String collectionType = globalBindings.getCollectionType();
    assertNull(collectionType);
    JAXBJavaType[] javaTypes = globalBindings.getJavaType();
    assertNotNull(javaTypes);
    assertEquals(0, javaTypes.length);
    XsQName[] typesafeEnumBase = globalBindings.getTypesafeEnumBase();
    assertNotNull(typesafeEnumBase);
    assertEquals(1, typesafeEnumBase.length);
    XsQName qName = typesafeEnumBase[0];
    assertEquals(XSNCName.getInstance().getName(), qName);
    boolean bindingStyleModelGroup = globalBindings.isBindingStyleModelGroup();
    assertTrue(!bindingStyleModelGroup);
    boolean choiceContentProperty = globalBindings.isChoiceContentProperty();
    assertTrue(!choiceContentProperty);
    boolean enableFailFastCheck = globalBindings.isEnableFailFastCheck();
    assertTrue(!enableFailFastCheck);
    boolean enableJavaNamingConventions = globalBindings.isEnableJavaNamingConventions();
    assertTrue(enableJavaNamingConventions);
    boolean fixedAttributeAsConstantProperty = globalBindings.isFixedAttributeAsConstantProperty();
    assertTrue(!fixedAttributeAsConstantProperty);
    boolean generateIsSetMethod = globalBindings.isGenerateIsSetMethod();
    assertTrue(!generateIsSetMethod);
    JAXBGlobalBindings.UnderscoreBinding underscoreBinding = globalBindings.getUnderscoreBinding();
    assertEquals(JAXBGlobalBindings.UnderscoreBinding.AS_WORD_SEPARATOR, underscoreBinding);
  }
View Full Code Here

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

   
    JAXBParser parser = newJAXBParser();
    InputSource isource = new InputSource(new StringReader(schemaSource));
    isource.setSystemId("testGlobalBindingsDefaults.xsd");
    JAXBSchema schema = (JAXBSchema) parser.parse(isource);
    JAXBGlobalBindings globalBindings = schema.getJAXBGlobalBindings();
    String collectionType = globalBindings.getCollectionType();
    assertEquals("java.util.ArrayList", collectionType);
 
    XsQName[] typesafeEnumBase = globalBindings.getTypesafeEnumBase();
    assertNotNull(typesafeEnumBase);
    assertEquals(2, typesafeEnumBase.length);
    XsQName qName = typesafeEnumBase[0];
    assertEquals(qName, XSString.getInstance().getName());
    qName = typesafeEnumBase[1];
    assertEquals(qName, XSNCName.getInstance().getName());
 
    boolean bindingStyleModelGroup = globalBindings.isBindingStyleModelGroup();
    assertTrue(bindingStyleModelGroup);
 
    boolean choiceContentProperty = globalBindings.isChoiceContentProperty();
    assertTrue(choiceContentProperty);
 
    boolean enableFailFastCheck = globalBindings.isEnableFailFastCheck();
    assertTrue(enableFailFastCheck);
 
    boolean enableJavaNamingConventions = globalBindings.isEnableJavaNamingConventions();
    assertTrue(!enableJavaNamingConventions);
 
    boolean fixedAttributeAsConstantProperty = globalBindings.isFixedAttributeAsConstantProperty();
    assertTrue(fixedAttributeAsConstantProperty);
 
    boolean generateIsSetMethod = globalBindings.isGenerateIsSetMethod();
    assertTrue(generateIsSetMethod);
 
    JAXBGlobalBindings.UnderscoreBinding underscoreBinding = globalBindings.getUnderscoreBinding();
    assertEquals(JAXBGlobalBindings.UnderscoreBinding.AS_CHAR_IN_WORD, underscoreBinding);
 
    JAXBJavaType[] javaTypes = globalBindings.getJavaType();
    assertNotNull(javaTypes);
    assertEquals(0, javaTypes.length);
  }
View Full Code Here

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

  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.JAXBGlobalBindings

  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.JAXBGlobalBindings

  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.JAXBGlobalBindings

  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
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.