JAL-3725 restrict mapped virtual feature location to mapped region
[jalview.git] / src / jalview / datamodel / AnnotatedCollectionI.java
index 6bd4ab9..2963fd5 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -31,30 +31,34 @@ public interface AnnotatedCollectionI extends SequenceCollectionI
    */
   AlignmentAnnotation[] getAlignmentAnnotation();
 
-  Iterable<AlignmentAnnotation> findAnnotation(String calcId);
-
   /**
-   * context for this annotated collection
+   * Returns a list of annotations matching the given calc id, or an empty list
+   * if calcId is null
    * 
-   * @return null or the collection upon which this collection is defined (e.g.
-   *         alignment, parent group).
+   * @param calcId
+   * @return
    */
-  AnnotatedCollectionI getContext();
+  Iterable<AlignmentAnnotation> findAnnotation(String calcId);
 
   /**
-   * Return an iterable set of any annotations in the collection that match the
-   * provided criteria, i.e.
-   * <ul>
-   * <li>reference the same sequence datasequence</li>
-   * <li>have the same calcId (source of annotation)</li>
-   * <li>have the same label (type of annotation)</li>
-   * </ul>
+   * Returns an iterable collection of any annotations that match on given
+   * sequence ref, calcId and label (ignoring null values).
    * 
-   * @param datasequence
+   * @param seq
+   *          null or reference sequence to select annotation for
    * @param calcId
+   *          null or the calcId to select annotation for
    * @param label
-   * @return
+   *          null or the label to select annotation for
    */
-  Iterable<AlignmentAnnotation> findAnnotation(SequenceI datasequence,
+  Iterable<AlignmentAnnotation> findAnnotations(SequenceI seq,
           String calcId, String label);
+
+  /**
+   * context for this annotated collection
+   * 
+   * @return null or the collection upon which this collection is defined (e.g.
+   *         alignment, parent group).
+   */
+  AnnotatedCollectionI getContext();
 }