JAL-2110 make indirect xref searches work by not filtering refs on candidates after...
authorJim Procter <jprocter@issues.jalview.org>
Thu, 23 Jun 2016 13:15:05 +0000 (14:15 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Thu, 23 Jun 2016 13:15:05 +0000 (14:15 +0100)
src/jalview/analysis/CrossRef.java

index 1cd6a3d..0011e39 100644 (file)
@@ -827,21 +827,16 @@ public class CrossRef
           // look for direct or indirect references in common
           DBRefEntry[] poss = nxt.getDBRefs();
           List<DBRefEntry> cands = null;
-          /*
-           * TODO does this make any sense?
-           * if 'direct', search the dbrefs for xrf
-           * else, filter the dbrefs by type and then search for xrf
-           * - the result is the same isn't it?
-           */
-          if (direct)
-          {
-            cands = DBRefUtils.searchRefs(poss, xrf);
-          }
-          else
-          {
-            poss = DBRefUtils.selectDbRefs(!fromDna, poss);
-            cands = DBRefUtils.searchRefs(poss, xrf);
-          }
+
+          // todo: indirect specifies we select either direct references to nxt
+          // that match xrf which is indirect to sequenceI, or indirect
+          // references to nxt that match xrf which is direct to sequenceI
+          cands = DBRefUtils.searchRefs(poss, xrf);
+          // else
+          // {
+          // poss = DBRefUtils.selectDbRefs(nxt.isProtein()!fromDna, poss);
+          // cands = DBRefUtils.searchRefs(poss, xrf);
+          // }
           if (!cands.isEmpty())
           {
             if (!rseqs.contains(nxt))