X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fapi%2FFinderI.java;h=8f6232e25816e7647e132bd44fe23e4212b5104f;hb=384106be0a0d20f905a628eb602e0a7a408ef5c9;hp=a1a3efd144e32eaa2eca2fd14c73f4aa7d3d4e24;hpb=24de2d6a6f3db1b9d55f367e2bf8ba112e202a8a;p=jalview.git diff --git a/src/jalview/api/FinderI.java b/src/jalview/api/FinderI.java index a1a3efd..8f6232e 100644 --- a/src/jalview/api/FinderI.java +++ b/src/jalview/api/FinderI.java @@ -1,7 +1,26 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.api; import jalview.datamodel.SearchResultsI; -import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; import java.util.List; @@ -15,36 +34,48 @@ public interface FinderI /** * Performs a find for the given search string (interpreted as a regular * expression). Search may optionally be case-sensitive, and may optionally - * including match in sequence description (sequence id is always searched). - * If selection is not null, then the find is restricted to the - * selection region. Sequences matched by id or description can be retrieved - * by getIdMatches(), and matched residue patterns by getSearchResults(). + * including match in sequence description (sequence id is always searched). If + * the viewport has an active selection, then the find is restricted to the + * selection region. Sequences matched by id or description can be retrieved by + * getIdMatches(), and matched residue patterns by getSearchResults(). + *

+ * If {@code ignoreHidden} is true, then any residues in hidden columns are + * ignored (skipped) when matching, so for example pattern {@code KRT} would + * match sequence {@code KRqmT} (where {@code qm} are in hidden columns). + *

+ * Matches of entirely hidden patterns are not returned. Matches that span + * hidden regions on one or both sides may be returned. * * @param theSearchString * @param caseSensitive * @param searchDescription + * @param ignoreHidden * @return */ - void findAll(String theSearchString, SequenceGroup selection, - boolean caseSensitive, boolean searchDescription); + void findAll(String theSearchString, boolean caseSensitive, + boolean searchDescription, boolean ignoreHidden); /** * Finds the next match for the given search string (interpreted as a regular * expression), starting from the position after the last match found. Search * may optionally be case-sensitive, and may optionally including match in - * sequence description (sequence id is always searched). If - * selection is not null, then the find is restricted to the - * selection region. Sequences matched by id or description can be retrieved - * by getIdMatches(), and matched residue patterns by getSearchResults(). + * sequence description (sequence id is always searched). If the viewport has an + * active selection, then the find is restricted to the selection region. + * Sequences matched by id or description can be retrieved by getIdMatches(), + * and matched residue patterns by getSearchResults(). + *

+ * If {@code ignoreHidden} is true, any hidden residues are skipped (matches may + * span them). If false, they are included for matching purposes. In either + * cases, entirely hidden matches are not returned. * * @param theSearchString - * @param selection * @param caseSensitive * @param searchDescription + * @param ignoreHidden * @return */ - void findNext(String theSearchString, SequenceGroup selection, - boolean caseSensitive, boolean searchDescription); + void findNext(String theSearchString, boolean caseSensitive, + boolean searchDescription, boolean ignoreHidden); /** * Returns the (possibly empty) list of sequences matched on sequence name or