X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequenceI.java;h=46669ae037829c70f142e37799cd8c3a9e3e9db2;hb=393316810f2e54f069863145fb35102c6e889d50;hp=fc67efd8e49e4db4f8bf1b94cc2835f0757233ae;hpb=b948e764c92b0954100f216927114b2c9720b76c;p=jalview.git diff --git a/src/jalview/datamodel/SequenceI.java b/src/jalview/datamodel/SequenceI.java index fc67efd..46669ae 100755 --- a/src/jalview/datamodel/SequenceI.java +++ b/src/jalview/datamodel/SequenceI.java @@ -315,10 +315,22 @@ public interface SequenceI public SequenceI getDatasetSequence(); + /** + * Returns a new array containing this sequence's annotations, or null. + */ public AlignmentAnnotation[] getAnnotation(); + /** + * Returns true if this sequence has the given annotation (by object + * identity). + */ public boolean hasAnnotation(AlignmentAnnotation ann); + /** + * Add the given annotation, if not already added, and set its sequence ref to + * be this sequence. Does nothing if this sequence's annotations already + * include this annotation (by identical object reference). + */ public void addAlignmentAnnotation(AlignmentAnnotation annotation); public void removeAlignmentAnnotation(AlignmentAnnotation annotation); @@ -347,12 +359,11 @@ public interface SequenceI public AlignmentAnnotation[] getAnnotation(String label); /** - * Return a list of any annotations which match the given calcId (source) and - * label (type). Null values do not match. + * Returns a (possibly empty) list of any annotations that match on given + * calcId (source) and label (type). Null values do not match. * * @param calcId * @param label - * @return */ public List getAlignmentAnnotations(String calcId, String label);