Merge branch 'develop' into features/JAL-250_hideredundantseqs
[jalview.git] / src / jalview / bin / JalviewLiteURLRetrieve.java
index 156e146..f2ffda5 100644 (file)
@@ -25,6 +25,7 @@ import jalview.io.AppletFormatAdapter;
 import jalview.io.DataSourceType;
 import jalview.io.FileFormat;
 import jalview.io.FileFormatI;
+import jalview.io.FileFormats;
 import jalview.io.FileParse;
 import jalview.io.IdentifyFile;
 
@@ -85,8 +86,8 @@ public class JalviewLiteURLRetrieve extends Applet
 
       } catch (Exception ex)
       {
-        System.out.println("Exception checking resources: " + file + " "
-                + ex);
+        System.out.println(
+                "Exception checking resources: " + file + " " + ex);
       }
       if (file.indexOf("://") > -1)
       {
@@ -115,7 +116,8 @@ public class JalviewLiteURLRetrieve extends Applet
                 + " cannot be read with protocol==" + protocol);
         return;
       }
-      FileFormatI format = FileFormat.valueOf(getParameter("format"));
+      FileFormatI format = FileFormats.getInstance()
+              .forName(getParameter("format"));
       if (format == null)
       {
         format = new IdentifyFile().identify(file, protocol);
@@ -136,8 +138,8 @@ public class JalviewLiteURLRetrieve extends Applet
       }
       if (al != null)
       {
-        System.out.println(new AppletFormatAdapter().formatSequences(
-                FileFormat.Fasta, al, false));
+        System.out.println(new AppletFormatAdapter()
+                .formatSequences(FileFormat.Fasta, al, false));
       }
     } catch (Exception e)
     {