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

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


    } else {
      ComplexContentSG ccSG = pController.getComplexContentSG();
      if (ccSG.isEmpty()) {
        return new EmptyElementHandlerSG(pController, pJs);
      } else {
        GroupSG group = ccSG.getGroupSG();
        if (group.isSequence()) {
          return new SequenceHandlerSG(pController, pJs);
        } else if (group.isChoice()) {
          return new ChoiceHandlerSG(pController, pJs);
        } else if (group.isAll()) {
          return new AllHandlerSG(pController, pJs);
        } else {
          throw new IllegalStateException("Invalid group type");
        }
      }
View Full Code Here


    jc.addLine("The current state. The following values are valid states:");
    jc.addLine(" 0 = Before parsing the element");
    for (int i = 0;  i < particles.length;  i++) {
      ParticleSG particle = particles[i];
      if (particle.isGroup()) {
        GroupSG group = particle.getGroupSG();
        if (group.isGlobal()) {
          jc.addLine(" " + getState(i) + " = While parsing the nested group " + group.getName());
        } else {
          jc.addLine(" " + getState(i) + " = While parsing the nested group " + GroupUtil.getGroupName(group));
        }
      } else if (particle.isElement()) {
        jc.addLine(" " + getState(i) + " = While or after parsing the child element " + particle.getObjectSG().getName());
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

  private void findGroups(ParticleSG[] pParticles) throws SAXException {
    for (int i = 0;  i < pParticles.length;  i++) {
      ParticleSG particle = pParticles[i];
      if (particle.isGroup()) {
        GroupSG group = particle.getGroupSG();
        if (!groups.containsKey(group)) {
          GroupDriverSG driver = newGroupDriverSG(group);
          groups.put(group, driver);
        }
      }
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(((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

                     String pName, Set pContextSet)
      throws SAXException {
    for (int i = 0;  i < pParticles.length;  i++) {
      ParticleSG particle = pParticles[i];
      if (particle.isGroup()) {
        GroupSG group = particle.getGroupSG();
        generateCreateMethods(pJs, group.getParticles(), pName, pContextSet);
      } else if (particle.isElement()) {
        ObjectSG oSG = particle.getObjectSG();
        if (oSG.isGlobal()) {
          continue// Will be generated elsewhere
        }
View Full Code Here

    }
    ComplexContentSG ccSG = ctSG.getComplexContentSG();
    if (ccSG.isEmpty()) {
      return;
    }
    GroupSG group = ccSG.getGroupSG();
    generateCreateMethods(pJs, group.getParticles(), pName, pContextSet);
  }
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.