Allows saving of sequence description
[jalview.git] / src / jalview / binding / Feature.java
1 /*\r
2  * This class was automatically generated with \r
3  * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML\r
4  * Schema.\r
5  * $Id$\r
6  */\r
7 \r
8 package jalview.binding;\r
9 \r
10   //---------------------------------/\r
11  //- Imported classes and packages -/\r
12 //---------------------------------/\r
13 \r
14 import java.io.IOException;\r
15 import java.io.Reader;\r
16 import java.io.Serializable;\r
17 import java.io.Writer;\r
18 import org.exolab.castor.xml.MarshalException;\r
19 import org.exolab.castor.xml.Marshaller;\r
20 import org.exolab.castor.xml.Unmarshaller;\r
21 import org.exolab.castor.xml.ValidationException;\r
22 import org.xml.sax.ContentHandler;\r
23 \r
24 /**\r
25  * Class Feature.\r
26  * \r
27  * @version $Revision$ $Date$\r
28  */\r
29 public class Feature implements java.io.Serializable {\r
30 \r
31 \r
32       //--------------------------/\r
33      //- Class/Member Variables -/\r
34     //--------------------------/\r
35 \r
36     /**\r
37      * Field _begin\r
38      */\r
39     private int _begin;\r
40 \r
41     /**\r
42      * keeps track of state for field: _begin\r
43      */\r
44     private boolean _has_begin;\r
45 \r
46     /**\r
47      * Field _end\r
48      */\r
49     private int _end;\r
50 \r
51     /**\r
52      * keeps track of state for field: _end\r
53      */\r
54     private boolean _has_end;\r
55 \r
56     /**\r
57      * Field _type\r
58      */\r
59     private java.lang.String _type;\r
60 \r
61     /**\r
62      * Field _description\r
63      */\r
64     private java.lang.String _description;\r
65 \r
66     /**\r
67      * Field _status\r
68      */\r
69     private java.lang.String _status;\r
70 \r
71     /**\r
72      * Field _featureGroup\r
73      */\r
74     private java.lang.String _featureGroup;\r
75 \r
76 \r
77       //----------------/\r
78      //- Constructors -/\r
79     //----------------/\r
80 \r
81     public Feature() {\r
82         super();\r
83     } //-- jalview.binding.Feature()\r
84 \r
85 \r
86       //-----------/\r
87      //- Methods -/\r
88     //-----------/\r
89 \r
90     /**\r
91      * Method deleteBegin\r
92      * \r
93      */\r
94     public void deleteBegin()\r
95     {\r
96         this._has_begin= false;\r
97     } //-- void deleteBegin() \r
98 \r
99     /**\r
100      * Method deleteEnd\r
101      * \r
102      */\r
103     public void deleteEnd()\r
104     {\r
105         this._has_end= false;\r
106     } //-- void deleteEnd() \r
107 \r
108     /**\r
109      * Returns the value of field 'begin'.\r
110      * \r
111      * @return int\r
112      * @return the value of field 'begin'.\r
113      */\r
114     public int getBegin()\r
115     {\r
116         return this._begin;\r
117     } //-- int getBegin() \r
118 \r
119     /**\r
120      * Returns the value of field 'description'.\r
121      * \r
122      * @return String\r
123      * @return the value of field 'description'.\r
124      */\r
125     public java.lang.String getDescription()\r
126     {\r
127         return this._description;\r
128     } //-- java.lang.String getDescription() \r
129 \r
130     /**\r
131      * Returns the value of field 'end'.\r
132      * \r
133      * @return int\r
134      * @return the value of field 'end'.\r
135      */\r
136     public int getEnd()\r
137     {\r
138         return this._end;\r
139     } //-- int getEnd() \r
140 \r
141     /**\r
142      * Returns the value of field 'featureGroup'.\r
143      * \r
144      * @return String\r
145      * @return the value of field 'featureGroup'.\r
146      */\r
147     public java.lang.String getFeatureGroup()\r
148     {\r
149         return this._featureGroup;\r
150     } //-- java.lang.String getFeatureGroup() \r
151 \r
152     /**\r
153      * Returns the value of field 'status'.\r
154      * \r
155      * @return String\r
156      * @return the value of field 'status'.\r
157      */\r
158     public java.lang.String getStatus()\r
159     {\r
160         return this._status;\r
161     } //-- java.lang.String getStatus() \r
162 \r
163     /**\r
164      * Returns the value of field 'type'.\r
165      * \r
166      * @return String\r
167      * @return the value of field 'type'.\r
168      */\r
169     public java.lang.String getType()\r
170     {\r
171         return this._type;\r
172     } //-- java.lang.String getType() \r
173 \r
174     /**\r
175      * Method hasBegin\r
176      * \r
177      * \r
178      * \r
179      * @return boolean\r
180      */\r
181     public boolean hasBegin()\r
182     {\r
183         return this._has_begin;\r
184     } //-- boolean hasBegin() \r
185 \r
186     /**\r
187      * Method hasEnd\r
188      * \r
189      * \r
190      * \r
191      * @return boolean\r
192      */\r
193     public boolean hasEnd()\r
194     {\r
195         return this._has_end;\r
196     } //-- boolean hasEnd() \r
197 \r
198     /**\r
199      * Method isValid\r
200      * \r
201      * \r
202      * \r
203      * @return boolean\r
204      */\r
205     public boolean isValid()\r
206     {\r
207         try {\r
208             validate();\r
209         }\r
210         catch (org.exolab.castor.xml.ValidationException vex) {\r
211             return false;\r
212         }\r
213         return true;\r
214     } //-- boolean isValid() \r
215 \r
216     /**\r
217      * Method marshal\r
218      * \r
219      * \r
220      * \r
221      * @param out\r
222      */\r
223     public void marshal(java.io.Writer out)\r
224         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
225     {\r
226         \r
227         Marshaller.marshal(this, out);\r
228     } //-- void marshal(java.io.Writer) \r
229 \r
230     /**\r
231      * Method marshal\r
232      * \r
233      * \r
234      * \r
235      * @param handler\r
236      */\r
237     public void marshal(org.xml.sax.ContentHandler handler)\r
238         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
239     {\r
240         \r
241         Marshaller.marshal(this, handler);\r
242     } //-- void marshal(org.xml.sax.ContentHandler) \r
243 \r
244     /**\r
245      * Sets the value of field 'begin'.\r
246      * \r
247      * @param begin the value of field 'begin'.\r
248      */\r
249     public void setBegin(int begin)\r
250     {\r
251         this._begin = begin;\r
252         this._has_begin = true;\r
253     } //-- void setBegin(int) \r
254 \r
255     /**\r
256      * Sets the value of field 'description'.\r
257      * \r
258      * @param description the value of field 'description'.\r
259      */\r
260     public void setDescription(java.lang.String description)\r
261     {\r
262         this._description = description;\r
263     } //-- void setDescription(java.lang.String) \r
264 \r
265     /**\r
266      * Sets the value of field 'end'.\r
267      * \r
268      * @param end the value of field 'end'.\r
269      */\r
270     public void setEnd(int end)\r
271     {\r
272         this._end = end;\r
273         this._has_end = true;\r
274     } //-- void setEnd(int) \r
275 \r
276     /**\r
277      * Sets the value of field 'featureGroup'.\r
278      * \r
279      * @param featureGroup the value of field 'featureGroup'.\r
280      */\r
281     public void setFeatureGroup(java.lang.String featureGroup)\r
282     {\r
283         this._featureGroup = featureGroup;\r
284     } //-- void setFeatureGroup(java.lang.String) \r
285 \r
286     /**\r
287      * Sets the value of field 'status'.\r
288      * \r
289      * @param status the value of field 'status'.\r
290      */\r
291     public void setStatus(java.lang.String status)\r
292     {\r
293         this._status = status;\r
294     } //-- void setStatus(java.lang.String) \r
295 \r
296     /**\r
297      * Sets the value of field 'type'.\r
298      * \r
299      * @param type the value of field 'type'.\r
300      */\r
301     public void setType(java.lang.String type)\r
302     {\r
303         this._type = type;\r
304     } //-- void setType(java.lang.String) \r
305 \r
306     /**\r
307      * Method unmarshal\r
308      * \r
309      * \r
310      * \r
311      * @param reader\r
312      * @return Object\r
313      */\r
314     public static java.lang.Object unmarshal(java.io.Reader reader)\r
315         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
316     {\r
317         return (jalview.binding.Feature) Unmarshaller.unmarshal(jalview.binding.Feature.class, reader);\r
318     } //-- java.lang.Object unmarshal(java.io.Reader) \r
319 \r
320     /**\r
321      * Method validate\r
322      * \r
323      */\r
324     public void validate()\r
325         throws org.exolab.castor.xml.ValidationException\r
326     {\r
327         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
328         validator.validate(this);\r
329     } //-- void validate() \r
330 \r
331 }\r