import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;
+
+import com.stevesoft.pat.Regex;
+
import jalview.datamodel.*;
import jalview.io.*;
import jalview.util.DBRefUtils;
{
DBRefEntry dbr = new DBRefEntry(), found[] = null;
dbr.setSource(proxy.getDbSource());
+ dbr.setVersion(null);
+ if (proxy.getAccessionValidator()!=null) {
+ Regex vgr=proxy.getAccessionValidator();
+ vgr.search(q);
+ if (vgr.numSubs()>0) {
+ dbr.setAccessionId(vgr.stringMatched(1));
+ } else {
+ dbr.setAccessionId(vgr.stringMatched());
+ }
+ } else {
+ dbr.setAccessionId(q);
+ }
boolean rfound = false;
for (int r = 0; r < rs.length; r++)
{
\r
/**\r
* Regular expression for checking form of query string understood by this\r
- * source.\r
+ * source. If the Regex includes parenthesis, then the first parenthesis\r
+ * should yield the same accession string as the one used to annotate the\r
+ * sequence. This is used to match query strings to returned sequences.\r
* \r
* @return null or a validation regex\r
*/\r