3 import jalview.datamodel.SearchResultsI;
4 import jalview.datamodel.SequenceI;
9 * An interface for searching for a pattern in an aligment
11 public interface FinderI
15 * Performs a find for the given search string (interpreted as a regular
16 * expression). Search may optionally be case-sensitive, and may optionally
17 * including match in sequence description (sequence id is always searched).
18 * If the viewport has an active selection, then the find is restricted to the
19 * selection region. Sequences matched by id or description can be retrieved
20 * by getIdMatches(), and matched residue patterns by getSearchResults().
22 * @param theSearchString
23 * @param caseSensitive
24 * @param searchDescription
27 void findAll(String theSearchString, boolean caseSensitive,
28 boolean searchDescription);
31 * Finds the next match for the given search string (interpreted as a regular
32 * expression), starting from the position after the last match found. Search
33 * may optionally be case-sensitive, and may optionally including match in
34 * sequence description (sequence id is always searched). If the viewport has
35 * an active selection, then the find is restricted to the selection region.
36 * Sequences matched by id or description can be retrieved by getIdMatches(),
37 * and matched residue patterns by getSearchResults().
39 * @param theSearchString
40 * @param caseSensitive
41 * @param searchDescription
44 void findNext(String theSearchString, boolean caseSensitive,
45 boolean searchDescription);
48 * Returns the (possibly empty) list of sequences matched on sequence name or
53 List<SequenceI> getIdMatches();
56 * Answers the search results (possibly empty) from the last search
60 SearchResultsI getSearchResults();