import jalview.gui.*;\r
import java.io.*;\r
import java.util.jar.*;\r
+import org.exolab.castor.xml.*;\r
+import org.exolab.castor.mapping.Mapping;\r
\r
/*\r
\r
storeVAMSAS(file);\r
}\r
\r
+ public void storeJalview(String file, AlignFrame af)\r
+ {\r
+ try\r
+ {\r
+ // 1. Load the mapping information from the file\r
+ Mapping map = new Mapping(getClass().getClassLoader());\r
+ java.net.URL url = getClass().getResource("/jalview_mapping.xml");\r
+ map.loadMapping(url);\r
+\r
+ // 2. Unmarshal the data\r
+ // Unmarshaller unmar = new Unmarshaller();\r
+ //unmar.setIgnoreExtraElements(true);\r
+ //unmar.setMapping(map);\r
+ // uni = (UniprotFile) unmar.unmarshal(new FileReader(file));\r
+\r
+ // 3. marshal the data with the total price back and print the XML in the console\r
+ Marshaller marshaller = new Marshaller( new FileWriter(file) );\r
+\r
+ marshaller.setMapping(map);\r
+ marshaller.marshal(af);\r
+ }\r
+ catch (Exception e)\r
+ {\r
+ e.printStackTrace();\r
+ }\r
+ }\r
+\r
\r
\r
public VAMSAS storeVAMSAS(String file)\r