本文整理了Java中uk.org.taverna.scufl2.api.core.Workflow.setName()
方法的一些代码示例,展示了Workflow.setName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Workflow.setName()
方法的具体详情如下:
包路径:uk.org.taverna.scufl2.api.core.Workflow
类名称:Workflow
方法名:setName
暂无
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api
workflow = new Workflow();
String workflowName = parseName(scanner);
workflow.setName(workflowName);
wb.getWorkflows().add(workflow);
if (workflowName.equals(mainWorkflow)) {
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-validation-correctness
/**
* Test method for {@link uk.org.taverna.scufl2.validation.correctness.CorrectnessVisitor#visitChild(uk.org.taverna.scufl2.api.common.Child)}.
*/
@Test
public void testCorrectnessOfMissingParent() {
Workflow w = new Workflow();
w.setName("fred");
CorrectnessValidator cv = new CorrectnessValidator();
ReportCorrectnessValidationListener rcvl = new ReportCorrectnessValidationListener();
cv.checkCorrectness(w, false, rcvl);
Set<NullFieldProblem> nullFieldProblems = rcvl.getNullFieldProblems();
assertEquals(0, nullFieldProblems.size()); // only done when completeness check
}
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-validation-correctness
@Test
public void testCompletenessOfMissingParent() {
Workflow w = new Workflow();
w.setName("fred");
CorrectnessValidator cv = new CorrectnessValidator();
ReportCorrectnessValidationListener rcvl = new ReportCorrectnessValidationListener();
cv.checkCorrectness(w, true, rcvl);
Set<NullFieldProblem> nullFieldProblems = rcvl.getNullFieldProblems();
assertEquals(1, nullFieldProblems.size()); // parent
boolean parentProblem = false;
for (NullFieldProblem nlp : nullFieldProblems) {
if (nlp.getBean().equals(w) && nlp.getFieldName().equals("parent")) {
parentProblem = true;
}
}
assertTrue(parentProblem);
}
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-validation-correctness
@Test
public void testCompletenessOfSpecifiedParent() {
Workflow w = new Workflow();
w.setName("fred");
WorkflowBundle wb = new WorkflowBundle();
w.setParent(wb);
CorrectnessValidator cv = new CorrectnessValidator();
ReportCorrectnessValidationListener rcvl = new ReportCorrectnessValidationListener();
cv.checkCorrectness(w, true, rcvl);
Set<NullFieldProblem> nullFieldProblems = rcvl.getNullFieldProblems();
assertEquals(0, nullFieldProblems.size());
}
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api
@SuppressWarnings("unchecked")
@Test
public void expectedOrder() throws Exception {
Workflow wf = new Workflow();
wf.setName("wf");
Processor a = new Processor(wf, "a");
Processor b = new Processor(wf, "b");
Processor c = new Processor(wf, "c");
Processor d = new Processor(wf, "d");
BlockingControlLink b_blocks_c = new BlockingControlLink(c, b);
BlockingControlLink a_blocks_c = new BlockingControlLink(c, a);
BlockingControlLink a_blocks_b = new BlockingControlLink(b, a);
BlockingControlLink b_blocks_d = new BlockingControlLink(d, b);
BlockingControlLink a_blocks_d = new BlockingControlLink(d, a);
ArrayList<ControlLink> links = new ArrayList<ControlLink>(wf.getControlLinks());
assertEquals(Arrays.asList(a_blocks_b, a_blocks_c, a_blocks_d, b_blocks_c, b_blocks_d), links);
Collections.shuffle(links);
Collections.sort(links);
assertEquals(Arrays.asList(a_blocks_b, a_blocks_c, a_blocks_d, b_blocks_c, b_blocks_d), links);
}
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api
@SuppressWarnings("unchecked")
@Test
public void expectedOrder() throws Exception {
Workflow wf = new Workflow();
wf.setName("wf");
InputWorkflowPort a = new InputWorkflowPort(wf, "a");
InputWorkflowPort b = new InputWorkflowPort(wf, "b");
InputWorkflowPort c = new InputWorkflowPort(wf, "c");
OutputWorkflowPort x = new OutputWorkflowPort(wf, "x");
OutputWorkflowPort y = new OutputWorkflowPort(wf, "y");
OutputWorkflowPort z = new OutputWorkflowPort(wf, "z");
DataLink c_x = new DataLink(wf, c, x);
DataLink b_x = new DataLink(wf, b, x);
DataLink b_z = new DataLink(wf, b, z);
DataLink a_z = new DataLink(wf, a, z);
DataLink a_x = new DataLink(wf, a, x);
ArrayList<DataLink> links = new ArrayList<DataLink>(wf.getDataLinks());
assertEquals(Arrays.asList(a_x, a_z, b_x, b_z, c_x), links);
Collections.shuffle(links);
Collections.sort(links);
assertEquals(Arrays.asList(a_x, a_z, b_x, b_z, c_x), links);
}
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api
public void nullSupport() throws Exception {
Workflow wf = new Workflow();
wf.setName("wf");
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api
workflow.setName("workflow1");
workflow.setParent(wb);
workflow.newRevision();
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api
wf.setName("wf");
InputWorkflowPort a = new InputWorkflowPort(wf, "a");
InputWorkflowPort b = new InputWorkflowPort(wf, "b");
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-rdfxml
wf.setName(workflow.getName());
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api
@Test
public void workflowsNotEqualsUnlessOrphans() {
Workflow wf1 = new Workflow();
Workflow wf2 = new Workflow();
wf1.setName("fred");
wf2.setName("fred");
// No parents, so they are equal
assertEquals(wf1, wf2);
WorkflowBundle wb1 = new WorkflowBundle();
WorkflowBundle wb2 = new WorkflowBundle();
// Make them look "equal"
wb2.setName(wb1.getName());
wb2.setGlobalBaseURI(wb1.getGlobalBaseURI());
assertFalse(wb1.equals(wb2));
wf1.setParent(wb1);
wf2.setParent(wb2);
assertFalse(wf1.equals(wf2));
wf1.setParent(null);
assertFalse(wf1.equals(wf2));
assertFalse(wf2.equals(wf1));
wf2.setParent(null);
assertTrue(wf1.equals(wf2));
}
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api
public Workflow makeMainWorkflow() {
workflow = new Workflow();
workflow.setName("HelloWorld");
// NOTE: setWorkflowIdentifier should only be called when loading a
// workflow
// which already has an ID
workflow.setIdentifier(URI
.create("http://ns.taverna.org.uk/2010/workflow/00626652-55ae-4a9e-80d4-c8e9ac84e2ca/"));
InputWorkflowPort yourName = new InputWorkflowPort(workflow, "yourName");
yourName.setDepth(0);
OutputWorkflowPort results = new OutputWorkflowPort(workflow, "results");
// Not needed:
// workflow.getInputPorts().add(yourName);
// workflow.getOutputPorts().add(results);
workflow.getProcessors().add(makeProcessor());
workflow.getProcessors().add(makeProcessor2());
// Make links
DataLink directLink = new DataLink(workflow, yourName, results);
directLink.setMergePosition(1);
DataLink greetingLink = new DataLink(workflow, processorGreeting,
results);
greetingLink.setMergePosition(0);
nameLink = new DataLink(workflow, yourName, processorName);
condition = new BlockingControlLink(processor, wait4me);
return workflow;
}
内容来源于网络,如有侵权,请联系作者删除!