X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fdatamodel%2FSequenceI.java;h=0b2656416e5ab49339fed5cd60cc801cb86b90e2;hb=3d4ead4880755ec949de0300c232544ba965e60d;hp=8dce31e586b4bc0ce21c7f9e6dee66736d2b3db8;hpb=948bd3bcbacc509da0cefaae3eedd97300a6ccce;p=jalview.git diff --git a/src/jalview/datamodel/SequenceI.java b/src/jalview/datamodel/SequenceI.java index 8dce31e..0b26564 100755 --- a/src/jalview/datamodel/SequenceI.java +++ b/src/jalview/datamodel/SequenceI.java @@ -20,8 +20,10 @@ */ package jalview.datamodel; +import jalview.datamodel.Sequence.DBModList; import jalview.datamodel.features.SequenceFeaturesI; import jalview.util.MapList; +import jalview.ws.params.InvalidArgumentException; import java.util.BitSet; import java.util.Iterator; @@ -112,9 +114,11 @@ public interface SequenceI extends ASequenceI * get a range on the sequence as a string * * @param start - * position relative to start of sequence including gaps (from 0) + * (inclusive) position relative to start of sequence including gaps + * (from 0) * @param end - * position relative to start of sequence including gaps (from 0) + * (exclusive) position relative to start of sequence including gaps + * (from 0) * * @return String containing all gap and symbols in specified range */ @@ -206,14 +210,17 @@ public interface SequenceI extends ASequenceI public int findPosition(int i); /** - * Returns the from-to sequence positions (start..) for the given column - * positions (1..), or null if no residues are included in the range + * Returns the sequence positions for first and last residues lying within the + * given column positions [fromColum,toColumn] (where columns are numbered + * from 1), or null if no residues are included in the range * * @param fromColum + * - first column base 1 * @param toColumn + * - last column, base 1 * @return */ - public Range findPositions(int fromColum, int toColumn); + public ContiguousI findPositions(int fromColum, int toColumn); /** * Returns an int array where indices correspond to each residue in the @@ -350,14 +357,17 @@ public interface SequenceI extends ASequenceI /** * set the array of Database references for the sequence. * + * BH 2019.02.04 changes param to DBModlist + * * @param dbs * @deprecated - use is discouraged since side-effects may occur if DBRefEntry * set are not normalised. + * @throws InvalidArgumentException if the is not one created by Sequence itself */ @Deprecated - public void setDBRefs(DBRefEntry[] dbs); + public void setDBRefs(DBModList dbs); - public DBRefEntry[] getDBRefs(); + public DBModList getDBRefs(); /** * add the given entry to the list of DBRefs for this sequence, or replace a @@ -573,4 +583,49 @@ public interface SequenceI extends ASequenceI * @return first residue not contained in regions */ public int firstResidueOutsideIterator(Iterator it); + + /** + * @author Bob Hanson 2019.07.30 + * + * get a 4-byte color, with caching + * + */ + public int getColor(int i); + + /** + * @author Bob Hanson 2019.07.30 + * + * set a 4-byte color, with caching + * + */ + public int setColor(int i, int argb); + + /** + * @author Bob Hanson 2019.07.30 + * + * allows resetting the color cache + * + */ + public void resetColors(); + + /** + * allows passing the result ArrayList as a parameter to avoid unnecessary + * construction + * + * @author Bob Hanson 2019.07.30 + * + * + */ + List findFeatures(int column, String type, + List result); + + /** + * allows early intervention for renderer if false + * + * @author Bob Hanson 2019.07.30 + * + */ + public boolean hasFeatures(String type); + } +