1 package jalview.datamodel;
3 import jalview.datamodel.SearchResults.Match;
5 import java.util.BitSet;
8 public interface SearchResultsI
12 * This method replaces the old search results which merely held an alignment
13 * index of search matches. This broke when sequences were moved around the
23 public abstract void addResult(SequenceI seq, int start, int end);
26 * Quickly check if the given sequence is referred to in the search results
29 * (specific alignment sequence or a dataset sequence)
30 * @return true if the results involve sequence
32 public abstract boolean involvesSequence(SequenceI sequence);
35 * This Method returns the search matches which lie between the start and end
36 * points of the sequence in question . It is optimised for returning objects
37 * for drawing on SequenceCanvas
40 * sequence to highlight columns according to matches
42 * - first column of visible region
44 * - last column of visible region
45 * @return int[] ranges within start/end index on sequence
47 public abstract int[] getResults(SequenceI sequence, int start, int end);
49 public abstract int getSize();
51 public abstract SequenceI getResultSequence(int index);
54 * Returns the start position of the i'th match in the search results.
59 public abstract int getResultStart(int i);
62 * Returns the end position of the i'th match in the search results.
67 public abstract int getResultEnd(int i);
70 * Returns true if no search result matches are held.
74 public abstract boolean isEmpty();
77 * Returns the list of matches.
81 public abstract List<Match> getResults();
84 * Set bits in a bitfield for all columns in the given sequence collection
85 * that are highlighted
88 * the set of sequences to search for highlighted regions
91 * @return number of bits set
93 public abstract int markColumns(SequenceCollectionI sqcol, BitSet bs);