net.sf.taverna.t2.workflowmodel.Processor.getControlledPreconditionList()方法的使用及代码示例

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

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

Processor.getControlledPreconditionList介绍

[英]A processor may control zero or more other processors within the same level of the workflow through preconditions.
[中]一个处理器可以通过先决条件控制同一级别工作流中的零个或多个其他处理器。

代码示例

代码示例来源:origin: net.sf.taverna.t2.core/workflowmodel-impl

  1. public Element conditionsToXML(List<? extends Processor> processors) {
  2. Element result = new Element(CONDITIONS, T2_WORKFLOW_NAMESPACE);
  3. // gather conditions
  4. Set<Condition> conditions = new HashSet<Condition>();
  5. for (Processor p : processors) {
  6. for (Condition c : p.getControlledPreconditionList()) {
  7. conditions.add(c);
  8. }
  9. }
  10. for (Condition c : conditions) {
  11. Element conditionElement = new Element(CONDITION,
  12. T2_WORKFLOW_NAMESPACE);
  13. conditionElement.setAttribute("control", c.getControl()
  14. .getLocalName());
  15. conditionElement.setAttribute("target", c.getTarget()
  16. .getLocalName());
  17. result.addContent(conditionElement);
  18. }
  19. return result;
  20. }
  21. }

代码示例来源:origin: net.sf.taverna.t2/workflowmodel-impl

  1. public Element conditionsToXML(List<? extends Processor> processors) {
  2. Element result = new Element(CONDITIONS, T2_WORKFLOW_NAMESPACE);
  3. // gather conditions
  4. Set<Condition> conditions = new HashSet<Condition>();
  5. for (Processor p : processors) {
  6. for (Condition c : p.getControlledPreconditionList()) {
  7. conditions.add(c);
  8. }
  9. }
  10. for (Condition c : conditions) {
  11. Element conditionElement = new Element(CONDITION,
  12. T2_WORKFLOW_NAMESPACE);
  13. conditionElement.setAttribute("control", c.getControl()
  14. .getLocalName());
  15. conditionElement.setAttribute("target", c.getTarget()
  16. .getLocalName());
  17. result.addContent(conditionElement);
  18. }
  19. return result;
  20. }
  21. }

代码示例来源:origin: net.sf.taverna.t2.ui-components/workflow-explorer

  1. List<? extends Condition> controllinksList = (List<? extends Condition>) processor.getControlledPreconditionList();
  2. if (!controllinksList.isEmpty()) {
  3. for (Condition controllink: controllinksList) {

代码示例来源:origin: net.sf.taverna.t2.core/workflowmodel-api

  1. Processor processor = (Processor) investigate;
  2. List<? extends Condition> controlledConditions = processor
  3. .getControlledPreconditionList();
  4. for (Condition condition : controlledConditions) {
  5. Processor downstreamProc = condition.getTarget();

代码示例来源:origin: net.sf.taverna.t2/maelstrom-impl

  1. public void testCreation() throws ActivityConfigurationException,
  2. EditException {
  3. create();
  4. assertTrue(p1.getControlledPreconditionList().size() == 1);
  5. assertTrue(p2.getPreconditionList().size() == 1);
  6. }

代码示例来源:origin: net.sf.taverna.t2.ui-components/design-ui

  1. List<? extends ProcessorInputPort> inputPorts = processor.getInputPorts();
  2. List<? extends ProcessorOutputPort> outputPorts = processor.getOutputPorts();
  3. List<? extends Condition> controlledPreconditions = processor.getControlledPreconditionList();
  4. List<? extends Condition> preconditions = processor.getPreconditionList();
  5. List<Edit<?>> editList = new ArrayList<Edit<?>>();

代码示例来源:origin: net.sf.taverna.t2.ui-activities/component-activity-ui

  1. private void considerNearestDownstream(TokenProcessingEntity investigate) {
  2. if (investigate instanceof Processor)
  3. for (Condition condition : ((Processor) investigate)
  4. .getControlledPreconditionList())
  5. considerInclusion(condition.getTarget());
  6. for (EventForwardingOutputPort outputPort : investigate
  7. .getOutputPorts())
  8. for (Datalink datalink : outputPort.getOutgoingLinks()) {
  9. EventHandlingInputPort sink = datalink.getSink();
  10. if (sink instanceof ProcessorInputPort)
  11. considerInclusion(((ProcessorInputPort) sink)
  12. .getProcessor());
  13. else if (sink instanceof MergeInputPort)
  14. considerInclusion(((MergeInputPort) sink).getMerge());
  15. // The merge it self doesn't count as a processor
  16. else {
  17. // Ignore dataflow ports
  18. }
  19. }
  20. }

相关文章