本文整理了Java中uk.org.taverna.scufl2.api.core.Workflow.setParent()
方法的一些代码示例,展示了Workflow.setParent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Workflow.setParent()
方法的具体详情如下:
包路径:uk.org.taverna.scufl2.api.core.Workflow
类名称:Workflow
方法名:setParent
暂无
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-validation-correctness
public DummyWorkflow(WorkflowBundle parent) {
super.setParent(parent);
}
代码示例来源: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
@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-validation-correctness
@Test
public void testValidParent() {
WorkflowBundle parent = new WorkflowBundle();
Workflow fw = new Workflow();
fw.setParent(parent);
CorrectnessValidator cv = new CorrectnessValidator();
ReportCorrectnessValidationListener rcvl = new ReportCorrectnessValidationListener();
cv.checkCorrectness(parent, false, rcvl);
Set<WrongParentProblem> wrongParentProblems = rcvl.getWrongParentProblems();
assertEquals(Collections.EMPTY_SET, wrongParentProblems);
}
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api
workflow.setParent(wb);
workflow.newRevision();
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-validation-correctness
@Test
public void testCorrectnessOfInScopeBoundProcessor() {
WorkflowBundle wb = new WorkflowBundle();
Profile profile = new Profile();
profile.setParent(wb);
ProcessorBinding pb = new ProcessorBinding();
Workflow w = new Workflow();
Processor processor = new Processor();
processor.setParent(w);
w.setParent(wb);
pb.setBoundProcessor(processor);
pb.setParent(profile);
CorrectnessValidator cv = new CorrectnessValidator();
ReportCorrectnessValidationListener rcvl = new ReportCorrectnessValidationListener();
cv.checkCorrectness(pb, false, rcvl);
Set<OutOfScopeValueProblem> outOfScopeValueProblems = rcvl.getOutOfScopeValueProblems();
// assertFalse(outOfScopeValueProblems.isEmpty());
boolean problem = false;
for (OutOfScopeValueProblem nlp : outOfScopeValueProblems) {
if (nlp.getBean().equals(pb) && nlp.getFieldName().equals("boundProcessor") && nlp.getValue().equals(processor)) {
problem = true;
}
}
assertFalse(problem);
}
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api
public WorkflowBundle makeWorkflowBundle() {
// Based on
// uk.org.taverna.scufl2.scufl2-usecases/src/main/resources/workflows/example/workflowBundle.rdf
workflowBundle = new WorkflowBundle();
workflowBundle.setName("HelloWorld");
// NOTE: setSameBaseAs should only be called when loading a workflow
// bundle
// which already has an ID
workflowBundle
.setGlobalBaseURI(URI
.create("http://ns.taverna.org.uk/2010/workflowBundle/28f7c554-4f35-401f-b34b-516e9a0ef731/"));
Workflow workflow = makeMainWorkflow();
workflow.setParent(workflowBundle);
workflowBundle.setMainWorkflow(workflow);
Profile profile = makeMainProfile();
profile.setParent(workflowBundle);
workflowBundle.setMainProfile(profile);
Profile secondaryProfile = makeSecondaryProfile();
secondaryProfile.setParent(workflowBundle);
Scufl2Tools scufl2Tools = new Scufl2Tools();
scufl2Tools.setParents(workflowBundle);
return workflowBundle;
}
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-rdfxml
throws ReaderException {
Workflow wf = new Workflow();
wf.setParent(getParserState().getCurrent(WorkflowBundle.class));
内容来源于网络,如有侵权,请联系作者删除!