本文整理了Java中uk.org.taverna.scufl2.api.core.Workflow.getDataLinks()
方法的一些代码示例,展示了Workflow.getDataLinks()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Workflow.getDataLinks()
方法的具体详情如下:
包路径:uk.org.taverna.scufl2.api.core.Workflow
类名称:Workflow
方法名:getDataLinks
[英]Returns the DataLink
s. If there are no DataLink
s an empty set is returned.
[中]返回DataLink
s。如果没有DataLink
s,则返回一个空集。
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api
@Override
public void setParent(Workflow parent) {
if (this.parent != null && this.parent != parent) {
this.parent.getDataLinks().remove(this);
}
this.parent = parent;
if (parent != null) {
parent.getDataLinks().add(this);
}
}
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api
@SuppressWarnings({ "unchecked", "rawtypes" })
public List<DataLink> datalinksFrom(SenderPort senderPort) {
Workflow wf = findParent(Workflow.class, (Child) senderPort);
List<DataLink> links = new ArrayList();
for (DataLink link : wf.getDataLinks()) {
if (link.getReceivesFrom().equals(senderPort)) {
links.add(link);
}
}
Collections.sort(links);
return links;
}
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api
@SuppressWarnings({ "unchecked", "rawtypes" })
public List<DataLink> datalinksTo(ReceiverPort receiverPort) {
Workflow wf = findParent(Workflow.class, (Child) receiverPort);
List<DataLink> links = new ArrayList<DataLink>();
for (DataLink link : wf.getDataLinks()) {
if (link.getSendsTo().equals(receiverPort)) {
links.add(link);
}
}
Collections.sort(links);
return links;
}
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-validation-structural
public void clearWorkflowData() {
for (DataLink dl : workflow.getDataLinks()) {
dataLinkResolvedDepthMap.remove(dl);
}
for (InputWorkflowPort iwp : workflow.getInputPorts()) {
senderDataLinkMap.remove(iwp);
portResolvedDepthMap.remove(iwp);
}
for (Processor p : workflow.getProcessors()) {
for (InputProcessorPort ipp : p.getInputPorts()) {
portResolvedDepthMap.remove(ipp);
receiverDataLinkMap.remove(ipp);
}
for (OutputProcessorPort opp : p.getOutputPorts()) {
portResolvedDepthMap.remove(opp);
senderDataLinkMap.remove(opp);
}
}
for (OutputWorkflowPort owp : workflow.getOutputPorts()) {
portResolvedDepthMap.remove(owp);
receiverDataLinkMap.remove(owp);
}
}
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-validation-structural
private void rememberDataLinkConnections() {
Workflow workflow = validatorState.get().getWorkflow();
for (DataLink dl : workflow.getDataLinks()) {
validatorState.get().getEventListener().dataLinkSender(dl);
validatorState.get().rememberDataLinkSender(dl);
validatorState.get().getEventListener().dataLinkReceiver(dl);
validatorState.get().rememberDataLinkReceiver(dl);
}
}
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api
@Override
public boolean accept(Visitor visitor) {
if (visitor.visitEnter(this)) {
List<WorkflowBean> children = new ArrayList<WorkflowBean>();
children.addAll(getInputPorts());
children.addAll(getOutputPorts());
children.addAll(getProcessors());
children.addAll(getDataLinks());
children.addAll(getControlLinks());
children.addAll(Collections.singleton(getCurrentRevision()));
for (WorkflowBean bean : children) {
if (!bean.accept(visitor)) {
break;
}
}
}
return visitor.visitLeave(this);
}
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api
@Test
public void dataLinkNotAddedTwice() throws Exception {
assertEquals(3, workflow.getDataLinks().size());
DataLink dl1 = workflow.getDataLinks().iterator().next();
assertTrue(workflow.getDataLinks().contains(dl1));
workflow.getDataLinks().add(dl1);
dl1.setParent(workflow);
// This could happen because dataLink.compareTo() calls
// .compareTo() on the sender/receiver link, and if
// their parents was null at insertion and non-null
// later, the TreeSet order got messed up.
assertEquals(3, workflow.getDataLinks().size());
}
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-validation-correctness
@Override
public void visitWorkflow(Workflow bean) {
Set<DataLink> dataLinks = bean.getDataLinks();
Set<ControlLink> controlLinks = bean.getControlLinks();
代码示例来源: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
a_null.setParent(wf);
ArrayList<DataLink> links = new ArrayList<DataLink>(wf.getDataLinks());
assertEquals(Arrays.asList(null_null, null_z, a_null, a_z), links);
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api
for (DataLink dl : wf.getDataLinks()) {
links.add(datalink(dl.getReceivesFrom()) + " -> " + datalink(dl.getSendsTo()));
代码示例来源:origin: uk.org.taverna.scufl2/scufl2-api
pNested.getOutputPorts().add(pNested_o);
wf1.getDataLinks().add(new DataLink(wf1, p1_y2, pNested_i));
wf1.getDataLinks().add(new DataLink(wf1, p1_y2, p4_x2));
wf1.getDataLinks().add(new DataLink(wf1, pNested_o, p1_y1));
wf1.getDataLinks().add(new DataLink(wf1, p4_y, wf1_out1));
内容来源于网络,如有侵权,请联系作者删除!