JAL-1644 improvment of finder logic to include the sequence description field
authorCharles Ofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 2 Feb 2015 10:30:13 +0000 (10:30 +0000)
committerCharles Ofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 2 Feb 2015 10:30:13 +0000 (10:30 +0000)
src/jalview/analysis/Finder.java

index 96151d7..b253642 100644 (file)
  */
 package jalview.analysis;
 
-import java.util.*;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.SearchResults;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceGroup;
 
-import jalview.datamodel.*;
+import java.util.Vector;
 
 public class Finder
 {
@@ -146,6 +149,18 @@ public class Finder
             break;
           }
         }
+
+        if (regex.search(seq.getDescription()))
+        {
+          idMatch.addElement(seq);
+          hasResults = true;
+          if (!findAll)
+          {
+            // stop and return the match
+            found = true;
+            break;
+          }
+        }
       }
       item = seq.getSequenceAsString();