- String link = links.elementAt(i).toString();
- UrlLink urlLink = null;
- try
- {
- urlLink = new UrlLink(link);
- } catch (Exception foo)
- {
- jalview.bin.Cache.log.error("Exception for URLLink '" + link
- + "'", foo);
- continue;
- }
- ;
- if (!urlLink.isValid())
+ urlLink = new UrlLink(link);
+ } catch (Exception foo)
+ {
+ Cache.log.error("Exception for URLLink '" + link + "'", foo);
+ continue;
+ }
+ ;
+ if (!urlLink.isValid())
+ {
+ Cache.log.error(urlLink.getInvalidMessage());
+ continue;
+ }
+ final String label = urlLink.getLabel();
+ if (seq != null && urlLink.isDynamic())
+ {
+
+ // collect matching db-refs
+ DBRefEntry[] dbr = DBRefUtils.selectRefs(seq.getDBRefs(),
+ new String[] { urlLink.getTarget() });
+ // collect id string too
+ String id = seq.getName();
+ String descr = seq.getDescription();
+ if (descr != null && descr.length() < 1)