X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fdatamodel%2FAlignmentI.java;h=558b38d69665439b4e5e65b7081f4d10664be707;hb=9efc6af45120e24f7a11cc8ce6409139844e5001;hp=f937bd325c3b1f8ebaec56f3afd57f67dc6515de;hpb=a0b666f6b2b220b28baf6022a41ecf3c50db7d0c;p=jalview.git diff --git a/src/jalview/datamodel/AlignmentI.java b/src/jalview/datamodel/AlignmentI.java index f937bd3..558b38d 100755 --- a/src/jalview/datamodel/AlignmentI.java +++ b/src/jalview/datamodel/AlignmentI.java @@ -178,11 +178,15 @@ public interface AlignmentI public void setAnnotationIndex(AlignmentAnnotation aa, int index); /** - * Deletes a specific AlignmentAnnotation from the alignment. - * + * 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. 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 @@ -260,7 +264,42 @@ public interface AlignmentI public Object getProperty(Object key); /** * Get the property hashtable. - * @return hashtable of alignment properties (if any) + * @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); + }