JAL-961 - annotatable datamodel objects can be queried to obtain annotation with...
[jalview.git] / src / jalview / datamodel / AlignmentI.java
index 7810f2b..ec35124 100755 (executable)
@@ -1,6 +1,6 @@
 /*
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
- * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, 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
@@ -431,4 +431,16 @@ public interface AlignmentI
    * @param i
    */
   public void addAnnotation(AlignmentAnnotation consensus, int i);
+
+  /**
+   * search for or create a specific annotation row on the alignment
+   *  
+   * @param method - CalcId for the annotation (must match)
+   * @param autoCalc - value of autocalc flag for the annotation
+   * @param seqRef - null or specific sequence reference
+   * @param groupRef - null or specific group reference 
+   * @return existing annotation matching the given attributes 
+   */
+  public AlignmentAnnotation findOrCreateAnnotation(String name, boolean autoCalc,
+          SequenceI seqRef, SequenceGroup groupRef);
 }