feature locations are retrieved by associated accession string and public debug repor...
[jalview.git] / src / jalview / datamodel / AlignmentI.java
index ab198c1..34a5ff2 100755 (executable)
@@ -165,6 +165,9 @@ public interface AlignmentI
 
   /**
    * Adds a new AlignmentAnnotation to this alignment
+   * @note Care should be taken to ensure that annotation is at
+   * least as wide as the longest sequence in the alignment
+   * for rendering purposes.
    */
   public void addAnnotation(AlignmentAnnotation aa);
   /**
@@ -175,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
@@ -223,7 +230,7 @@ public interface AlignmentI
 
   /**
    * Set the associated dataset for the alignment, or create one.
-   * @param dataset The dataset alignment or null to construct one. 
+   * @param dataset The dataset alignment or null to construct one.
    */
   public void setDataset(Alignment dataset);
 
@@ -240,4 +247,24 @@ public interface AlignmentI
    * @return CigarArray
    */
   public CigarArray getCompactAlignment();
+
+  /**
+   * Set an arbitrary key value pair for an alignment.
+   * Note: both key and value objects should return a 
+   * meaningful, human readable response to .toString()
+   * @param key
+   * @param value
+   */
+  public void setProperty(Object key, Object value);
+  /**
+   * Get a named property from the alignment. 
+   * @param key
+   * @return value of property
+   */
+  public Object getProperty(Object key);
+  /**
+   * Get the property hashtable.
+   * @return hashtable of alignment properties (or null if none are defined)
+   */
+  public Hashtable getProperties();
 }