JAL-1422 update any existing configuration to replace SRS with EMBL-EBI Search link
authorJim Procter <jprocter@compbio.dundee.ac.uk>
Mon, 13 Jan 2014 14:01:20 +0000 (14:01 +0000)
committerJim Procter <jprocter@compbio.dundee.ac.uk>
Mon, 13 Jan 2014 14:01:20 +0000 (14:01 +0000)
src/jalview/appletgui/IdPanel.java
src/jalview/gui/Preferences.java

index 0ebb0e8..070004f 100755 (executable)
@@ -73,6 +73,17 @@ public class IdPanel extends Panel implements MouseListener,
 
       }
     }
+    {
+      // upgrade old SRS link
+      int srsPos = links
+              .indexOf("SRS|http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-newId+(([uniprot-all:$SEQUENCE_ID$]))+-view+SwissEntry");
+      if (srsPos > -1)
+      {
+        links.setElementAt(
+                "EMBL-EBI Search|http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$",
+                srsPos);
+      }
+    }
     if (links.size() < 1)
     {
       links = new java.util.Vector();
index 21cfd86..0f23ecd 100755 (executable)
@@ -80,6 +80,18 @@ public class Preferences extends GPreferences
     {
       System.out.println(ex + "\nError parsing sequence links");
     }
+    {
+      // upgrade old SRS link
+      int srsPos = sequenceURLLinks
+              .indexOf("SRS|http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-newId+(([uniprot-all:$SEQUENCE_ID$]))+-view+SwissEntry");
+      if (srsPos > -1)
+      {
+        sequenceURLLinks.setElementAt(
+                "EMBL-EBI Search|http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$",
+                srsPos);
+      }
+    }
+
     /**
      * TODO: reformulate groupURL encoding so two or more can be stored in the
      * .properties file as '|' separated strings