JAL-1712 fixes/tests for Castor binding and 'show flanking regions'
[jalview.git] / src / jalview / datamodel / AlignmentAnnotation.java
index 1bbe81e..b608139 100755 (executable)
  */
 package jalview.datamodel;
 
-import jalview.analysis.Rna;
-import jalview.analysis.SecStrConsensus.SimpleBP;
-import jalview.analysis.WUSSParseException;
-
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -32,6 +28,10 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.Map.Entry;
 
+import jalview.analysis.Rna;
+import jalview.analysis.SecStrConsensus.SimpleBP;
+import jalview.analysis.WUSSParseException;
+
 /**
  * DOCUMENT ME!
  * 
@@ -1359,8 +1359,21 @@ public class AlignmentAnnotation
   {
     if (properties == null)
     {
-      return Collections.EMPTY_LIST;
+      return Collections.emptyList();
     }
     return properties.keySet();
   }
+
+  /**
+   * Returns the Annotation for the given sequence position (base 1) if any,
+   * else null
+   * 
+   * @param position
+   * @return
+   */
+  public Annotation getAnnotationForPosition(int position)
+  {
+    return sequenceMapping == null ? null : sequenceMapping.get(position);
+
+  }
 }