Tabnine Logo
org.apache.taverna.platform.report
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.taverna.platform.report

Best Java code snippets using org.apache.taverna.platform.report (Showing top 20 results out of 315)

origin: org.apache.taverna.engine/taverna-report-api

/**
 * Sets the date that the status changed to CANCELLED.
 *
 * @param cancelledDate
 *            the date that the status changed to CANCELLED
 */
public void setCancelledDate(Date cancelledDate) {
  this.cancelledDate = cancelledDate;
  setState(State.CANCELLED);
}
origin: org.apache.taverna.engine/taverna-report-api

public void setState(State state) {
  synchronized (reportListeners) {
    if (this.state != state) {
      State oldState = this.state;
      this.state = state;
      for (ReportListener reportListener : reportListeners)
        reportListener.stateChanged(oldState, state);
    }
  }
}
origin: org.apache.taverna.engine/taverna-run-impl

/**
 * Returns the current {@link State} of the <code>Run</code>.
 * 
 * A <code>Run</code>'s state can be CREATED, RUNNING, COMPLETED, PAUSED,
 * CANCELLED or FAILED.
 * 
 * @return the current <code>State</code> of the <code>Run</code>
 */
public State getState() {
  return workflowReport.getState();
}
origin: org.apache.taverna.engine/taverna-report-api

private int getLongestName(WorkflowReport workflowReport, int level) {
  int result = 0;
  result = Math.max(result, getSubject().getName().length() + level);
  for (ProcessorReport processorReport : workflowReport.getProcessorReports()) {
    result = Math.max(result, processorReport.getSubject().getName().length());
    for (ActivityReport activityReport : processorReport.getActivityReports()) {
      WorkflowReport nestedWorkflowReport = activityReport.getNestedWorkflowReport();
      if (nestedWorkflowReport != null)
        result = Math.max(result, getLongestName(nestedWorkflowReport, level + 1));
    }
  }
  return result;
}
origin: org.apache.taverna.engine/taverna-run-impl

  public void cancel() throws RunStateException, InvalidExecutionIdException {
    synchronized (workflowReport) {
      State state = workflowReport.getState();
      if (state.equals(CANCELLED) || state.equals(COMPLETED)
          || state.equals(FAILED))
        throw new RunStateException("Cannot cancel a " + state
            + " run.");
      executionEnvironment.getExecutionService().cancel(executionID);
      workflowReport.setCancelledDate(new Date());
    }
  }
}
origin: org.apache.taverna.engine/taverna-run-impl

public void resume() throws RunStateException, InvalidExecutionIdException {
  synchronized (workflowReport) {
    State state = workflowReport.getState();
    if (!state.equals(PAUSED))
      throw new RunStateException("Cannot resume a " + state
          + " run.");
    executionEnvironment.getExecutionService().resume(executionID);
    workflowReport.setResumedDate(new Date());
  }
}
origin: org.apache.taverna.engine/taverna-report-api

  /**
   * Get an invocation with a given name.
   * @param invocationName
   * @return
   */
  public Invocation getInvocation(String invocationName) {
    NavigableSet<Invocation> invocs = getInvocations();
    // A Comparable Invocation with the desired name
    SortedSet<Invocation> tailSet = invocs.tailSet(new Invocation(invocationName));
    if (!tailSet.isEmpty())
      return tailSet.first();
    return null;
  }
}
origin: org.apache.taverna.engine/taverna-run-impl

public void start() throws RunStateException, InvalidExecutionIdException {
  synchronized (workflowReport) {
    State state = workflowReport.getState();
    if (!state.equals(CREATED))
      throw new RunStateException("Cannot start a " + state + " run.");
    executionEnvironment.getExecutionService().start(executionID);
  }
}
origin: org.apache.taverna.engine/taverna-report-api

/**
 * Constructs a new <code>StatusReport</code> for the subject and sets the created date to the
 * current date.
 *
 * @param subject
 *            the subject of the report
 */
public StatusReport(SUBJECT subject) {
  this.subject = subject;
  setCreatedDate(new Date());
}
origin: org.apache.taverna.engine/taverna-report-api

