Пример #1
0
  protected void generateComplexTypeClass(Types types, Schema schema, File dir) throws IOException {
    for (ComplexType complexType : schema.getComplexTypes()) {

      if (!typeMapper.isWellKnownType(
          complexType.getSchema().getTargetNamespace(), complexType.getName())) {
        generateClassFromComplexType(types, schema, complexType, dir);
      }
    }
  }
Пример #2
0
  public String xsiType() {
    if (complexType.getBase() == null) {
      return "";
    }

    StringBuilder sb = new StringBuilder();
    sb.append("__typeMapper.writeXsiType(__out, \"");
    sb.append(complexType.getSchema().getTargetNamespace());
    sb.append("\", \"");
    sb.append(complexType.getName());
    sb.append("\");");
    return sb.toString();
  }
Пример #3
0
  public String baseClass() {
    StringBuilder sb = new StringBuilder();

    if (complexType.getBase() == null) {
      if (complexType.isHeader()) {
        sb.append("extends com.sforce.ws.bind.SoapHeaderObject ");
      } else if (getClassName().endsWith("Fault")) {
        sb.append("extends com.sforce.ws.SoapFaultException ");
      }
      sb.append("implements com.sforce.ws.bind.XMLizable");
    } else {
      sb.append("extends ").append(localJavaType(complexType.getBase(), 1, false));
    }
    return sb.toString();
  }
Пример #4
0
  public String superToString() {
    if (!complexType.hasBaseClass()) {
      return "";
    }

    return "sb.append(super.toString());";
  }
Пример #5
0
  public String superWrite() {
    if (!complexType.hasBaseClass()) {
      return "";
    }

    return "super.writeFields(__out, __typeMapper);";
  }
Пример #6
0
  public String superLoad() {
    if (!complexType.hasBaseClass()) {
      return "";
    }

    return "super.loadFields(__in, __typeMapper);";
  }
Пример #7
0
 public ComplexTypeGenerator(
     Types types,
     Schema schema,
     ComplexType complexType,
     File tempDir,
     TypeMapper typeMapper,
     boolean laxMinOccursMode) {
   super(types, schema, complexType.getName(), tempDir, typeMapper);
   this.complexType = complexType;
   this.laxMinOccursMode = laxMinOccursMode;
 }
Пример #8
0
  public Iterator<Element> getElements() {
    Collection sequence = complexType.getContent();
    Iterator<Element> it;

    if (sequence == null) {
      it = Collections.<Element>emptyList().iterator();
    } else {
      it = sequence.getElements();
    }

    return it;
  }