uk.org.taverna.scufl2.api.core.Workflow.getName()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中uk.org.taverna.scufl2.api.core.Workflow.getName()方法的一些代码示例,展示了Workflow.getName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Workflow.getName()方法的具体详情如下:
包路径:uk.org.taverna.scufl2.api.core.Workflow
类名称:Workflow
方法名:getName

Workflow.getName介绍

暂无

代码示例

代码示例来源:origin: uk.org.taverna.platform/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.getChildReports()) {
    result = Math.max(result, processorReport.getSubject().getName().length());
    for (ActivityReport activityReport : processorReport.getChildReports()) {
      for (WorkflowReport nestedWorkflowReport : activityReport.getChildReports()) {
        result = Math.max(result, getLongestName(nestedWorkflowReport, level + 1));
      }
    }
  }
  return result;
}

代码示例来源:origin: uk.org.taverna.platform/taverna-report-api

public String toString() {
  DateFormat dateFormat = new SimpleDateFormat(dateFormatString);
  StringBuilder sb = new StringBuilder();
  int max = getLongestName(this, 0);
  sb.append(spaces(max + 1));
  sb.append("Status    ");
  sb.append("Queued    ");
  sb.append("Started   ");
  sb.append("Complete  ");
  sb.append("Errors    ");
  sb.append("Started             ");
  sb.append("Finished\n");
  sb.append(getSubject().getName());
  sb.append(spaces(max - getSubject().getName().length() + 1));
  sb.append(getState());
  sb.append(spaces(10 - getState().name().length()));
  sb.append("-");
  sb.append(spaces(9));
  sb.append("-");
  sb.append(spaces(9));
  sb.append("-");
  sb.append(spaces(9));
  sb.append("-");
  sb.append(spaces(9));
  addDates(sb, getStartedDate(), getCompletedDate(), dateFormat);
  for (ProcessorReport processorReport : getChildReports()) {
    addProcessor(sb, max, 0, processorReport, dateFormat);
  }
  return sb.toString();
}

代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api

@Test
public void workflow() throws Exception {
  Workflow wf = new Workflow();
  UUID uuid = UUID.fromString(wf.getName());
  assertEquals(4, uuid.version());
}

代码示例来源:origin: uk.org.taverna.scufl2/scufl2-rdfxml

String path = WORKFLOW + uriTools.validFilename(wf.getName()) + RDF;
    uriTools.validFilename(wf.getName()) + REVISIONS + RDF;
addRevisions(wf, path, wfBundle);

代码示例来源:origin: uk.org.taverna.scufl2/scufl2-rdfxml

} else {
  logger.warning("Can't find bundle URI for workflow document "
      + wf.getName());

代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api

@Test
public void readBundleStream() throws Exception {
  InputStream inputStream = new ByteArrayInputStream(
      getStructureFormatWorkflowBundle().getBytes("utf-8"));
  WorkflowBundle wfBundle = bundleIO.readBundle(inputStream,
      TEXT_VND_TAVERNA_SCUFL2_STRUCTURE);
  assertEquals("HelloWorld", wfBundle.getName());
  assertEquals("HelloWorld", wfBundle.getMainWorkflow().getName());
  assertTrue(wfBundle.getMainWorkflow().getProcessors()
      .containsName("Hello"));
}

代码示例来源:origin: uk.org.taverna.databundle/databundle

@Ignore
@Test
public void getWorkflowBundle() throws Exception {
  WorkflowBundleIO wfBundleIO = new WorkflowBundleIO();
  WorkflowBundle wfBundle = wfBundleIO.createBundle();
  
  String name = wfBundle.getName();
  String wfName = wfBundle.getMainWorkflow().getName();
  URI id = wfBundle.getIdentifier();
  
  DataBundles.setWorkflowBundle(dataBundle, wfBundle);
  // Reload the bundle
  wfBundle = DataBundles.getWorkflowBundle(dataBundle);        
  assertEquals(name, wfBundle.getName());
  assertEquals(wfName, wfBundle.getMainWorkflow().getName());        
  assertEquals(id, wfBundle.getIdentifier());        
}

代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api

@Test
public void readBundleFile() throws Exception {
  File bundleFile = tempFile();
  FileUtils.writeStringToFile(bundleFile,
      getStructureFormatWorkflowBundle(),
      UTF_8);
  WorkflowBundle wfBundle = bundleIO.readBundle(bundleFile,
      TEXT_VND_TAVERNA_SCUFL2_STRUCTURE);
  assertEquals("HelloWorld", wfBundle.getName());
  assertEquals("HelloWorld", wfBundle.getMainWorkflow().getName());
  assertTrue(wfBundle.getMainWorkflow().getProcessors()
      .containsName("Hello"));
}

代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api

@Test
public void cloneWorkflow() throws Exception {
  Workflow original = originalWfBundle.getMainWorkflow();
  assertEquals(originalWfBundle, original.getParent());
  Workflow clone = (Workflow) original.clone();
  assertNull(clone.getParent());
  assertEquals(original.getName(), clone.getName());
  assertNotSame(original.getProcessors().getByName("Hello"), clone
      .getProcessors().getByName("Hello"));
  assertNotSame(original.getCurrentRevision(), clone.getCurrentRevision());
  assertEquals(original.getCurrentRevision(), clone.getCurrentRevision());
}

代码示例来源:origin: uk.org.taverna.scufl2/scufl2-rdfxml

wf = (Workflow) node;
workflow.setAbout("");
workflow.setName(wf.getName());

代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api

newLine(3);
append("Processor");
String name = " '" + escapeName(pb.getBoundProcessor().getParent().getName());
name = name + ":" + escapeName(pb.getBoundProcessor().getName()) + "'";
append(name);

代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api

@Test
public void createBundle() throws Exception {
  WorkflowBundle wb = bundleIO.createBundle();
  assertEquals(wb, wb.getMainWorkflow().getParent());
  assertEquals(wb, wb.getMainProfile().getParent());
  assertEquals("bundle1", wb.getName());
  assertEquals("workflow1", wb.getMainWorkflow().getName());
  assertEquals("profile1", wb.getMainProfile().getName());
  assertNotNull(wb.getCurrentRevision());
  assertNotNull(wb.getMainWorkflow().getCurrentRevision());
  assertNotNull(wb.getMainProfile().getCurrentRevision());
}

相关文章