public Esb(org.w3c.dom.Node esb) {
   this.uuid = "oryx_" + UUID.randomUUID().toString();
   NamedNodeMap attributes = esb.getAttributes();
   this.name = JpdlToJson.getAttribute(attributes, "name");
   this.category = JpdlToJson.getAttribute(attributes, "category");
   this.service = JpdlToJson.getAttribute(attributes, "service");
   this.bounds = JpdlToJson.getBounds(attributes.getNamedItem("g"));
   // TODO add part
 }
  public StartEvent(org.w3c.dom.Node startEvent) {
    this.uuid = "oryx_" + UUID.randomUUID().toString();
    NamedNodeMap attributes = startEvent.getAttributes();
    this.name = JpdlToJson.getAttribute(attributes, "name");
    this.bounds = JpdlToJson.getBounds(attributes.getNamedItem("g"));

    this.bounds.setUlx(this.bounds.getUlx() + 9);
    this.bounds.setUly(this.bounds.getUly() + 9);
    this.bounds.setWidth(30);
    this.bounds.setHeight(30);
  }
Exemple #3
0
  public And(org.w3c.dom.Node and) {
    this.uuid = "oryx_" + UUID.randomUUID().toString();
    NamedNodeMap attributes = and.getAttributes();
    this.name = JpdlToJson.getAttribute(attributes, "name");
    this.bounds = JpdlToJson.getBounds(attributes.getNamedItem("g"));

    this.bounds.setUlx(this.bounds.getUlx() + 4);
    this.bounds.setUly(this.bounds.getUly() + 4);
    this.bounds.setWidth(40);
    this.bounds.setHeight(40);
  }
Exemple #4
0
  @Override
  public JSONObject toJson() throws JSONException {
    JSONObject stencil = new JSONObject();
    stencil.put("id", "AND_Gateway");

    JSONArray outgoing = JpdlToJson.getTransitions(outgoings);

    JSONObject properties = new JSONObject();
    properties.put("bgcolor", "#ffffff");
    if (name != null) properties.put("name", name);

    JSONArray childShapes = new JSONArray();

    return JpdlToJson.createJsonObject(
        uuid, stencil, outgoing, properties, childShapes, bounds.toJson());
  }
Exemple #5
0
  @Override
  public JSONObject toJson() throws JSONException {
    JSONObject stencil = new JSONObject();
    stencil.put("id", "Task");

    JSONArray outgoing = JpdlToJson.getTransitions(outgoings);

    JSONObject properties = new JSONObject();
    properties.put("bgcolor", "#ffffcc");
    if (name != null) properties.put("name", name);
    if (assignee != null) properties.put("assignee", assignee);
    if (candidateGroups != null) properties.put("candidate-groups", candidateGroups);
    if (candidateUsers != null) properties.put("candidate-users", candidateUsers);
    if (swimlane != null) properties.put("swimlane", swimlane);

    JSONArray childShapes = new JSONArray();

    return JpdlToJson.createJsonObject(
        uuid, stencil, outgoing, properties, childShapes, bounds.toJson());
  }
  @Override
  public JSONObject toJson() throws JSONException {
    JSONObject stencil = new JSONObject();
    stencil.put("id", "hql");

    JSONArray outgoing = JpdlToJson.getTransitions(outgoings);

    JSONObject properties = new JSONObject();
    properties.put("bgcolor", "#ffffcc");
    if (name != null) properties.put("name", name);
    if (var != null) properties.put("var", var);
    if (unique != null) properties.put("unique", unique.toString());
    if (query != null) properties.put("query", query);
    if (parameters != null) properties.put("parameters", parameters.toJson());

    JSONArray childShapes = new JSONArray();

    return JpdlToJson.createJsonObject(
        uuid, stencil, outgoing, properties, childShapes, bounds.toJson());
  }
  @Override
  public JSONObject toJson() throws JSONException {
    JSONObject stencil = new JSONObject();
    stencil.put("id", "esb");

    JSONArray outgoing = JpdlToJson.getTransitions(outgoings);

    JSONObject properties = new JSONObject();
    properties.put("bgcolor", "#ffffcc");
    if (name != null) properties.put("name", name);
    if (category != null) properties.put("category", category);
    if (service != null) properties.put("service", service);

    // TODO add parts

    JSONArray childShapes = new JSONArray();

    return JpdlToJson.createJsonObject(
        uuid, stencil, outgoing, properties, childShapes, bounds.toJson());
  }
Exemple #8
0
  public Task(org.w3c.dom.Node task) {
    this.uuid = "oryx_" + UUID.randomUUID().toString();
    NamedNodeMap attributes = task.getAttributes();
    this.name = JpdlToJson.getAttribute(attributes, "name");
    this.assignee = JpdlToJson.getAttribute(attributes, "assignee");
    this.candidateGroups = JpdlToJson.getAttribute(attributes, "candidate-groups");
    this.candidateUsers = JpdlToJson.getAttribute(attributes, "candidate-users");
    this.swimlane = JpdlToJson.getAttribute(attributes, "swimlane");

    this.bounds = JpdlToJson.getBounds(attributes.getNamedItem("g"));
  }