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

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


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


    for (int i = 0;  i < myAttributes.length;  i++) {
      names.add(myAttributes[i].getName());
    }
    if (!pController.hasSimpleContent()) {
      ComplexContentSG myComplexContentSG = pController.getComplexContentSG();
      GroupSG groupSG = myComplexContentSG.getGroupSG();
      if (groupSG != null) { // Check required, in case the element doesn't have any childs.
        ParticleSG[] particles = groupSG.getParticles();
        for (int i = 0;  i < particles.length;  i++) {
          if (particles[i].isElement()) {
            names.add(particles[i].getObjectSG().getName());
          }
        }
View Full Code Here

    generateXMLSerializersAttributes(pController, pSource);
    getXMLSerializersGetPreferredPrefixMethod(pController, pSource);
    if (pController.hasSimpleContent()) {
      // TODO: Implement content serialization
    } else {
      GroupSG groupSG = pController.getComplexContentSG().getGroupSG();
      if (groupSG != null) {  // Check required, in case of empty content
        groupSG.generateXMLSerializersElements(pSource);
      }
    }
  }
View Full Code Here

    getXMLHandlersNewResultMethod(pController, pSource);
    getXMLHandlersStartElementMethod(pController, pSource, levelVar);
    if (pController.hasSimpleContent()) {
      // TODO: Implement content serialization
    } else {
      GroupSG groupSG = pController.getComplexContentSG().getGroupSG();
      if (groupSG != null) {  // Check required, in case the element doesn't have any childs.
        groupSG.generateXMLHandlersElements(pSource, levelVar);
      }
    }
  }
View Full Code Here

  public Generator getGenerator(SGFactory pController) {
    return generator;
  }

  public GroupSG getGroupSG(SGFactory pController, XSGroup pGroup) throws SAXException {
    GroupSG result = (GroupSG) groups.get(pGroup);
    if (result == null) {
      result = pController.newGroupSG(pGroup);
      groups.put(pGroup, result);
      groupsByOrder.add(result);
      result.init();
    }
    return result;
  }
View Full Code Here

    }
    return new GroupSGImpl(new JAXBGroupSG(pController, schemaSG, pGroup));
  }

  public GroupSG getGroupSG(SGFactory pController, XSGroup pGroup, Context pClassContext) throws SAXException {
    GroupSG result = pController.newGroupSG(pGroup, pClassContext);
    result.init();
    groupsByOrder.add(result);
    return result;
  }
View Full Code Here

    assertTrue(items.isGlobalType());
    assertTrue(items.isComplex());
    ComplexTypeSG itemsComplex = items.getComplexTypeSG();
    assertTrue(!itemsComplex.hasSimpleContent());
    ComplexContentSG itemsComplexContent = itemsComplex.getComplexContentSG();
    GroupSG group = itemsComplexContent.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.getRootParticle().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(((XSGroup) 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

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.