Merge branch 'develop' into trialMerge
[jalview.git] / test / jalview / ws / jabaws / RNAStructExportImport.java
index 418e827..06c803f 100644 (file)
@@ -29,7 +29,8 @@ import jalview.datamodel.AlignmentI;
 import jalview.gui.Jalview2XML;
 import jalview.gui.JvOptionPane;
 import jalview.io.AnnotationFile;
-import jalview.io.FileLoader;
+import jalview.io.DataSourceType;
+import jalview.io.FileFormat;
 import jalview.io.FormatAdapter;
 import jalview.io.StockholmFileTest;
 import jalview.ws.jws2.Jws2Discoverer;
@@ -99,9 +100,9 @@ public class RNAStructExportImport
       Assert.fail("no web service");
     }
 
-    FileLoader fl = new FileLoader(false);
+    jalview.io.FileLoader fl = new jalview.io.FileLoader(false);
 
-    af = fl.LoadFileWaitTillLoaded(testseqs, FormatAdapter.FILE);
+    af = fl.LoadFileWaitTillLoaded(testseqs, jalview.io.DataSourceType.FILE);
 
     assertNotNull("Couldn't load test data ('" + testseqs + "')", af);
 
@@ -200,8 +201,8 @@ public class RNAStructExportImport
     try
     {
       // what format would be appropriate for RNAalifold annotations?
-      String aligfileout = new FormatAdapter().formatSequences("PFAM",
-              al.getSequencesArray());
+      String aligfileout = FileFormat.Pfam.getAlignmentFile().print(
+              al.getSequencesArray(), true);
 
       String anfileout = new AnnotationFile()
               .printAnnotationsForAlignment(al);
@@ -221,13 +222,13 @@ public class RNAStructExportImport
 
       // again what format would be appropriate?
       AlignmentI al_new = new FormatAdapter().readFile(aligfileout,
-              FormatAdapter.PASTE, "PFAM");
+              DataSourceType.PASTE, FileFormat.Pfam);
       assertTrue(
               "Test "
                       + testname
                       + "\nregenerated annotation file did not annotate alignment.",
               new AnnotationFile().readAnnotationFile(al_new, anfileout,
-                      FormatAdapter.PASTE));
+                      DataSourceType.PASTE));
 
       // test for consistency in io
       StockholmFileTest.testAlignmentEquivalence(al, al_new, false);