Package eu.scape_project.planning.services.taverna.generator.model

Examples of eu.scape_project.planning.services.taverna.generator.model.Datalink


        // Input ports
        List<Port> inputPorts = workflowDescription.getInputPorts();
        for (Port p : inputPorts) {
            if (ComponentConstants.VALUE_SOURCE_OBJECT.equals(p.getValue())) {
                migration.addInputPort(new InputPort(p.getName(), 0));
                workflow.addDatalink(new Datalink(workflow, SOURCE_PORT_NAME, migration, p.getName()));
            } else if (ComponentConstants.VALUE_PARAMETER.equals(p.getValue())) {
                migration.addInputPort(new InputPort(p.getName(), 0));
                TextConstant c = new TextConstant(p.getName(), parameters.get(p.getName()));
                workflow.addProcessor(c);
                workflow.addDatalink(new Datalink(c, "value", migration, p.getName()));
            }
        }

        // Output ports
        List<Port> outputPorts = workflowDescription.getOutputPorts();
        for (Port p : outputPorts) {
            if (ComponentConstants.VALUE_TARGET_OBJECT.equals(p.getValue())) {
                migrationTargetPortName = p.getName();
                migration.addOutputPort(new OutputPort(migrationTargetPortName));
                workflow.addDatalink(new Datalink(migration, migrationTargetPortName, workflow, TARGET_PORT_NAME));
            }
        }
    }
View Full Code Here


        List<Port> inputPorts = workflowDescription.getInputPorts();
        for (Port p : inputPorts) {
            if (ComponentConstants.VALUE_LEFT_OBJECT.equals(p.getValue())) {
                if (leftSource == InputSource.SOURCE_OBJECT) {
                    qa.addInputPort(new InputPort(p.getName(), 0));
                    workflow.addDatalink(new Datalink(workflow, SOURCE_PORT_NAME, qa, p.getName()));
                } else if (leftSource == InputSource.TARGET_OBJECT) {
                    qa.addInputPort(new InputPort(p.getName(), 0));
                    workflow.addDatalink(new Datalink(migration, migrationTargetPortName, qa, p.getName()));
                }
            } else if (ComponentConstants.VALUE_RIGHT_OBJECT.equals(p.getValue())) {
                if (rightSource == InputSource.SOURCE_OBJECT) {
                    qa.addInputPort(new InputPort(p.getName(), 0));
                    workflow.addDatalink(new Datalink(workflow, SOURCE_PORT_NAME, qa, p.getName()));
                } else if (rightSource == InputSource.TARGET_OBJECT) {
                    qa.addInputPort(new InputPort(p.getName(), 0));
                    workflow.addDatalink(new Datalink(migration, migrationTargetPortName, qa, p.getName()));
                }
            } else if (ComponentConstants.VALUE_PARAMETER.equals(p.getValue())) {
                qa.addInputPort(new InputPort(p.getName(), 0));
                TextConstant c = new TextConstant(p.getName(), parameters.get(p.getName()));
                workflow.addProcessor(c);
                workflow.addDatalink(new Datalink(c, "value", qa, p.getName()));
            }
        }

        // Output ports
        List<Port> outputPorts = workflowDescription.getOutputPorts();
        for (Port p : outputPorts) {
            if (measures.contains(p.getValue())) {
                if (p.getRelatedObject() == null || p.getRelatedObject().equals(relatedObject.toString())) {
                    String measurePortName = createMeasurePortName(p.getValue());
                    if (!workflow.hasSink(measurePortName)) {
                        addMeasurePort(p.getValue());
                    }
                    qa.addOutputPort(new OutputPort(p.getName()));
                    workflow.addDatalink(new Datalink(qa, p.getName(), workflow, measurePortName));
                }
            }
        }
    }
View Full Code Here

        List<Port> inputPorts = workflowDescription.getInputPorts();
        for (Port p : inputPorts) {
            if (ComponentConstants.VALUE_SOURCE_OBJECT.equals(p.getValue())) {
                if (inputSource == InputSource.SOURCE_OBJECT && workflowDescription.handlesMimetype(sourceMimetype)) {
                    cc.addInputPort(new InputPort(p.getName(), 0));
                    workflow.addDatalink(new Datalink(workflow, SOURCE_PORT_NAME, cc, p.getName()));
                } else if (inputSource == InputSource.TARGET_OBJECT
                    && workflowDescription.handlesMimetype(targetMimetype)) {
                    cc.addInputPort(new InputPort(p.getName(), 0));
                    workflow.addDatalink(new Datalink(migration, migrationTargetPortName, cc, p.getName()));
                }
            } else if (ComponentConstants.VALUE_PARAMETER.equals(p.getValue())) {
                cc.addInputPort(new InputPort(p.getName(), 0));
                TextConstant c = new TextConstant(p.getName(), parameters.get(p.getName()));
                workflow.addProcessor(c);
                workflow.addDatalink(new Datalink(c, "value", cc, p.getName()));
            }
        }

        // Output ports
        List<Port> outputPorts = workflowDescription.getOutputPorts();
        for (Port p : outputPorts) {
            if (measures.contains(p.getValue())) {
                String measurePortName = createMeasurePortName(p.getValue());
                if (!workflow.hasSink(measurePortName)) {
                    addMeasurePort(p.getValue());
                }
                cc.addOutputPort(new OutputPort(p.getName()));
                workflow.addDatalink(new Datalink(cc, p.getName(), workflow, measurePortName));
            }
        }
    }
View Full Code Here

TOP

Related Classes of eu.scape_project.planning.services.taverna.generator.model.Datalink

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.