*/
package jalview.gui;
+import static jalview.util.UrlConstants.DB_ACCESSION;
+import static jalview.util.UrlConstants.EMBLEBI_STRING;
+import static jalview.util.UrlConstants.SEQUENCE_ID;
+import static jalview.util.UrlConstants.SRS_STRING;
+
import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
import jalview.bin.Cache;
import jalview.gui.Help.HelpId;
public static List<String> groupURLLinks;
static
{
- String string = Cache
- .getDefault(
- "SEQUENCE_LINKS",
- "EMBL-EBI Search|http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$");
+ String string = Cache.getDefault("SEQUENCE_LINKS", EMBLEBI_STRING);
sequenceURLLinks = new Vector<String>();
try
String name = st.nextToken();
String url = st.nextToken();
// check for '|' within a regex
- int rxstart = url.indexOf("$SEQUENCE_ID$");
+ int rxstart = url.indexOf("$" + DB_ACCESSION + "$");
+ if (rxstart == -1)
+ {
+ rxstart = url.indexOf("$" + SEQUENCE_ID + "$");
+ }
while (rxstart == -1 && url.indexOf("/=$") == -1)
{
url = url + "|" + st.nextToken();
}
{
// 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");
+ int srsPos = sequenceURLLinks.indexOf(SRS_STRING);
if (srsPos > -1)
{
- sequenceURLLinks
- .setElementAt(
- "EMBL-EBI Search|http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$",
- srsPos);
+ sequenceURLLinks.setElementAt(EMBLEBI_STRING, srsPos);
}
}
else
{
Cache.applicationProperties.remove("SEQUENCE_LINKS");
+ sequenceURLLinks.clear();
}
Cache.applicationProperties.setProperty("USE_PROXY",