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

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


    assertTrue(items.isGlobalType());
    assertTrue(items.isComplex());
    ComplexTypeSG itemsComplex = items.getComplexTypeSG();
    assertTrue(!itemsComplex.hasSimpleContent());
    ComplexContentSG itemsComplexContent = itemsComplex.getComplexContentSG();
    GroupSG group = itemsComplexContent.getRootParticle().getGroupSG();
    assertTrue(group.isSequence());
    // Items.item
    ParticleSG[] itemsChildren = group.getParticles();
    assertEquals(1, itemsChildren.length);
    ParticleSG item = itemsChildren[0];
    assertTrue(item.isElement());
    assertEquals(new XsQName((String) null, "item"), item.getObjectSG().getName());
    assertEquals(0, item.getMinOccurs());
View Full Code Here


    if (attributes != null) {
      allChilds.addAll(Arrays.asList(attributes));
    }
    if (!pTypeSG.hasSimpleContent()) {
      ComplexContentSG cct = pTypeSG.getComplexContentSG();
      GroupSG groupSG = cct.getGroupSG();
      ParticleSG[] childs = groupSG.getParticles();
      if (childs != null) {
        for (int i = 0;  i < childs.length;  i++) {
          ParticleSG child = childs[i];
          // Accept only simple elements
          if (child.isElement()) {
View Full Code Here

        if (typeSG == null) {
          throw new IllegalStateException("TypeSG not created");
        }
        types.add(typeSG);
      } else if (o instanceof XSGroup) {
        GroupSG groupSG = pController.getGroup(((XSType) o).getName());
        if (groupSG == null) {
          throw new IllegalStateException("GroupSG not created");
        }
        groups.add(groupSG);
      } else if (o instanceof XSElement) {
View Full Code Here

  public GroupSG[] getGroups(SchemaSG pController) throws SAXException {
    return groupsByOrder;
  }

  public GroupSG getGroup(SchemaSG pController, XsQName pName) throws SAXException {
    GroupSG groupSG = (GroupSG) groupsByName.get(pName);
    if (groupSG != null) {
      return groupSG;
    }
    XSGroup group = getXSSchema().getGroup(pName);
    if (group == null) {
View Full Code Here

    }

    if (pController.hasSimpleContent()) {
      pController.getSimpleContentSG().getPropertySG().generate(pSource);
    } else {
      GroupSG groupSG = pController.getComplexContentSG().getGroupSG();
      if (groupSG != null) { // Check required, in case the element doesn't have any childs
        groupSG.generateProperties(pSource);
      }
    }   
  }
View Full Code Here

    JavaSource js = jsf.newJavaSource(qName, JavaSource.PUBLIC);
    js.setType(JavaSource.INTERFACE);

    generateProperties(pController, js);
    if (!pController.hasSimpleContent()) {
      GroupSG groupSG = pController.getComplexContentSG().getGroupSG();
      if (groupSG != null) { // Check required, in case the element doesn't have any childs
        groupSG.generateXMLInterfaceSubclasses(js);
      }
    }
    log.finest(mName, "<-", js.getQName());
    return js;
  }
View Full Code Here

    JavaSource js = pSource.newJavaInnerClass(qName.getClassName(), JavaSource.PUBLIC);
    js.setType(JavaSource.INTERFACE);

    generateProperties(pController, js);
    if (!pController.hasSimpleContent()) {
      GroupSG groupSG = pController.getComplexContentSG().getGroupSG();
      if (groupSG != null) { // Check required, in case the element doesn't have any childs
        groupSG.generateXMLInterfaceSubclasses(js);
      }
    }
    log.finest(mName, "<-", js.getQName());
    return js;
  }
View Full Code Here

    JavaSource js = jsf.newJavaSource(pController.getClassContext().getXMLImplementationName(), JavaSource.PUBLIC);
    js.addImplements(pController.getClassContext().getXMLInterfaceName());

    generateProperties(pController, js);
    if (!pController.hasSimpleContent()) {
      GroupSG groupSG = pController.getComplexContentSG().getGroupSG();
      if (groupSG != null) { // Check required, in case the element doesn't have any childs
        groupSG.generateXMLImplementationSubclasses(js);
      }
    }
    log.finest(mName, "<-", js.getQName());
    return js;
  }
View Full Code Here

    js.setStatic(true);
    js.addImplements(pController.getClassContext().getXMLInterfaceName());

    generateProperties(pController, js);
    if (!pController.hasSimpleContent()) {
      GroupSG groupSG = pController.getComplexContentSG().getGroupSG();
      if (groupSG != null) { // Check required, in case the element doesn't have any childs
        groupSG.generateXMLImplementationSubclasses(js);
      }
    }
    log.finest(mName, "<-", js.getQName());
    return js;
  }
View Full Code Here

  public void generateXMLInterfaceMethods(ComplexTypeSG pController, JavaSource pSource) throws SAXException {
    generateProperties(pController, pSource);
    if (pController.hasSimpleContent()) {
      pController.getSimpleContentSG().getPropertySG().generate(pSource);
    } else {
      GroupSG groupSG = pController.getComplexContentSG().getGroupSG();
      groupSG.generateXMLInterfaceSubclasses(pSource);
    }
  }
View Full Code Here

TOP

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

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.