+ if (dbr != null)
+ {
+ for (int r = 0; r < dbr.length; r++)
+ {
+ if (id != null && dbr[r].getAccessionId().equals(id))
+ {
+ // suppress duplicate link creation for the bare sequence ID
+ // string with this link
+ id = null;
+ }
+ // create Bare ID link for this RUL
+ String[] urls = urlLink.makeUrls(dbr[r].getAccessionId(),
+ true);
+ if (urls != null)
+ {
+ for (int u = 0; u < urls.length; u += 2)
+ {
+ if (!linkset.contains(urls[u] + "|" + urls[u + 1]))
+ {
+ linkset.addElement(urls[u] + "|" + urls[u + 1]);
+ addshowLink(linkMenu, label + "|" + urls[u],
+ urls[u + 1]);
+ }
+ }
+ }
+ }
+ }
+ if (id != null)
+ {
+ // create Bare ID link for this RUL
+ String[] urls = urlLink.makeUrls(id, true);
+ if (urls != null)
+ {
+ for (int u = 0; u < urls.length; u += 2)
+ {
+ if (!linkset.contains(urls[u] + "|" + urls[u + 1]))
+ {
+ linkset.addElement(urls[u] + "|" + urls[u + 1]);
+ addshowLink(linkMenu, label, urls[u + 1]);
+ }
+ }
+ }
+ }
+ // Create urls from description but only for URL links which are regex
+ // links
+ if (descr != null && urlLink.getRegexReplace() != null)
+ {
+ // create link for this URL from description where regex matches
+ String[] urls = urlLink.makeUrls(descr, true);
+ if (urls != null)
+ {
+ for (int u = 0; u < urls.length; u += 2)
+ {
+ if (!linkset.contains(urls[u] + "|" + urls[u + 1]))
+ {
+ linkset.addElement(urls[u] + "|" + urls[u + 1]);
+ addshowLink(linkMenu, label, urls[u + 1]);
+ }
+ }
+ }
+ }