JAL-1601 Expand secondary structure prediction tests
[jalview.git] / src / jalview / datamodel / AlignmentAnnotation.java
index e832c2f..40dfdd9 100755 (executable)
@@ -1625,6 +1625,8 @@ public class AlignmentAnnotation
   private void removeHiddenAnnotation(int start, int end,
           HiddenColumns hiddenColumns)
   {
+    start = Math.min(Math.max(0, start), annotations.length);
+    end = Math.min(Math.max(-1, end), annotations.length - 1);
     // mangle the alignmentAnnotation annotation array
     ArrayList<Annotation[]> annels = new ArrayList<>();
     Annotation[] els = null;
@@ -1744,6 +1746,16 @@ public class AlignmentAnnotation
     return aa;
   }
 
+  public String getLabel()
+  {
+    return label;
+  }
+
+  public Annotation[] getAnnotations()
+  {
+    return annotations;
+  }
+
   public double getBitScore()
   {
     return bitScore;