JAL-1066 JAL-968 common interface for objects that can be associated with alignment...
[jalview.git] / src / jalview / datamodel / AlignmentI.java
index 2991a2d..714cf45 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
  * 
  * This file is part of Jalview.
  * 
@@ -22,7 +22,7 @@ import java.util.*;
 /**
  * Data structure to hold and manipulate a multiple sequence alignment
  */
-public interface AlignmentI
+public interface AlignmentI extends AnnotatedCollectionI
 {
   /**
    * Calculates the number of sequences in an alignment
@@ -204,7 +204,7 @@ 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
+   * reference from any SequenceI or SequenceGroup object's annotation if and only if aa is
    * contained within the alignment's annotation vector. Otherwise, it will do
    * nothing.
    * 
@@ -215,7 +215,22 @@ public interface AlignmentI
   public boolean deleteAnnotation(AlignmentAnnotation aa);
 
   /**
-   * Get the annotation associated with this alignment
+   * Deletes a specific AlignmentAnnotation from the alignment, and optionally removes any
+   * reference from any SequenceI or SequenceGroup 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
+   * @param unhook
+   *          flag indicating if any references should be removed from annotation - use this if you intend to add the annotation back into the alignment
+   * @return true if annotation was deleted from this alignment.
+   */
+  public boolean deleteAnnotation(AlignmentAnnotation aa, boolean unhook);
+
+  /**
+   * Get the annotation associated with this alignment (this can be null if no
+   * annotation has ever been created on the alignment)
    * 
    * @return array of AlignmentAnnotation objects
    */