Examples of ObjectSG


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

    for (int i = 0;  i < myParticles.length;  i++) {
      ParticleSG particle = myParticles[i];
      if (!particle.isElement()) {
        continue;
      }
      ObjectSG child = particle.getObjectSG();
      if (!child.getTypeSG().isComplex()) {
        continue;
      }
      if (jm == null) {
        jm = pSource.newJavaMethod("init", JavaQNameImpl.VOID, JavaSource.PUBLIC);
        pFactory = jm.addParam(JAXBContextImpl.class, "pFactory");
        jm.addLine("super.init(", pFactory, ");");
        jm.addThrows(JAXBException.class);
      }
      String serializerName = getXMLSerializersFieldName(particle.getPropertySG());
      Context myClassContext = child.getTypeSG().getComplexTypeSG().getClassContext();
      JavaQName serializerClass = myClassContext.getXMLSerializerName();
      JavaField jf = pSource.newJavaField(serializerName, serializerClass, JavaSource.PRIVATE);
      JavaQName elementInterface = myClassContext.getXMLInterfaceName();
      if (child.getTypeSG().isGlobalClass()) {
        jm.addLine(jf, " = (", serializerClass, ") ", pFactory, ".getJMXmlSerializer(", elementInterface, ".class);");
      } else {
        jm.addLine(jf, " = new ", serializerClass, "();");
      }
      jm.addLine(jf, ".init(pFactory);");
View Full Code Here

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

    getXMLSerializersMarshalChildsMethod(pController, pSource);
    ParticleSG[] myParticles = pController.getParticles();
    for (int i = 0;  i < myParticles.length;  i++) {
      ParticleSG particle = myParticles[i];
      if (particle.isElement()) {
        ObjectSG objectSG = particle.getObjectSG();
        TypeSG typeSG = objectSG.getTypeSG();
        if (typeSG.isComplex()  &&  !typeSG.isGlobalClass()) {
          typeSG.getComplexTypeSG().getXMLSerializer(pSource);
        }
      }
    }
View Full Code Here

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

  private void getXMLHandlersElements(GroupSG pController, JavaSource pSource) throws SAXException {
    ParticleSG[] myParticles = pController.getParticles();
    for (int i = 0;  i < myParticles.length;  i++) {
      ParticleSG particle = myParticles[i];
      if (particle.isElement()) {
        ObjectSG objectSG = particle.getObjectSG();
        TypeSG typeSG = objectSG.getTypeSG();
        if (typeSG.isComplex()  &&  !typeSG.isGlobalClass()) {
          typeSG.getComplexTypeSG().getXMLHandler(pSource);
        }
      }
    }
View Full Code Here

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

    DirectAccessible pData = null;
    ParticleSG[] myParticles = pController.getParticles();
    for (int i = 0;  i < myParticles.length;  i++) {
      ParticleSG particle = myParticles[i];
      if (particle.isElement()) {
        ObjectSG objectSG = particle.getObjectSG();
        TypeSG typeSG = objectSG.getTypeSG();
        if (typeSG.isComplex()) {
          if (jm == null) {
            jm = pSource.newJavaMethod("init", JavaQNameImpl.VOID, JavaSource.PUBLIC);
            pData = jm.addParam(JMHandler.Data.class, "pData");
            jm.addThrows(JAXBException.class);
View Full Code Here

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

    LocalJavaField element = jm.newJavaField(elementInterface);
    element.addLine("(", elementInterface, ") getResult()");
    jm.addSwitch(pStateVar);
    for (int i = 0;  i < myParticles.length;  i++) {
      ParticleSG child = myParticles[i];
      ObjectSG osg = child.getObjectSG();
      TypeSG childType = osg.getTypeSG();
      jm.addCase(Integer.toString(3+i));
      jm.addIf(pHandlerVar, " != null");
      jm.addLine(pHandlerVar, ".endDocument();");
      jm.addEndIf();
      Object v;
View Full Code Here

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

        if (groupSG == null) {
          throw new IllegalStateException("GroupSG not created");
        }
        groups.add(groupSG);
      } else if (o instanceof XSElement) {
        ObjectSG objectSG = pController.getElement(((XSElement) o).getName());
        if (objectSG == null) {
          throw new IllegalStateException("ObjectSG not created");
        }
        objects.add(objectSG);
        elements.add(objectSG);
View Full Code Here

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

  public ObjectSG[] getObjects(SchemaSG pController) throws SAXException {
    return objectsByOrder;
  }

  public ObjectSG getElement(SchemaSG pController, XsQName pName) throws SAXException {
    ObjectSG objectSG = (ObjectSG) elementsByName.get(pName);
    if (objectSG != null) {
      return objectSG;
    }
    XSElement element = getXSSchema().getElement(pName);
    if (element == null) {
View Full Code Here

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

    for (Iterator iter = pContextList.iterator();  iter.hasNext()) {
      Object o = iter.next();
      if (!(o instanceof ObjectSG)) {
        continue;
      }
      ObjectSG objectSG = (ObjectSG) o;
      TypeSG typeSG = objectSG.getTypeSG();
      if (!typeSG.isComplex()) {
        continue;
      }
      ComplexTypeSG complexTypeSG = typeSG.getComplexTypeSG();
View Full Code Here

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

    }
    return new JAXBObjectSG(pController, schemaSG, pElement);
  }

  public ObjectSG getObjectSG(SGFactory pController, XSElement pElement) throws SAXException {
    ObjectSG result = (ObjectSG) objects.get(pElement);
    if (result == null) {
      ObjectSGChain chain = (ObjectSGChain) pController.newObjectSG(pElement);
      result = new ObjectSGImpl(chain);
      objects.put(pElement, result);
      objectsByOrder.add(result);
      result.init();
    }
    return result;
  }
View Full Code Here

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

    return new JAXBObjectSG(pController, schemaSG, pElement, pContext);
  }

  public ObjectSG getObjectSG(SGFactory pController, XSElement pElement, Context pContext) throws SAXException {
    ObjectSGChain chain = (ObjectSGChain) pController.newObjectSG(pElement, pContext);
    ObjectSG result = new ObjectSGImpl(chain);
    result.init();
    return result;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.