Examples of TypeSG


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

    List objects = new ArrayList();
    for (int i = 0;  i < childs.length;  i++) {
      Object o = childs[i];
      log.finest(mName, "Child" + o);
      if (o instanceof XSType) {
        TypeSG typeSG = pController.getType(((XSType) o).getName());
        if (typeSG == null) {
          throw new IllegalStateException("TypeSG not created");
        }
        types.add(typeSG);
      } else if (o instanceof XSGroup) {
View Full Code Here

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

    objectsByOrder = (ObjectSG[]) objects.toArray(new ObjectSG[objects.size()]);
    log.finest(mName, "<-");
  }

  public TypeSG getType(SchemaSG pController, XsQName pName) throws SAXException {
    TypeSG typeSG = (TypeSG) typesByName.get(pName);
    if (typeSG != null) {
      return typeSG;
    }
    XSType type = getXSSchema().getType(pName);
    if (type == null) {
View Full Code Here

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

      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();

      JavaQName resultName = complexTypeSG.getClassContext().getXMLInterfaceName();
      String className = resultName.getClassName();
      String methodName = "create" + Character.toUpperCase(className.charAt(0)) + className.substring(1);
      JavaMethod createMethod = js.newJavaMethod(methodName, resultName, "public");
View Full Code Here

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

      PropertySG pSG = pController.getPropertySG();
      boolean hasIsSetMethod = pSG.hasIsSetMethod();
      if (hasIsSetMethod) {
        pMethod.addIf(pSG.getXMLIsSetMethodName(), "()");
      }
      TypeSG typeSG = pController.getObjectSG().getTypeSG();
      Object v = pController.getPropertySG().getValue(pElement);
      if (typeSG.isComplex()) {
        pSGlet.generate(pMethod, v);
      } else {
        typeSG.getSimpleTypeSG().forAllValues(pMethod, v, pSGlet);
      }
      if (hasIsSetMethod) {
        pMethod.addEndIf();
      }
    } else {
View Full Code Here

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

    super(pFactory, pSchema, pType);
    unionType = pType.getSimpleType().getUnionType();
    XSType[] mTypes = unionType.getMemberTypes();
    List members = new ArrayList();
    for (int i = 0;  i < mTypes.length;  i++) {
      TypeSG typeSG = getFactory().getTypeSG(mTypes[i], pClassContext, pName);
      typeSG.getSimpleTypeSG().setNullable(true);
      members.add(typeSG);
    }
    memberTypes = (TypeSG[]) members.toArray(new TypeSG[members.size()]);

    unionTypeSG = new UnionTypeSG(){
View Full Code Here

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

    return new JAXBSchemaSG(pController, pSchema);
  }

  public TypeSG getTypeSG(SGFactory pController, XSType pType) throws SAXException {
    final String mName = "getTypeSG(XSType)";
    TypeSG result = (TypeSG) types.get(pType);
    if (result == null) {
      log.finest(mName, "->", pType.getName());
      TypeSGChain chain = (TypeSGChain) pController.newTypeSG(pType);
      result = new TypeSGImpl(chain);
      types.put(pType, result);
      typesByOrder.add(result);
      result.init();
      log.finest(mName, "<-", new Object[]{chain, result});
    }
    return result;
  }
View Full Code Here

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

  public TypeSG getTypeSG(SGFactory pController, XSType pType, Context pClassContext, XsQName pName) throws SAXException {
    final String mName = "getTypeSG(XSType,ClassContext)";
    log.finest(mName, "->", new Object[]{pType, pClassContext});
    TypeSGChain chain = (TypeSGChain) pController.newTypeSG(pType, pClassContext, pName);
    TypeSG result = new TypeSGImpl(chain);
    typesByOrder.add(result);
    result.init();
    log.finest(mName, "<-", new Object[]{chain, result});
    return result;
  }
View Full Code Here

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

    return new JAXBTypeSG(pController, schemaSG, pType, pName);
  }

  public TypeSG getTypeSG(SGFactory pController, XSType pType, XsQName pName) throws SAXException {
    TypeSGChain chain = (TypeSGChain) pController.newTypeSG(pType, pName);
    TypeSG result = new TypeSGImpl(chain);
    typesByOrder.add(result);
    result.init();
    return result;
  }
View Full Code Here

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

    JavaSourceFactory jsf = getSchema().getJavaSourceFactory();
    JavaSource js = jsf.newJavaSource(xmlInterfaceName, JavaSource.PUBLIC);
    js.setType(JavaSource.INTERFACE);
    js.addExtends(Element.class);

    TypeSG myTypeSG = pController.getTypeSG();
    ComplexTypeSG complexTypeSG = myTypeSG.getComplexTypeSG();
    if (myTypeSG.isGlobalClass()) {
      js.addExtends(complexTypeSG.getClassContext().getXMLInterfaceName());
      // No need to generate the types XML interface; this is done by the schema
    } else {
      complexTypeSG.generateXMLInterfaceMethods(js);
    }
View Full Code Here

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

    JavaSourceFactory jsf = getSchema().getJavaSourceFactory();
    JavaSource js = jsf.newJavaSource(xmlImplementationName, JavaSource.PUBLIC);
    js.addImplements(pController.getClassContext().getXMLInterfaceName());
    js.addImplements(JMElement.class);

    TypeSG myTypeSG = pController.getTypeSG();
    ComplexTypeSG complexTypeSG = myTypeSG.getComplexTypeSG();
    if (myTypeSG.isGlobalClass()) {
      js.addExtends(complexTypeSG.getClassContext().getXMLImplementationName());
      // No need to generate the types XML implementation; this is done by the schema.
    } else {
      complexTypeSG.generateXMLImplementationMethods(js);
    }
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.