refactored dropFile allowing known information to be passed in if available
[jalview.git] / src / jalview / bin / Jalview.java
index 39daac6..2b935ed 100755 (executable)
@@ -248,7 +248,7 @@ public class Jalview
       {
         try
         {
-          String viprotocol = Jalview.checkProtocol(vamsasImport);
+          String viprotocol = jalview.io.AppletFormatAdapter.checkProtocol(vamsasImport);
           if (viprotocol == jalview.io.FormatAdapter.FILE)
           {
             inSession = desktop.vamsasImport(new File(vamsasImport));
@@ -333,7 +333,7 @@ public class Jalview
         }
       }
 
-      protocol = checkProtocol(file);
+      protocol = jalview.io.AppletFormatAdapter.checkProtocol(file);
 
       format = new jalview.io.IdentifyFile().Identify(file, protocol);
 
@@ -369,20 +369,20 @@ public class Jalview
       data = aparser.getValue("groups", true);
       if (data != null)
       {
-        af.parseFeaturesFile(data, checkProtocol(data));
+        af.parseFeaturesFile(data, jalview.io.AppletFormatAdapter.checkProtocol(data));
         System.out.println("Added " + data);
       }
       data = aparser.getValue("features", true);
       if (data != null)
       {
-        af.parseFeaturesFile(data, checkProtocol(data));
+        af.parseFeaturesFile(data, jalview.io.AppletFormatAdapter.checkProtocol(data));
         System.out.println("Added " + data);
       }
 
       data = aparser.getValue("annotations", true);
       if (data != null)
       {
-        af.loadJalviewDataFile(data);
+        af.loadJalviewDataFile(data, null, null, null);
         System.out.println("Added " + data);
       }
       // set or clear the sortbytree flag.
@@ -400,7 +400,7 @@ public class Jalview
         jalview.io.NewickFile fin = null;
         try
         {
-          fin = new jalview.io.NewickFile(data, checkProtocol(data));
+          fin = new jalview.io.NewickFile(data, jalview.io.AppletFormatAdapter.checkProtocol(data));
           if (fin != null)
           {
             af.getViewport().setCurrentTree(
@@ -791,17 +791,6 @@ public class Jalview
     }
     return ff;
   }
-
-  private static String checkProtocol(String file)
-  {
-    String protocol = jalview.io.FormatAdapter.FILE;
-
-    if (file.indexOf("http:") > -1 || file.indexOf("file:") > -1)
-    {
-      protocol = jalview.io.FormatAdapter.URL;
-    }
-    return protocol;
-  }
 }
 
 /**