use of org.apache.airavata.workflow.model.graph.DataPort in project airavata by apache.
the class EndifNode method addInputPort.
/**
* Adds additional input port.
*/
public void addInputPort() {
EndifComponent component = getComponent();
ComponentDataPort input = component.getInputPort();
DataPort port = input.createPort();
addInputPort(port);
}
use of org.apache.airavata.workflow.model.graph.DataPort in project airavata by apache.
the class EndifNode method removeInputPort.
/**
* Removes the last input port.
*
* @throws GraphException
*/
public void removeInputPort() throws GraphException {
List<DataPort> inputPorts = getInputPorts();
// Remove the last one.
DataPort inputPort = inputPorts.get(inputPorts.size() - 1);
removeInputPort(inputPort);
}
use of org.apache.airavata.workflow.model.graph.DataPort in project airavata by apache.
the class ForEachNode method edgeWasAdded.
/**
* @param edge
* @throws GraphException
*/
@Override
protected void edgeWasAdded(Edge edge) throws GraphException {
// XXX cannot detect if the type is array or not from WSDL at this
// point. so no check here.
// super.edgeWasAdded(edge);
Port fromPort = edge.getFromPort();
Port toPort = edge.getToPort();
if (edge instanceof DataEdge) {
if (fromPort instanceof EPRPort) {
// TODO
return;
}
DataPort fromDataPort = (DataPort) fromPort;
DataPort toDataPort = (DataPort) toPort;
DataType fromType = fromDataPort.getType();
DataType toType = toDataPort.getType();
if (fromDataPort.getNode() == this) {
if (!(toType == null || toType.equals(WSConstants.XSD_ANY_TYPE))) {
fromDataPort.copyType(toDataPort);
}
} else if (toDataPort.getNode() == this) {
if (!(fromType == null || fromType.equals(WSConstants.XSD_ANY_TYPE))) {
toDataPort.copyType(fromDataPort);
}
} else {
throw new WorkflowRuntimeException();
}
}
}
use of org.apache.airavata.workflow.model.graph.DataPort in project airavata by apache.
the class ForEachNode method removeOutputPort.
/**
* Removes the last output port.
*
* @throws GraphException
*/
public void removeOutputPort() throws GraphException {
List<DataPort> outputPorts = getOutputPorts();
// Remove the last one.
DataPort outputPort = outputPorts.get(outputPorts.size() - 1);
removeOutputPort(outputPort);
}
use of org.apache.airavata.workflow.model.graph.DataPort in project airavata by apache.
the class ForEachNode method addInputPort.
/**
* Adds additional input port.
*/
public void addInputPort() {
ForEachComponent component = getComponent();
ComponentDataPort input = component.getInputPort();
DataPort port = input.createPort();
addInputPort(port);
}
Aggregations