JAL-1528 bug fixes and adjustments to Chimera interface
[jalview.git] / src / jalview / datamodel / Alignment.java
index f19d117..b2d4f0f 100755 (executable)
@@ -20,6 +20,8 @@
  */
 package jalview.datamodel;
 
+import jalview.util.MessageManager;
+
 import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.Hashtable;
@@ -117,7 +119,7 @@ public class Alignment implements AlignmentI
    */
   public static AlignmentI createAlignment(CigarArray compactAlignment)
   {
-    throw new Error("Alignment(CigarArray) not yet implemented");
+    throw new Error(MessageManager.getString("error.alignment_cigararray_not_implemented"));
     // this(compactAlignment.refCigars);
   }
 
@@ -1526,32 +1528,4 @@ public class Alignment implements AlignmentI
   {
     return dataset;
   }
-
-  /**
-   * Returns an iterable collection of annotations on this alignment which match
-   * the given criteria.
-   */
-  @Override
-  public Iterable<AlignmentAnnotation> findAnnotation(SequenceI datasequence,
-          String calcId, String label)
-  {
-    List<AlignmentAnnotation> result = new ArrayList<AlignmentAnnotation>();
-    for (AlignmentAnnotation ann : annotations)
-    {
-      // only sequence-linked annotations can qualify (have a datasequence)
-      if (ann.sequenceRef == null)
-      {
-        continue;
-      }
-      boolean matchDatasequence = (ann.sequenceRef.getDatasetSequence() == datasequence);
-      final String annCalcId = ann.getCalcId();
-      boolean matchCalcId = (annCalcId != null && annCalcId.equals(calcId));
-      boolean matchLabel = (ann.label != null && ann.label.equals(label));
-      if (matchDatasequence && matchCalcId && matchLabel)
-      {
-        result.add(ann);
-      }
-    }
-    return result;
-  }
 }