X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjson%2Fbinding%2Fbiojson%2Fv1%2FSequenceFeaturesPojo.java;fp=src%2Fjalview%2Fjson%2Fbinding%2Fv1%2FSequenceFeaturesPojo.java;h=64fee65eef1249484ffeb9cf450fea851d569811;hb=f06554784411ddbf871d642e66c8dcb7f147d4a8;hp=f55be4690f97f53b4dfe060a690cae64f6bcb215;hpb=cf06ee5d732af6cc874115aece1138adafca8ad7;p=jalview.git diff --git a/src/jalview/json/binding/v1/SequenceFeaturesPojo.java b/src/jalview/json/binding/biojson/v1/SequenceFeaturesPojo.java similarity index 55% rename from src/jalview/json/binding/v1/SequenceFeaturesPojo.java rename to src/jalview/json/binding/biojson/v1/SequenceFeaturesPojo.java index f55be46..64fee65 100644 --- a/src/jalview/json/binding/v1/SequenceFeaturesPojo.java +++ b/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
(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 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 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 getOtherDetails() { return otherDetails; } - public void setOtherDetails(Hashtable otherDetails) + public void setOtherDetails(Map otherDetails) { this.otherDetails = otherDetails; } @@ -136,9 +150,4 @@ public class SequenceFeaturesPojo this.sequenceRef = sequenceRef; } - public String getSvid() - { - return svid; - } - }