JAL-1645 Version-Rel Version 2.9 Year-Rel 2015 Licensing glob
[jalview.git] / src / jalview / json / binding / biojson / v1 / SequenceFeaturesPojo.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
3  * Copyright (C) 2015 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3
10  * of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License
18  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
19  * The Jalview Authors are detailed in the 'AUTHORS' file.
20  */
21 package jalview.json.binding.biojson.v1;
22
23 import java.util.Map;
24 import java.util.Vector;
25
26 import com.github.reinert.jjschema.Attributes;
27
28 public class SequenceFeaturesPojo
29 {
30   @Attributes(
31     required = true,
32     description = "Start residue position for the sequence feature")
33   private int xStart;
34
35   @Attributes(
36     required = true,
37     description = "End residue position for the sequence feature")
38   private int xEnd;
39
40   @Attributes(
41     required = true,
42     minItems = 1,
43     maxItems = 2147483647,
44     description = "Reference to the sequence in the alignment<br> (more like a foreign key)")
45   private String sequenceRef;
46
47   @Attributes(
48     required = true,
49     description = "The name or type of the SequenceFeature")
50   private String type;
51
52   @Attributes(required = false, description = "Score")
53   private Float score;
54
55   @Attributes(required = false, description = "Description for the feature")
56   private String description;
57
58   @Attributes(
59     required = false,
60     description = "Additional metadata for the feature")
61   private Map<String, Object> otherDetails;
62
63   @Attributes(required = false, description = "Fill colour")
64   private String fillColor;
65
66   @Attributes(required = true, description = "Feature group")
67   private String featureGroup;
68
69   @Attributes(
70     required = false,
71     description = "URL links associated to the feature")
72   private Vector<String> links;
73
74   public SequenceFeaturesPojo()
75   {
76   }
77
78   public SequenceFeaturesPojo(String sequenceRef)
79   {
80     this.sequenceRef = sequenceRef;
81   }
82
83   public String getFillColor()
84   {
85     return "#" + fillColor;
86   }
87
88   public void setFillColor(String fillColor)
89   {
90     this.fillColor = fillColor;
91   }
92
93   public int getXstart()
94   {
95     return xStart;
96   }
97
98   public void setXstart(int xStart)
99   {
100     this.xStart = xStart;
101   }
102
103   public int getXend()
104   {
105     return xEnd;
106   }
107
108   public void setXend(int xend)
109   {
110     this.xEnd = xend;
111   }
112
113   public String getType()
114   {
115     return type;
116   }
117
118   public void setType(String type)
119   {
120     this.type = type;
121   }
122
123   public Float getScore()
124   {
125     return score;
126   }
127
128   public void setScore(Float score)
129   {
130     this.score = score;
131   }
132
133   public String getDescription()
134   {
135     return description;
136   }
137
138   public void setDescription(String description)
139   {
140     this.description = description;
141   }
142
143   public Map<String, Object> getOtherDetails()
144   {
145     return otherDetails;
146   }
147
148   public void setOtherDetails(Map<String, Object> otherDetails)
149   {
150     this.otherDetails = otherDetails;
151   }
152
153   public Vector<String> getLinks()
154   {
155     return links;
156   }
157
158   public void setLinks(Vector<String> links)
159   {
160     this.links = links;
161   }
162
163   public String getFeatureGroup()
164   {
165     return featureGroup;
166   }
167
168   public void setFeatureGroup(String featureGroup)
169   {
170     this.featureGroup = featureGroup;
171   }
172
173   public String getSequenceRef()
174   {
175     return sequenceRef;
176   }
177
178   public void setSequenceRef(String sequenceRef)
179   {
180     this.sequenceRef = sequenceRef;
181   }
182
183 }