X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Fdatamodel%2FAlignmentI.java;h=f89602fcf79beaf9c994ab342a32ef264dbd2a90;hb=ed52d72ae281a74a5496a605e51159931caa925c;hp=2b210cc9eef479fc628f4585e0fb9c6fb0aa4ee8;hpb=6bbf32c80d96e3ee32d38b9eb1478cd9dd249734;p=jalview.git diff --git a/src/jalview/datamodel/AlignmentI.java b/src/jalview/datamodel/AlignmentI.java index 2b210cc..f89602f 100755 --- a/src/jalview/datamodel/AlignmentI.java +++ b/src/jalview/datamodel/AlignmentI.java @@ -181,11 +181,12 @@ public interface AlignmentI * Deletes a specific AlignmentAnnotation from the alignment, * and removes its reference from any SequenceI object's annotation * if and only if aa is contained within the alignment's annotation - * vector. + * vector. Otherwise, it will do nothing. * * @param aa the annotation to delete + * @return true if annotation was deleted from this alignment. */ - public void deleteAnnotation(AlignmentAnnotation aa); + public boolean deleteAnnotation(AlignmentAnnotation aa); /** * Get the annotation associated with this alignment @@ -266,4 +267,47 @@ public interface AlignmentI * @return hashtable of alignment properties (or null if none are defined) */ public Hashtable getProperties(); + + /** + * add a reference to a frame of aligned codons for this alignment + * @param codons + */ + public void addCodonFrame(AlignedCodonFrame codons); + /** + * remove a particular codon frame reference from this alignment + * @param codons + * @return true if codon frame was removed. + */ + public boolean removeCodonFrame(AlignedCodonFrame codons); + /** + * get all codon frames associated with this alignment + * @return + */ + public AlignedCodonFrame[] getCodonFrames(); + /** + * get a particular codon frame + * @param index + * @return + */ + public AlignedCodonFrame getCodonFrame(int index); + /** + * get codon frames involving sequenceI + */ + public AlignedCodonFrame[] getCodonFrame(SequenceI seq); + /** + * find sequence with given name in alignment + * @param token name to find + * @param b true implies that case insensitive matching will also be tried + * @return matched sequence or null + */ + public SequenceI findName(String token, boolean b); + /** + * find next sequence with given name in alignment starting after a given sequence + * @param startAfter the sequence after which the search will be started (usually the result of the last call to findName) + * @param token name to find + * @param b true implies that case insensitive matching will also be tried + * @return matched sequence or null + */ + public SequenceI findName(SequenceI startAfter, String token, boolean b); + }