64fee65eef1249484ffeb9cf450fea851d569811
[jalview.git] / src / jalview / json / binding / biojson / v1 / SequenceFeaturesPojo.java
1 package jalview.json.binding.biojson.v1;
2
3 import java.util.Map;
4 import java.util.Vector;
5
6 import com.github.reinert.jjschema.Attributes;
7
8 public class SequenceFeaturesPojo
9 {
10   @Attributes(required = true, description = "Start residue position for the sequence feature")
11   private int xStart;
12
13   @Attributes(required = true, description = "End residue position for the sequence feature")
14   private int xEnd;
15
16   @Attributes(
17     required = true,
18     minItems = 1,
19     maxItems = 2147483647,
20     description = "Reference to the sequence in the alignment<br> (more like a foreign key)")
21   private String sequenceRef;
22
23   @Attributes(required = true, description = "The name or type of the SequenceFeature")
24   private String type;
25
26   @Attributes(required = false, description = "Score")
27   private Float score;
28
29   @Attributes(required = false, description = "Description for the feature")
30   private String description;
31   
32   @Attributes(required = false, description = "Additional metadata for the feature")
33   private Map<String, Object> otherDetails;
34
35   @Attributes(required = false, description = "Fill colour")
36   private String fillColor;
37
38   @Attributes(required = true, description = "Feature group")
39   private String featureGroup;
40
41   @Attributes(required = false, description = "URL links associated to the feature")
42   private Vector<String> links;
43
44   public SequenceFeaturesPojo()
45   {
46   }
47
48   public SequenceFeaturesPojo(String sequenceRef)
49   {
50     this.sequenceRef = sequenceRef;
51   }
52
53   public String getFillColor()
54   {
55     return "#" + fillColor;
56   }
57
58   public void setFillColor(String fillColor)
59   {
60     this.fillColor = fillColor;
61   }
62
63   public int getXstart()
64   {
65     return xStart;
66   }
67
68   public void setXstart(int xStart)
69   {
70     this.xStart = xStart;
71   }
72
73   public int getXend()
74   {
75     return xEnd;
76   }
77
78   public void setXend(int xend)
79   {
80     this.xEnd = xend;
81   }
82
83   public String getType()
84   {
85     return type;
86   }
87
88   public void setType(String type)
89   {
90     this.type = type;
91   }
92
93   public Float getScore()
94   {
95     return score;
96   }
97
98   public void setScore(Float score)
99   {
100     this.score = score;
101   }
102
103   public String getDescription()
104   {
105     return description;
106   }
107
108   public void setDescription(String description)
109   {
110     this.description = description;
111   }
112
113   public Map<String, Object> getOtherDetails()
114   {
115     return otherDetails;
116   }
117
118   public void setOtherDetails(Map<String, Object> otherDetails)
119   {
120     this.otherDetails = otherDetails;
121   }
122
123   public Vector<String> getLinks()
124   {
125     return links;
126   }
127
128   public void setLinks(Vector<String> links)
129   {
130     this.links = links;
131   }
132
133   public String getFeatureGroup()
134   {
135     return featureGroup;
136   }
137
138   public void setFeatureGroup(String featureGroup)
139   {
140     this.featureGroup = featureGroup;
141   }
142
143   public String getSequenceRef()
144   {
145     return sequenceRef;
146   }
147
148   public void setSequenceRef(String sequenceRef)
149   {
150     this.sequenceRef = sequenceRef;
151   }
152
153 }