Search in sources :

Example 1 with WSComponentPort

use of org.apache.airavata.workflow.model.component.ws.WSComponentPort in project airavata by apache.

the class WSPort method getComponentPort.

/**
 * @see org.apache.airavata.workflow.model.graph.impl.PortImpl#getComponentPort()
 */
@Override
public WSComponentPort getComponentPort() {
    if (this.componentPort == null) {
        ComponentPort port = super.getComponentPort();
        if (port instanceof WSComponentPort) {
            this.componentPort = (WSComponentPort) port;
        }
        if (port instanceof SystemComponentDataPort) {
            // XXX to handle the xwf created by version 2.6.2_XX or earlier.
            SystemComponentDataPort systemPort = (SystemComponentDataPort) port;
            this.componentPort = new WSComponentPort(systemPort.getName(), systemPort.getType(), null);
        }
    }
    return this.componentPort;
}
Also used : SystemComponentDataPort(org.apache.airavata.workflow.model.component.system.SystemComponentDataPort) ComponentPort(org.apache.airavata.workflow.model.component.ComponentPort) WSComponentPort(org.apache.airavata.workflow.model.component.ws.WSComponentPort) WSComponentPort(org.apache.airavata.workflow.model.component.ws.WSComponentPort)

Example 2 with WSComponentPort

use of org.apache.airavata.workflow.model.component.ws.WSComponentPort in project airavata by apache.

the class Workflow method getInputs.

/**
 * Returns the inputs of the workflow.
 *
 * @return The inputs of the workflow.
 * @throws ComponentException
 */
public List<WSComponentPort> getInputs() throws ComponentException {
    List<InputNode> nodes = GraphUtil.getNodes(this.graph, InputNode.class);
    List<WSComponentPort> ports = new ArrayList<WSComponentPort>();
    for (InputNode inputNode : nodes) {
        ports.add(new WSComponentPort(inputNode.getName(), inputNode.getOutputPorts().get(0).getType(), null));
    }
    return ports;
}
Also used : InputNode(org.apache.airavata.workflow.model.graph.system.InputNode) ArrayList(java.util.ArrayList) WSComponentPort(org.apache.airavata.workflow.model.component.ws.WSComponentPort)

Example 3 with WSComponentPort

use of org.apache.airavata.workflow.model.component.ws.WSComponentPort in project airavata by apache.

the class Workflow method getOutputs.

/**
 * Returns the outputs of the workflow.
 *
 * @return The outputs of the workflow.
 * @throws ComponentException
 */
public List<WSComponentPort> getOutputs() throws ComponentException {
    List<OutputNode> nodes = GraphUtil.getNodes(this.graph, OutputNode.class);
    List<WSComponentPort> ports = new ArrayList<WSComponentPort>();
    for (OutputNode outputNode : nodes) {
        ports.add(new WSComponentPort(outputNode.getName(), outputNode.getOutputPorts().get(0).getType(), null));
    }
    return ports;
}
Also used : OutputNode(org.apache.airavata.workflow.model.graph.system.OutputNode) ArrayList(java.util.ArrayList) WSComponentPort(org.apache.airavata.workflow.model.component.ws.WSComponentPort)

Example 4 with WSComponentPort

use of org.apache.airavata.workflow.model.component.ws.WSComponentPort in project airavata by apache.

the class InputNode method copyDefaultConfiguration.

/**
 * @param toWSPort
 */
private void copyDefaultConfiguration(WSPort toWSPort) {
    // TODO support recursive search for WSPort in case the input is
    // connected to special nodes.
    setName(toWSPort.getName());
    WSComponentPort componentPort = toWSPort.getComponentPort();
    setDescription(componentPort.getDescription());
    setDefaultValue(componentPort.getDefaultValue());
    setMetadata(componentPort.getAppinfo());
    setApplicationArgument(componentPort.getApplicationArgument());
    setInputOrder(componentPort.getInputOrder());
    setDataType(componentPort.getType());
}
Also used : WSComponentPort(org.apache.airavata.workflow.model.component.ws.WSComponentPort)

Example 5 with WSComponentPort

use of org.apache.airavata.workflow.model.component.ws.WSComponentPort in project airavata by apache.

the class DifferedInputNode method copyDefaultConfiguration.

/**
 * @param toWSPort
 */
private void copyDefaultConfiguration(WSPort toWSPort) {
    // TODO support recursive search for WSPort in case the input is
    // connected to special nodes.
    setName(toWSPort.getName());
    WSComponentPort componentPort = toWSPort.getComponentPort();
    setDescription(componentPort.getDescription());
    setDefaultValue(componentPort.getDefaultValue());
    setMetadata(componentPort.getAppinfo());
}
Also used : WSComponentPort(org.apache.airavata.workflow.model.component.ws.WSComponentPort)

Aggregations

WSComponentPort (org.apache.airavata.workflow.model.component.ws.WSComponentPort)8 ArrayList (java.util.ArrayList)2 ComponentPort (org.apache.airavata.workflow.model.component.ComponentPort)2 Port (org.apache.airavata.workflow.model.graph.Port)2 InputNode (org.apache.airavata.workflow.model.graph.system.InputNode)2 OutputNode (org.apache.airavata.workflow.model.graph.system.OutputNode)2 DataType (org.apache.airavata.model.application.io.DataType)1 SystemComponentDataPort (org.apache.airavata.workflow.model.component.system.SystemComponentDataPort)1 DataEdge (org.apache.airavata.workflow.model.graph.DataEdge)1 DataPort (org.apache.airavata.workflow.model.graph.DataPort)1 EPRPort (org.apache.airavata.workflow.model.graph.EPRPort)1 GraphException (org.apache.airavata.workflow.model.graph.GraphException)1 Node (org.apache.airavata.workflow.model.graph.Node)1 BlockNode (org.apache.airavata.workflow.model.graph.system.BlockNode)1 ConstantNode (org.apache.airavata.workflow.model.graph.system.ConstantNode)1 EndBlockNode (org.apache.airavata.workflow.model.graph.system.EndBlockNode)1 EndForEachNode (org.apache.airavata.workflow.model.graph.system.EndForEachNode)1 EndifNode (org.apache.airavata.workflow.model.graph.system.EndifNode)1 ForEachNode (org.apache.airavata.workflow.model.graph.system.ForEachNode)1 IfNode (org.apache.airavata.workflow.model.graph.system.IfNode)1