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

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

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

Workflow.getInputPorts介绍

[英]Returns the InputWorkflowPorts. If there are no InputWorkflowPorts an empty set is returned.
[中]返回InputWorkflowPorts。如果没有InputWorkflowPorts,则返回一个空集。

代码示例

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

@Override
public void setParent(Workflow parent) {
  if (this.parent != null && this.parent != parent)
    this.parent.getInputPorts().remove(this);
  this.parent = parent;
  if (parent != null)
    parent.getInputPorts().add(this);
}

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

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: org.apache.taverna.language/taverna-scufl2-api

@Override
public boolean accept(Visitor visitor) {
  if (visitor.visitEnter(this)) {
    List<WorkflowBean> children = new ArrayList<>();
    children.addAll(getInputPorts());
    children.addAll(getOutputPorts());
    children.addAll(getProcessors());
    children.addAll(getDataLinks());
    children.addAll(getControlLinks());
    children.add(getCurrentRevision());
    for (WorkflowBean bean : children)
      if (!bean.accept(visitor))
        break;
  }
  return visitor.visitLeave(this);
}

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

private void inheritDataLinkDepthsFromWorkflowInputPorts() {
  Workflow workflow = validatorState.get().getWorkflow();
  for (InputWorkflowPort iwp : workflow.getInputPorts()) {
    Integer iwpDepth = iwp.getDepth();
    validatorState.get().getEventListener()
        .depthResolution(iwp, iwpDepth);
    validatorState.get().setPortResolvedDepth(iwp, iwpDepth);
    for (DataLink dl : validatorState.get().getOutgoingDataLinks(iwp)) {
      validatorState.get().getEventListener()
          .depthResolution(dl, iwpDepth);
      validatorState.get().setDataLinkResolvedDepth(dl, iwpDepth);
    }
  }
}

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

@Test
public void resolveNonAbsolute() throws Exception {
  InputWorkflowPort yourName = wfBundle.getMainWorkflow().getInputPorts()
      .getByName("yourName");
  assertSame(yourName, uriTools.resolveUri(
      URI.create("/workflow/HelloWorld/in/yourName"), wfBundle));
}

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

@Test
public void resolveWorkflowInput() throws Exception {
  InputWorkflowPort yourName = wfBundle.getMainWorkflow().getInputPorts()
      .getByName("yourName");
  assertSame(yourName, uriTools.resolveUri(
      HELLOWORLD_URI.resolve("in/yourName"), wfBundle));
}

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

@Test
public void uriForWorkflowInPort() throws Exception {
  URI uri = uriTools.uriForBean(wfBundle.getMainWorkflow()
      .getInputPorts().getByName("yourName"));
  assertEquals(HELLOWORLD_URI + "in/yourName", uri.toASCIIString());
}

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

@Test
public void resolveRelative() throws Exception {
  InputWorkflowPort yourName = wfBundle.getMainWorkflow().getInputPorts()
      .getByName("yourName");
  assertSame(yourName, uriTools.resolveUri(
      URI.create("workflow/HelloWorld/in/yourName"), wfBundle));
}

代码示例来源:origin: org.apache.taverna.language/taverna-scufl2-t2flow

Collection<Annotation> portAnnotations = wf.getInputPorts().getByName("a").getAnnotations();
assertEquals(2, portAnnotations.size());
for (Annotation ann : portAnnotations) {

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

senderPort = proc.getOutputPorts().getByName(procPort[1]);
} else
  senderPort = workflow.getInputPorts().getByName(firstLink);

代码示例来源:origin: org.apache.taverna.language/taverna-scufl2-wfbundle

@Test
public void workflowInputPorts() throws Exception {
  NamedSet<InputWorkflowPort> inputPorts = workflowBundle
      .getMainWorkflow().getInputPorts();
  assertEquals(1, inputPorts.size());
  assertEquals("yourName", inputPorts.getByName("yourName").getName());
  assertEquals(0, inputPorts.getByName("yourName").getDepth().intValue());
}

代码示例来源:origin: org.apache.taverna.language/taverna-scufl2-t2flow

throw new ReaderException(
      "Link type was processor, but no processor name found");
InputWorkflowPort candidate = wf.getInputPorts()
    .getByName(portName);
if (candidate == null)

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

ro.setMainWorkflow(wf1);
assertEquals("Non-empty input ports", Collections.EMPTY_SET, wf1.getInputPorts());
    .getInputPorts());

相关文章