+ // test for one off matches - sequence position and sequence ID
+ // //// is the searchString a residue number?
+ try
+ {
+ int res = Integer.parseInt(searchString);
+ // possibly a residue number - check if valid for seq
+ if (seq.getEnd() >= res)
+ {
+ searchResults.addResult(seq, res, res);
+ hasResults = true;
+ // resIndex=seq.getLength();
+ // seqIndex++;
+ if (!findAll)
+ {
+ found = true;
+ break;
+ }
+ }
+ } catch (NumberFormatException ex)
+ {
+ }
+
+ if (regex.search(seq.getName()) && !idMatch.contains(seq))
+ {
+ idMatch.addElement(seq);
+ hasResults = true;
+ if (!findAll)
+ {
+ // stop and return the match
+ found = true;
+ break;
+ }
+ }
+
+ if (isIncludeDescription() && seq.getDescription() != null
+ && regex.search(seq.getDescription())
+ && !idMatch.contains(seq))