Merge branch 'feature/JAL-3127_seqidChainshading' into merge/JAL-3127
[jalview.git] / src / jalview / bin / Jalview.java
index 88b359f..cc41c53 100755 (executable)
@@ -391,10 +391,7 @@ public class Jalview
     FileFormatI format = null;
     DataSourceType protocol = null;
     FileLoader fileLoader = new FileLoader(!headless);
-    Vector<String> getFeatures = null; // vector of das source nicknames to
-                                       // fetch
-    // features from
-    // loading is done.
+
     String groovyscript = null; // script to execute after all loading is
     // completed one way or another
     // extract groovy argument and execute if necessary
@@ -626,27 +623,6 @@ public class Jalview
         // TODO - load PDB structure(s) to alignment JAL-629
         // (associate with identical sequence in alignment, or a specified
         // sequence)
-
-        getFeatures = checkDasArguments(aparser);
-        if (af != null && getFeatures != null)
-        {
-          FeatureFetcher ff = startFeatureFetching(getFeatures);
-          if (ff != null)
-          {
-            while (!ff.allFinished() || af.operationInProgress())
-            {
-              // wait around until fetching is finished.
-              try
-              {
-                Thread.sleep(100);
-              } catch (Exception e)
-              {
-
-              }
-            }
-          }
-          getFeatures = null; // have retrieved features - forget them now.
-        }
         if (groovyscript != null)
         {
           // Execute the groovy script after we've done all the rendering stuff
@@ -788,20 +764,9 @@ public class Jalview
 
       startUpAlframe = fileLoader.LoadFileWaitTillLoaded(file, protocol,
               format);
-      getFeatures = checkDasArguments(aparser);
       // extract groovy arguments before anything else.
     }
-    // If the user has specified features to be retrieved,
-    // or a groovy script to be executed, do them if they
-    // haven't been done already
-    // fetch features for the default alignment
-    if (getFeatures != null)
-    {
-      if (startUpAlframe != null)
-      {
-        startFeatureFetching(getFeatures);
-      }
-    }
+
     // Once all other stuff is done, execute any groovy scripts (in order)
     if (groovyscript != null)
     {
@@ -864,9 +829,6 @@ public class Jalview
                     // (quote the 'PROPERTY=VALUE' pair to ensure spaces are
                     // passed in correctly)"
                     + "-jabaws URL\tSpecify URL for Jabaws services (e.g. for a local installation).\n"
-                    + "-dasserver nickname=URL\tAdd and enable a das server with given nickname\n\t\t\t(alphanumeric or underscores only) for retrieval of features for all alignments.\n"
-                    + "\t\t\tSources that also support the sequence command may be specified by prepending the URL with sequence:\n"
-                    + "\t\t\t e.g. sequence:http://localdas.somewhere.org/das/source)\n"
                     + "-fetchfrom nickname\tQuery nickname for features for the alignments and display them.\n"
                     // +
                     // "-vdoc vamsas-document\tImport vamsas document into new
@@ -1025,94 +987,6 @@ public class Jalview
     }
   }
 
-  /**
-   * Check commandline for any das server definitions or any fetchfrom switches
-   * 
-   * @return vector of DAS source nicknames to retrieve from
-   */
-  private static Vector<String> checkDasArguments(ArgsParser aparser)
-  {
-    Vector<String> source = null;
-    String data;
-    String locsources = Cache.getProperty(Cache.DAS_LOCAL_SOURCE);
-    while ((data = aparser.getValue("dasserver", true)) != null)
-    {
-      String nickname = null;
-      String url = null;
-      int pos = data.indexOf('=');
-      // determine capabilities
-      if (pos > 0)
-      {
-        nickname = data.substring(0, pos);
-      }
-      url = data.substring(pos + 1);
-      if (url != null && (url.startsWith("http:")
-              || url.startsWith("sequence:http:")))
-      {
-        if (nickname == null)
-        {
-          nickname = url;
-        }
-        if (locsources == null)
-        {
-          locsources = "";
-        }
-        else
-        {
-          locsources += "\t";
-        }
-        locsources = locsources + nickname + "|" + url;
-        System.err.println(
-                "NOTE! dasserver parameter not yet really supported (got args of "
-                        + nickname + "|" + url);
-        if (source == null)
-        {
-          source = new Vector<>();
-        }
-        source.addElement(nickname);
-      }
-      System.out.println(
-              "CMD [-dasserver " + data + "] executed successfully!");
-    } // loop until no more server entries are found.
-    if (locsources != null && locsources.indexOf('|') > -1)
-    {
-      Cache.log.debug("Setting local source list in properties file to:\n"
-              + locsources);
-      Cache.setProperty(Cache.DAS_LOCAL_SOURCE, locsources);
-    }
-    while ((data = aparser.getValue("fetchfrom", true)) != null)
-    {
-      System.out.println("adding source '" + data + "'");
-      if (source == null)
-      {
-        source = new Vector<>();
-      }
-      source.addElement(data);
-    }
-    return source;
-  }
-
-  /**
-   * start a feature fetcher for every alignment frame
-   * 
-   * @param dasSources
-   */
-  private FeatureFetcher startFeatureFetching(
-          final Vector<String> dasSources)
-  {
-    FeatureFetcher ff = new FeatureFetcher();
-    AlignFrame afs[] = Desktop.getAlignFrames();
-    if (afs == null || afs.length == 0)
-    {
-      return null;
-    }
-    for (int i = 0; i < afs.length; i++)
-    {
-      ff.addFetcher(afs[i], dasSources);
-    }
-    return ff;
-  }
-
   public static boolean isHeadlessMode()
   {
     String isheadless = System.getProperty("java.awt.headless");