String sourcePort = "";
String sourceProcessor = "";
String sinkLinkType = "";
String sinkPort = "";
String sinkProcessor = "";
Link source;
Link sink;
Parameter parameter = null;
Output output = null;
Format format;
FileTypes fileTypes;
for(DataLink d : datalinks){
source = d.getSource();
sourceLinkType = source.getLinkType();
sourcePort = source.getPort();
sourceProcessor = source.getProcessor();
sink = d.getSink();
sinkLinkType = sink.getLinkType();
sinkPort = sink.getPort();
sinkProcessor = sink.getProcessor();
// Even if the Taverna port is a SOURCE, that will correspond to Output.class in LONI. It's weird, but you have to be careful. In side the Input of LONI, the dataModule actually contains <output>, not <input>!
if(sinkPort == inputPortName){
parameter = new Parameter();