org.embl.ebi.escience.scufl.Processor.addPort()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(142)

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

Processor.addPort介绍

暂无

代码示例

代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-model

public void testCreationDuplicate() throws Exception {		
  proc.addPort(new DummyPort(proc, "sillyport"));
  try {
    // Should ignore case
    new DummyPort(proc, "SillyPort");
  } catch (DuplicatePortNameException e) {
    // expected
    return;
  }
  throw new Exception("Should not allow duplicate port names");
}
public void testCreationDuplicateOtherType() throws Exception {

代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-ui-api

public void actionPerformed(ActionEvent e) {
  Component parent = UIUtils.getActionEventParentWindow(e);
  String name = (String) JOptionPane.showInputDialog(parent,
      "Name for the new workflow output?", "Name required",
      JOptionPane.QUESTION_MESSAGE, null, null, "");
  if (name != null) {
    try {
      model.getWorkflowSinkProcessor().addPort(
          new InputPort(model.getWorkflowSinkProcessor(), name));
      model.forceUpdate();
    } catch (PortCreationException pce) {
      JOptionPane.showMessageDialog(parent,
          "Port creation exception : \n" + pce.getMessage(),
          "Exception!", JOptionPane.ERROR_MESSAGE);
    } catch (DuplicatePortNameException dpne) {
      JOptionPane.showMessageDialog(parent, "Duplicate name : \n"
          + dpne.getMessage(), "Exception!",
          JOptionPane.ERROR_MESSAGE);
    }
  }
}

代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-model

public void testCreationDuplicateOtherType() throws Exception {
  // Duplicates are OK if they are different classes.
  // (But what if they are subclassing each other?)
  proc.addPort(new InputPort(proc, "sillyport"));		
  new DummyPort(proc, "sillyport");
}

代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-ui-api

public void actionPerformed(ActionEvent e) {		
    Component parent = UIUtils.getActionEventParentWindow(e);
    
    String name = (String) JOptionPane.showInputDialog(parent,
        "Name for the new workflow input?", "Name required",
        JOptionPane.QUESTION_MESSAGE, null, null, "");
    if (name != null) {
      try {
        model.getWorkflowSourceProcessor()
            .addPort(
                new OutputPort(model
                    .getWorkflowSourceProcessor(), name));
        model.forceUpdate();
      } catch (PortCreationException pce) {
        JOptionPane.showMessageDialog(parent,
            "Port creation exception : \n" + pce.getMessage(),
            "Exception!", JOptionPane.ERROR_MESSAGE);
      } catch (DuplicatePortNameException dpne) {
        JOptionPane.showMessageDialog(parent, "Duplicate name : \n"
            + dpne.getMessage(), "Exception!",
            JOptionPane.ERROR_MESSAGE);
      }
    }
  }
}

代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-model

void addInputPort(String name) throws DuplicatePortNameException, PortCreationException {
  model.getWorkflowSourceProcessor().addPort(
      new OutputPort(model.getWorkflowSourceProcessor(), name));
  model.forceUpdate();
}

代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-model

void addOutputPort(String name) throws DuplicatePortNameException, PortCreationException {
  model.getWorkflowSinkProcessor().addPort(
      new InputPort(model.getWorkflowSinkProcessor(), name));
  model.forceUpdate();
}

代码示例来源:origin: uk.org.mygrid.taverna/taverna-scavenger-ui

String portName = ip[i].getName();
OutputPort port = new OutputPort(m.getWorkflowSourceProcessor(), portName);
m.getWorkflowSourceProcessor().addPort(port);
m.addDataConstraint(new DataConstraint(m, port, ip[i]));
String portName = op[i].getName();
InputPort port = new InputPort(m.getWorkflowSinkProcessor(), portName);
m.getWorkflowSinkProcessor().addPort(port);
m.addDataConstraint(new DataConstraint(m, op[i], port));

相关文章