merge from develop
[jalview.git] / src / jalview / json / binding / biojson / v1 / SequenceFeaturesPojo.java
@@ -1,30 +1,44 @@
-package jalview.json.binding.v1;
+package jalview.json.binding.biojson.v1;
 
-import java.util.Hashtable;
+import java.util.Map;
 import java.util.Vector;
 
+import com.github.reinert.jjschema.Attributes;
+
 public class SequenceFeaturesPojo
 {
-  private String svid = "1.0";
-
-  private int xstart;
+  @Attributes(required = true, description = "Start residue position for the sequence feature")
+  private int xStart;
 
-  private int xend;
+  @Attributes(required = true, description = "End residue position for the sequence feature")
+  private int xEnd;
 
+  @Attributes(
+    required = true,
+    minItems = 1,
+    maxItems = 2147483647,
+    description = "Reference to the sequence in the alignment<br> (more like a foreign key)")
   private String sequenceRef;
 
+  @Attributes(required = true, description = "The name or type of the SequenceFeature")
   private String type;
 
+  @Attributes(required = false, description = "Score")
   private Float score;
 
+  @Attributes(required = false, description = "Description for the feature")
   private String description;
+  
+  @Attributes(required = false, description = "Additional metadata for the feature")
+  private Map<String, Object> otherDetails;
 
-  private Hashtable otherDetails;
-
+  @Attributes(required = false, description = "Fill colour")
   private String fillColor;
 
+  @Attributes(required = true, description = "Feature group")
   private String featureGroup;
 
+  @Attributes(required = false, description = "URL links associated to the feature")
   private Vector<String> links;
 
   public SequenceFeaturesPojo()
@@ -48,22 +62,22 @@ public class SequenceFeaturesPojo
 
   public int getXstart()
   {
-    return xstart;
+    return xStart;
   }
 
-  public void setXstart(int xstart)
+  public void setXstart(int xStart)
   {
-    this.xstart = xstart;
+    this.xStart = xStart;
   }
 
   public int getXend()
   {
-    return xend;
+    return xEnd;
   }
 
   public void setXend(int xend)
   {
-    this.xend = xend;
+    this.xEnd = xend;
   }
 
   public String getType()
@@ -96,12 +110,12 @@ public class SequenceFeaturesPojo
     this.description = description;
   }
 
-  public Hashtable getOtherDetails()
+  public Map<String, Object> getOtherDetails()
   {
     return otherDetails;
   }
 
-  public void setOtherDetails(Hashtable otherDetails)
+  public void setOtherDetails(Map<String, Object> otherDetails)
   {
     this.otherDetails = otherDetails;
   }
@@ -136,9 +150,4 @@ public class SequenceFeaturesPojo
     this.sequenceRef = sequenceRef;
   }
 
-  public String getSvid()
-  {
-    return svid;
-  }
-
 }