Examples of TypeSG


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

            if (result == null) {
                if (!simpleType.isRestriction()) {
                    throw new SAXParseException("Atomic type must be either a builtin or a restriction of another atomic type",
                                                pType.getLocator());
                }
                TypeSG type = pSchema.getType(simpleType.getRestrictedType().getName());
                runtimeType = type.getSimpleTypeSG().getRuntimeType();
                result = newAtomicTypeRestriction(pController, pFactory, pSchema, pType);
            } else {
                SimpleTypeSG simpleTypeSG = new SimpleTypeSGImpl(result);
                simpleTypeSG.init();
              runtimeType = simpleTypeSG.getRuntimeType();
View Full Code Here

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

    for (Iterator iter = pColumns;  iter.hasNext()) {
      Column col = (Column) iter.next();
      CustomColumnData colData = (CustomColumnData) col.getCustomData();
      Object sg = colData.getSG();
      PropertySG propertySG;
      TypeSG typeSG;
      if (sg instanceof AttributeSG) {
        AttributeSG attrSG = (AttributeSG) sg;
        propertySG = attrSG.getPropertySG();
        typeSG = attrSG.getTypeSG();
      } else if (sg instanceof ParticleSG) {
View Full Code Here

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

    for (Iterator iter = pColumns;  iter.hasNext()) {
      Column col = (Column) iter.next();
      CustomColumnData colData = (CustomColumnData) col.getCustomData();
      Object sg = colData.getSG();
      PropertySG propertySG;
      TypeSG typeSG;
      if (sg instanceof AttributeSG) {
        AttributeSG attrSG = (AttributeSG) sg;
        propertySG = attrSG.getPropertySG();
        typeSG = attrSG.getTypeSG();
      } else if (sg instanceof ParticleSG) {
View Full Code Here

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

    for (Node node = root.getFirstChild();  node != null;  node = node.getNextSibling()) {
      if (node.getNodeType() == Node.ELEMENT_NODE
          &&  JAXBContextImpl.CONFIGURATION_URI.equals(node.getNamespaceURI())
          &&  "Manager".equals(node.getLocalName())) {
        final ObjectSG objectSG = (ObjectSG) iter.next();
        final TypeSG typeSG = objectSG.getTypeSG();
        if (typeSG.isComplex()) {
          final CustomTableData customTableData = (CustomTableData) typeSG.getProperty(jdbcSG.getKey());
          if (customTableData != null) {
            Element manager = (Element) node;
            final Context ctx = typeSG.getComplexTypeSG().getClassContext();
            manager.setAttributeNS(uri, "pmClass", ctx.getPMName().toString());

            final TableDetails tableDetails = customTableData.getTableDetails();
            final String driver = tableDetails.getDriver();
            if (driver != null) {
View Full Code Here

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

    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);
        }
      }
    }
    log.finest(mName, "<-");
  }
View Full Code Here

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

    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.TypeSG

    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);
            jm.addLine("super.init(", pData, ");");
          }

          String f = particle.getPropertySG().getXMLFieldName();
          String handlerFieldName = "__handler_" + f;
          String handlerMethodName = getXMLHandlersMethodName(particle.getPropertySG());

          JavaField jf = pSource.newJavaField(handlerFieldName, JMHandler.class, JavaSource.PRIVATE);
          JavaMethod jm2 = pSource.newJavaMethod(handlerMethodName, JMHandler.class, "protected");
          jm2.addThrows(SAXException.class);
          jm2.addIf(handlerFieldName, " == null");
         
          ComplexTypeSG childSG = typeSG.getComplexTypeSG();
          JavaQName interfaceName = childSG.getClassContext().getXMLInterfaceName();
          JavaQName handlerClassName = childSG.getClassContext().getXMLHandlerName();
          jm2.addTry();
          if (typeSG.isGlobalClass()) {
            jm2.addLine(handlerFieldName, " = getData().getFactory().getJMHandler(",
                        interfaceName, ".class);");
          } else {
            jm2.addLine(jf, " = new ", handlerClassName, "();");
          }
View Full Code Here

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

    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;
      JavaQName type;
      if (childType.isComplex()) {
        type = childType.getComplexTypeSG().getClassContext().getXMLInterfaceName();
        v = new Object[]{pHandlerVar, ".getResult()"};
      } else {
        type = null;
        v = new Object[]{"(", String.class, ") ", pHandlerVar, ".getResult()"};
        Object castedValue = childType.getSimpleTypeSG().getCastFromString(jm, v, "getData()");
        if (v == castedValue) {
          v = new Object[]{pHandlerVar, ".getResult()"};
          type = JavaQNameImpl.getInstance(String.class);
        } else {
          v = castedValue;
View Full Code Here

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

    ParticleSG[] myParticles = pController.getParticles();
    for (int i = 0;  i < particles.length;  i++) {
      ParticleSG particle = myParticles[i];
      if (particle.isElement()) {
        ObjectSG elementSG = particle.getObjectSG();
        TypeSG typeSG = elementSG.getTypeSG();
        if (!typeSG.isGlobalType()  &&  typeSG.isComplex()) {
          ComplexTypeSG complexTypeSG = typeSG.getComplexTypeSG();
          complexTypeSG.getXMLInterface(pSource);
        }
      } else if (particle.isGroup()) {
        // TODO: Implement groups referencing groups
        throw new LocSAXException("Nested groups are yet unsupported", particle.getLocator());
View Full Code Here

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

    ParticleSG[] myParticles = pController.getParticles();
    for (int i = 0;  i < particles.length;  i++) {
      ParticleSG particle = myParticles[i];
      if (particle.isElement()) {
        ObjectSG elementSG = particle.getObjectSG();
        TypeSG typeSG = elementSG.getTypeSG();
        if (!typeSG.isGlobalType()  &&  typeSG.isComplex()) {
          ComplexTypeSG complexTypeSG = typeSG.getComplexTypeSG();
          complexTypeSG.getXMLImplementation(pSource);
        }
      } else if (particle.isGroup()) {
        // TODO: Implement groups referencing groups
        throw new LocSAXException("Nested groups are yet unsupported", particle.getLocator());
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.