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=e493ecb51abbb86e9962e5883273d7bf9a2d7112;hb=c7d9dbc9b92889077b91bcdb052032fe33fb269e;hp=f55be4690f97f53b4dfe060a690cae64f6bcb215;hpb=08643e75e18b16562e90e9b42c0b327f9c46226b;p=jalview.git diff --git a/src/jalview/json/binding/v1/SequenceFeaturesPojo.java b/src/jalview/json/binding/biojson/v1/SequenceFeaturesPojo.java similarity index 51% rename from src/jalview/json/binding/v1/SequenceFeaturesPojo.java rename to src/jalview/json/binding/biojson/v1/SequenceFeaturesPojo.java index f55be46..e493ecb 100644 --- a/src/jalview/json/binding/v1/SequenceFeaturesPojo.java +++ b/src/jalview/json/binding/biojson/v1/SequenceFeaturesPojo.java @@ -1,30 +1,43 @@ -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 { + @Attributes(required = true, description = "Serial version id for the SeqFeature object") 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 = 1999999999, 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 +61,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 +109,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; } @@ -141,4 +154,12 @@ public class SequenceFeaturesPojo return svid; } +//public Map getOtherDetails() { +// return otherDetails; +//} +// +//public void setOtherDetails(Map otherDetails) { +// this.otherDetails = otherDetails; +//} + }