/**
   * Sets a reference to input data
   *
   * @param parameterID ID of the input element
   * @param value reference URL
   * @param schema schema if applicable otherwise null
   * @param encoding encoding if applicable (typically not), otherwise null
   * @param mimetype mimetype of the input according to the process description. has to be set
   */
  public void addComplexDataReference(
      String parameterID, String value, String schema, String encoding, String mimetype) {
    InputDescriptionType inputDesc = getParameterDescription(parameterID);
    if (inputDesc == null) {
      throw new IllegalArgumentException("inputDesription is null for: " + parameterID);
    }
    if (inputDesc.getComplexData() == null) {
      throw new IllegalArgumentException(
          "inputDescription is not of type complexData: " + parameterID);
    }

    InputType input = execute.getExecute().getDataInputs().addNewInput();
    input.addNewIdentifier().setStringValue(parameterID);
    input.addNewReference().setHref(value);
    if (schema != null) {
      input.getReference().setSchema(schema);
    }

    if (encoding != null) {
      input.getReference().setEncoding(encoding);
    }
    if (mimetype != null) {
      input.getReference().setMimeType(mimetype);
    }
  }