/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
*/
package jalview.appletgui;
+import static jalview.util.UrlConstants.EMBLEBI_STRING;
+import static jalview.util.UrlConstants.SRS_STRING;
+
import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceGroup;
}
{
// 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");
+ int srsPos = links.indexOf(SRS_STRING);
if (srsPos > -1)
{
- links.setElementAt(
- "EMBL-EBI Search|http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$",
- srsPos);
+ links.setElementAt(EMBLEBI_STRING, srsPos);
}
}
if (links.size() < 1)
{
links = new java.util.Vector();
- links.addElement("EMBL-EBI Search|http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$");
+ links.addElement(EMBLEBI_STRING);
}
}
url = null;
continue;
}
- ;
+
+ if (urlLink.usesDBAccession())
+ {
+ // this URL requires an accession id, not the name of a sequence
+ url = null;
+ continue;
+ }
+
if (!urlLink.isValid())
{
System.err.println(urlLink.getInvalidMessage());