/**
* Visits Connections in Loni Pipeline xml file to create corresponding Datalinks in Taverna.
*/
public Object visit(Connections connections){
Datalinks datalinks = new Datalinks();
// For each connection in between modules, create a corresponding Datalink for Taverna workflow.
for (Connection c : connections.getConnections())
{
Link src = null;
Link snk = null;
String source[] = c.getSource().split("\\.");
for(GraphObject module : moduleGroup.getModules())
{
if(source[0].equals(module.getId())){
src = module.getSource(source[1]);
}
}
String sink[] = c.getSink().split("\\.");
for(GraphObject module : moduleGroup.getModules())
{
if(sink[0].equals(module.getId())){
snk = module.getSink(sink[1]);
}
}
DataLink datalink = new DataLink(snk, src);
datalinks.addDataLink(datalink);
}
return datalinks;
}