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

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


  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


  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

        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

    generateXMLSerializersAttributes(pController, pSource);
    getXMLSerializersGetPreferredPrefixMethod(pController, pSource);
    if (pController.hasSimpleContent()) {
        getXMLSerializersMarshalChildsMethod(pController, pSource);
    } 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);
    getXMLHandlersEndElementMethod(pController, pSource, levelVar);
    getXMLHandlersCharactersMethod(pController, pSource, levelVar);
    if (!pController.hasSimpleContent()) {
      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

    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

    jc.addLine("These are the indices, to which the child elements are");
    jc.addLine("mapped:");
    for (int i = 0;  i < particles.length;  i++) {
      ParticleSG particle = particles[i];
      if (particle.isGroup()) {
        GroupSG group = particle.getGroupSG();
        if (group.isGlobal()) {
          jc.addLine(" " + i + " = The nested group " + group.getName());
        } else {
          jc.addLine(" " + i + " = An anonymous nested group.");
        }
      } else if (particle.isElement()) {
        jc.addLine(" " + i + " = The child element " + particle.getObjectSG().getName());
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)) {
          GroupHandlerSG handler = newGroupHandlerSG(group);
          groups.put(group, handler);
        }
      } else if (particle.isElement()) {
View Full Code Here

              ".equals(", getParamLocalName(), ")");
        acceptParticle(pJm, i);
        handleStartOfChildElement(pUnmarshallerHandler, pJm, particle);
        pJm.addLine("return true;");
      } else if (particle.isGroup()) {
        GroupSG gSG = particle.getGroupSG();
        GroupHandlerSG handlerSG = getGroupHandlerSG(gSG);
        pJm.addIf(i == pFrom,
              pUnmarshallerHandler, ".testGroupParser(new ",
              handlerSG.getJavaSource().getQName(), "(), ",
              getParamNamespaceURI(), ", ", getParamLocalName(),
View Full Code Here

                                                    + ", which aren't references to "
                                                    + " a common global element, are present in a common"
                                                    + " complex type. (JAXB 1.0, 5.9.7.4.a) Use jaxb:property/@name"
                                                    + " for customization.", pController.getLocator());
                    }
                    GroupSG group = pParticle.getClosestCommonAnchestor(pParticle);
                    if (group.isSequence()) {
                        throw new SAXParseException("Multiple element particles named " + name
                                                    + " are contained in a common sequence."
                                                    + " (JAXB 1.0, 5.9.7.4.b) Use jaxb:property/@name"
                                                    + " for customization.", pController.getLocator());
                    }
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.