@JsonProperty("parent")
public String getParentId() {
  if (parent == null)
    return null;
  return parent.getId();
}
origin: org.apache.taverna.engine/taverna-report-api

/**
 * Test method for {@link org.apache.taverna.platform.report.StatusReport#getSubject()}.
 */
@Test
public void testGetSubject() {
  assertNotNull(statusReport.getSubject());
  assertEquals(subject, statusReport.getSubject());
  assertEquals(subject, statusReport.getSubject());
}
origin: org.apache.taverna.engine/taverna-report-api

@Override
public String toString() {
  return "Invocation " + indexToString(index);
}
origin: org.apache.taverna.engine/taverna-report-api

/**
 * Informs the report that an output value has been added.
 * <p>
 * Any <code>ReportListener</code>s registered with this report will be notified that an output
 * value has been added.
 *
 * @param path
 *            the path that the value was added to
 * @param portName
 *            the port that the value belongs to
 * @param index
 *            the position of the value
 */
public void outputAdded(Path path, String portName, int[] index) {
  synchronized (reportListeners) {
    for (ReportListener reportListener : reportListeners)
      reportListener.outputAdded(path, portName, index);
  }
}
origin: org.apache.taverna.engine/taverna-report-api

/**
 * Sets the date that the status changed to RUNNING.
 *
 * @param startedDate
 *            the date that the status changed to RUNNING
 */
public void setStartedDate(Date startedDate) {
  if (this.startedDate == null)
    this.startedDate = startedDate;
  setState(State.RUNNING);
}
origin: org.apache.taverna.engine/taverna-report-api

@Override
public int compareTo(Invocation o) {
  String id = getId();
  String otherId = o.getId();
  if (id.length() == otherId.length())
    return id.compareTo(otherId);
  // Make "invoc5" be sorted before "invoc49"
  return id.length() - otherId.length();
}
origin: org.apache.taverna.engine/taverna-report-api

/**
 * Sets the date that the status changed to FAILED.
 *
 * @param failedDate
 *            the date that the status changed to FAILED
 */
public void setFailedDate(Date failedDate) {
  this.failedDate = failedDate;
  setState(State.FAILED);
}
origin: org.apache.taverna.engine/taverna-report-api

/**
 * Sets the date that the status was set to CREATED.
 *
 * @param createdDate
 *            the date that the status was set to CREATED
 */
public void setCreatedDate(Date createdDate) {
  this.createdDate = createdDate;
  setState(State.CREATED);
}
origin: org.apache.taverna.engine/taverna-report-api

/**
 * Sets the date that the status changed to COMPLETED.
 *
 * @param completedDate
 *            the date that the status changed to COMPLETED
 */
public void setCompletedDate(Date completedDate) {
  this.completedDate = completedDate;
  setState(State.COMPLETED);
}
origin: org.apache.taverna.engine/taverna-report-api

/**
 * Sets the date that the status last changed form PAUSED to RUNNING.
 *
 * @param resumedDate
 *            the date that the status last changed form PAUSED to RUNNING
 */
public void setResumedDate(Date resumedDate) {
  this.resumedDate = resumedDate;
  resumedDates.add(resumedDate);
  setState(State.RUNNING);
}
origin: org.apache.taverna.engine/taverna-report-api

/**
 * Sets the date that the status last changed to PAUSED.
 *
 * @param pausedDate
 *            the date that the status last changed to PAUSED
 */
public void setPausedDate(Date pausedDate) {
  this.pausedDate = pausedDate;
  pausedDates.add(pausedDate);
  setState(State.PAUSED);
}
org.apache.taverna.platform.report

Most used classes

  • ActivityReport
    Report about the State of an Activity invocation.
  • ProcessorReport
    Report about the State of a Processor invocation.
  • WorkflowReport
    Report about the State of a Workflow run.
  • Invocation
    A single invocation of a workflow, processor or activity.
  • StatusReport
    Report about the State of a workflow component.
  • ReportListener
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now