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

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


    AttributeSG[] attributes = pTypeSG.getAttributes();
    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
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

    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

      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

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.