tidy imports and switch over to use das source registry API
authorjprocter <jprocter@compbio.dundee.ac.uk>
Wed, 29 Feb 2012 16:23:19 +0000 (16:23 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Wed, 29 Feb 2012 16:23:19 +0000 (16:23 +0000)
src/jalview/gui/SequenceFetcher.java

index 43c9d42..7ffd3e4 100755 (executable)
@@ -17,7 +17,6 @@
  */
 package jalview.gui;
 
-import java.io.*;
 import java.util.*;
 
 import java.awt.*;
@@ -25,19 +24,12 @@ import java.awt.event.*;
 
 import javax.swing.*;
 
-import MCview.*;
 import jalview.datamodel.*;
-import jalview.datamodel.xdb.embl.*;
-import java.io.File;
 import jalview.io.*;
-import jalview.ws.DBRefFetcher;
-import jalview.ws.ebi.EBIFetchClient;
-import jalview.ws.seqfetcher.ASequenceFetcher;
+import jalview.ws.dbsources.das.api.DasSourceRegistryI;
 import jalview.ws.seqfetcher.DbSourceProxy;
 
-import java.awt.Rectangle;
 import java.awt.BorderLayout;
-import java.awt.Dimension;
 
 public class SequenceFetcher extends JPanel implements Runnable
 {
@@ -56,7 +48,7 @@ public class SequenceFetcher extends JPanel implements Runnable
 
   private static jalview.ws.SequenceFetcher sfetch = null;
 
-  private static String dasRegistry = null;
+  private static DasSourceRegistryI dasRegistry = null;
 
   private static boolean _initingFetcher = false;
 
@@ -102,7 +94,7 @@ public class SequenceFetcher extends JPanel implements Runnable
       }
     }
     if (sfetch == null
-            || dasRegistry != DasSourceBrowser.getDasRegistryURL())
+            || dasRegistry != jalview.bin.Cache.getDasSourceRegistry())
     {
       _initingFetcher = true;
       initingThread = Thread.currentThread();
@@ -114,7 +106,9 @@ public class SequenceFetcher extends JPanel implements Runnable
         guiWindow.setProgressBar("Initialising Sequence Database Fetchers",
                 Thread.currentThread().hashCode());
       }
-      dasRegistry = DasSourceBrowser.getDasRegistryURL();
+      dasRegistry = jalview.bin.Cache.getDasSourceRegistry();
+      dasRegistry.refreshSources();
+      
       jalview.ws.SequenceFetcher sf = new jalview.ws.SequenceFetcher();
       if (guiWindow != null)
       {