JAL-3383 JAL-3397 JAL-3253-applet IntervalStore options
[jalview.git] / src / jalview / datamodel / SequenceFeature.java
index bf2408c..a71c7b1 100755 (executable)
@@ -35,6 +35,8 @@ import java.util.SortedMap;
 import java.util.TreeMap;
 import java.util.Vector;
 
+import intervalstore.api.IntervalI;
+
 /**
  * A class that models a single contiguous feature on a sequence. If flag
  * 'contactFeature' is true, the start and end positions are interpreted instead
@@ -99,9 +101,14 @@ public class SequenceFeature implements FeatureLocationI
    */
   private String source;
 
-  // for Overview sort:
-  public int index;
+  /**
+   * 1-based index into the featureList used by FeatureStoreJS
+   */
+  public int index1;
 
+  /**
+   * containment nesting link used by FeatureStoreJS to track starting points
+   */
   public SequenceFeature containedBy;
 
   /**
@@ -741,6 +748,20 @@ public class SequenceFeature implements FeatureLocationI
   {
     source = theSource;
   }
+
+  @Override
+  public IntervalI getContainedBy()
+  {
+    return containedBy;
+  }
+
+  @Override
+  public void setContainedBy(IntervalI containedBy)
+  {
+    this.containedBy = (SequenceFeature) containedBy;
+
+  }
+
 }
 
 class SFSortByEnd implements Comparator<SequenceFeature>