@@ -0,0 +1,1336 @@
+package uk.org.taverna.scufl2.usecases;%0A%0Aimport java.io.File;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.IOException;%0A%0Aimport javax.xml.bind.JAXBContext;%0Aimport javax.xml.bind.JAXBException;%0Aimport javax.xml.bind.Marshaller;%0A%0Aimport uk.org.taverna.scufl2.api.container.TavernaResearchObject;%0Aimport uk.org.taverna.scufl2.translator.t2flow.ParseException;%0Aimport uk.org.taverna.scufl2.translator.t2flow.T2FlowParser;%0A%0Apublic class ConvertT2flowScufl2 %7B%0A%09public static void main(String%5B%5D args) throws JAXBException, IOException,%0A%09%09%09ParseException %7B%0A%09%09T2FlowParser t2flowParser = new T2FlowParser();%0A%09%09for (String filepath : args) %7B%0A%09%09%09File t2File = new File(filepath);%0A%09%09%09String filename = t2File.getName();%0A%09%09%09filename = filename.replaceFirst(%22%5C%5C..*%22, %22.scufl2%22);%0A%09%09%09File scufl2File = new File(t2File.getParentFile(), filename);%0A%09%09%09TavernaResearchObject ro = t2flowParser.parseT2Flow(t2File);%0A%09%09%09writeTavernaResearchObject(ro, scufl2File);%0A%09%09%7D%0A%09%7D%0A%0A%09public static void writeTavernaResearchObject(TavernaResearchObject ro,%0A%09%09%09File scufl2File) throws JAXBException, FileNotFoundException %7B%0A%09%09JAXBContext jc = JAXBContext.newInstance(TavernaResearchObject.class);%0A%09%09Marshaller marshaller = jc.createMarshaller();%0A%09%09marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);%0A%09%09marshaller.marshal(ro, scufl2File);%0A%09%7D%0A%0A%7D%0A

convert t2flow to scufl2