3 import jalview.datamodel.SearchResultsI;
4 import jalview.datamodel.SequenceGroup;
5 import jalview.datamodel.SequenceI;
10 * An interface for searching for a pattern in an aligment
12 public interface FinderI
16 * Performs a find for the given search string (interpreted as a regular
17 * expression). Search may optionally be case-sensitive, and may optionally
18 * including match in sequence description (sequence id is always searched).
19 * If <code>selection</code> is not null, then the find is restricted to the
20 * selection region. Sequences matched by id or description can be retrieved
21 * by getIdMatches(), and matched residue patterns by getSearchResults().
23 * @param theSearchString
24 * @param caseSensitive
25 * @param searchDescription
28 void findAll(String theSearchString, SequenceGroup selection,
29 boolean caseSensitive, boolean searchDescription);
32 * Finds the next match for the given search string (interpreted as a regular
33 * expression), starting from the position after the last match found. Search
34 * may optionally be case-sensitive, and may optionally including match in
35 * sequence description (sequence id is always searched). If
36 * <code>selection</code> is not null, then the find is restricted to the
37 * selection region. Sequences matched by id or description can be retrieved
38 * by getIdMatches(), and matched residue patterns by getSearchResults().
40 * @param theSearchString
42 * @param caseSensitive
43 * @param searchDescription
46 void findNext(String theSearchString, SequenceGroup selection,
47 boolean caseSensitive, boolean searchDescription);
50 * Returns the (possibly empty) list of sequences matched on sequence name or
55 List<SequenceI> getIdMatches();
58 * Answers the search results (possibly empty) from the last search
62 SearchResultsI getSearchResults();