has ref to annotation
authoramwaterhouse <Andrew Waterhouse>
Fri, 3 Feb 2006 17:40:49 +0000 (17:40 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 3 Feb 2006 17:40:49 +0000 (17:40 +0000)
src/jalview/datamodel/Sequence.java
src/jalview/datamodel/SequenceI.java

index 65537ae..d35a05b 100755 (executable)
@@ -42,6 +42,9 @@ public class Sequence implements SequenceI
     String vamsasId;\r
     Vector dbrefs;\r
 \r
+    /** This annotation is displayed below the alignment but the\r
+     * positions are tied to the residues of this sequence */\r
+    Vector annotation;\r
 \r
     /** DOCUMENT ME!! */\r
     public Vector sequenceFeatures;\r
@@ -574,4 +577,24 @@ public class Sequence implements SequenceI
       return datasetSequence;\r
     }\r
 \r
+    public AlignmentAnnotation [] getAnnotation()\r
+    {\r
+      if(annotation==null)\r
+        return null;\r
+\r
+      AlignmentAnnotation [] ret = new AlignmentAnnotation[annotation.size()];\r
+      for(int r = 0; r<ret.length; r++)\r
+        ret[r] = (AlignmentAnnotation)annotation.elementAt(r);\r
+\r
+      return ret;\r
+    }\r
+\r
+    public void addAlignmentAnnotation(AlignmentAnnotation annotation)\r
+    {\r
+      if(this.annotation==null)\r
+        this.annotation = new Vector();\r
+\r
+      this.annotation.addElement( annotation );\r
+    }\r
+\r
 }\r
index 82d38b4..21f7cc4 100755 (executable)
@@ -251,4 +251,9 @@ public interface SequenceI
     public void setDatasetSequence(SequenceI seq);\r
 \r
     public SequenceI getDatasetSequence();\r
+\r
+    public AlignmentAnnotation [] getAnnotation();\r
+\r
+    public void addAlignmentAnnotation(AlignmentAnnotation annotation);\r
+\r
 }\r