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;
}
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;
}
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;
}
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());
}
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());
}
Aggregations