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

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


      if (qName != null) {
        names.add(qName);
      }
    }
    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


      throws SAXException {
    ComplexTypeSG ctSG = pType.getComplexTypeSG();
    if (ctSG.hasSimpleContent()) {
      return; // No elements contained
    }
    ComplexContentSG ccSG = ctSG.getComplexContentSG();
    if (ccSG.isEmpty()) {
      return;
    }
    GroupSG group = ccSG.getGroupSG();
    generateCreateMethods(pJs, group.getParticles(), pName, pContextSet);
  }
View Full Code Here

    assertEquals(new XsQName((String) null, "c"), e3.getName());
    TypeSG t3 = e3.getTypeSG();
    assertTrue(t3.isComplex());
    ComplexTypeSG ct3 = t3.getComplexTypeSG();
    assertTrue(!ct3.hasSimpleContent());
    ComplexContentSG cct3 = ct3.getComplexContentSG();
    ParticleSG[] childs = cct3.getRootParticle().getGroupSG().getParticles();
    assertEquals(2, childs.length);
    assertTrue(childs[0].isElement());
    ObjectSG child1 = childs[0].getObjectSG();
    assertEquals(new XsQName((String) null, "a"), child1.getName());
    assertTrue(childs[1].isElement());
View Full Code Here

    assertEquals(new XsQName((String) null, "Items"), items.getName());
    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];
View Full Code Here

   */
  public void walk(ComplexTypeSG pType) throws SAXException {
    if (pType.hasSimpleContent()) {
      visitor.simpleContent(pType);
    } else {
      ComplexContentSG ccSG = pType.getComplexContentSG();
      if (ccSG.isEmpty()) {
        visitor.emptyType(pType);
      } else {
        visitor.startComplexContent(pType);
        walkGroup(ccSG.getRootParticle().getGroupSG());
        visitor.endComplexContent(pType);
      }
    }
  }
View Full Code Here

      throws SAXException {
    ComplexTypeSG ctSG = pType.getComplexTypeSG();
    if (ctSG.hasSimpleContent()) {
      return; // No elements contained
    }
    ComplexContentSG ccSG = ctSG.getComplexContentSG();
    if (ccSG.isEmpty()) {
      return;
    }
    ParticleSG particle = ccSG.getRootParticle();
    generateCreateMethods(pJs, particle, pName, pContextSet);
  }
View Full Code Here

                   JavaSource pJs)
      throws SAXException {
    if (pController.hasSimpleContent()) {
      return new SimpleContentHandlerSG(pController, pJs);
    } else {
      ComplexContentSG ccSG = pController.getComplexContentSG();
      if (ccSG.isEmpty()) {
        return new EmptyElementHandlerSG(pController, pJs);
      } else {
        GroupSG group = ccSG.getRootParticle().getGroupSG();
        if (group.isSequence()) {
          return new SequenceHandlerSG(pController, pJs);
        } else if (group.isChoice()) {
          return new ChoiceHandlerSG(pController, pJs);
        } else if (group.isAll()) {
View Full Code Here

    assertEquals(new XsQName((String) null, "c"), e3.getName());
    TypeSG t3 = e3.getTypeSG();
    assertTrue(t3.isComplex());
    ComplexTypeSG ct3 = t3.getComplexTypeSG();
    assertTrue(!ct3.hasSimpleContent());
    ComplexContentSG cct3 = ct3.getComplexContentSG();
    ParticleSG[] childs = cct3.getGroupSG().getParticles();
    assertEquals(2, childs.length);
    assertTrue(childs[0].isElement());
    ObjectSG child1 = childs[0].getObjectSG();
    assertEquals(new XsQName((String) null, "a"), child1.getName());
    assertTrue(childs[1].isElement());
View Full Code Here

    assertEquals(new XsQName((String) null, "Items"), items.getName());
    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];
View Full Code Here

  private BeanSG newBeanSG(ComplexTypeSG pController, JavaSource pJs)
      throws SAXException {
    if (pController.hasSimpleContent()) {
      return new SimpleContentBeanSG(pController, pJs);
    } else {
      ComplexContentSG ccSG = pController.getComplexContentSG();
      if (ccSG.isEmpty()) {
        return new EmptyElementBeanSG(pController, pJs);
      } else {
        GroupSG group = ccSG.getGroupSG();
        if (group.isAll()) {
          return new AllBeanSG(pController, pJs);
        } else if (group.isChoice()) {
          return new ChoiceBeanSG(pController, pJs);
        } else if (group.isSequence()) {
View Full Code Here

TOP

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

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.