From 12045b681611d64529bdaf35f05d8cb0d9a2b054 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 13 Jan 2014 14:01:20 +0000 Subject: [PATCH] JAL-1422 update any existing configuration to replace SRS with EMBL-EBI Search link --- src/jalview/appletgui/IdPanel.java | 11 +++++++++++ src/jalview/gui/Preferences.java | 12 ++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/jalview/appletgui/IdPanel.java b/src/jalview/appletgui/IdPanel.java index 0ebb0e8..070004f 100755 --- a/src/jalview/appletgui/IdPanel.java +++ b/src/jalview/appletgui/IdPanel.java @@ -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(); diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index 21cfd86..0f23ecd 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -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 -- 1.7.10.2