Example #1
0
  /** @return the TrianaClient for the specified task (null if unknown) */
  public static TrianaClient getTrianaClientFor(Task task) {
    TaskGraph parent;

    if (task instanceof TaskGraph) {
      parent = (TaskGraph) task;
    } else {
      parent = task.getParent();
    }

    TrianaClient client = null;

    while ((parent != null) && (client == null)) {
      client = app.getTrianaClient(parent);

      if (client == null) {
        parent = parent.getParent();
      }
    }

    return client;
  }