use of org.apache.airavata.model.EdgeModel in project airavata by apache.
the class JsonWorkflowParser method addEdges.
/**
* @param outPort -
* @param links -
* @return key: nodeId,inportId value : link
*/
private Map<String, Edge> addEdges(OutPort outPort, List<Link> links) {
Map<String, Edge> inPortMap = new HashMap<>();
if (links != null) {
for (Link link : links) {
EdgeModel edgeModel = new EdgeModel(link.getId());
Edge edge = new DirectedEdge(edgeModel);
// edge.setFromPort(outPort);
outPort.addEdge(edge);
inPortMap.put(link.getTo().getNodeId() + "," + link.getTo().getPortId(), edge);
}
}
return inPortMap;
}
Aggregations