JAL-1238 order to place primary sources before lower tier sources
authorjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 18 Jan 2013 15:55:58 +0000 (15:55 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 18 Jan 2013 15:55:58 +0000 (15:55 +0000)
src/jalview/ws/seqfetcher/ASequenceFetcher.java

index 45b866e..e475915 100644 (file)
@@ -272,9 +272,10 @@ public class ASequenceFetcher
       DbSourceProxy[] l = dblist.values().toArray(new DbSourceProxy[0]);
       int i = 0;
       String[] nm = new String[l.length];
+      // make sure standard dbs appear first, followed by reference das sources, followed by anything else.
       for (DbSourceProxy s : l)
       {
-        nm[i++] = s.getDbName().toLowerCase();
+        nm[i++] = ""+s.getTier()+s.getDbName().toLowerCase();
       }
       jalview.util.QuickSort.sort(nm, l);
       dbs = new ArrayList<DbSourceProxy>();