Saves Jmol status
[jalview.git] / src / jalview / schemabinding / version2 / 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.schemabinding.version2;\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 java.util.Enumeration;\r
19 import java.util.Vector;\r
20 import org.exolab.castor.xml.MarshalException;\r
21 import org.exolab.castor.xml.Marshaller;\r
22 import org.exolab.castor.xml.Unmarshaller;\r
23 import org.exolab.castor.xml.ValidationException;\r
24 import org.xml.sax.ContentHandler;\r
25 \r
26 /**\r
27  * Class Feature.\r
28  * \r
29  * @version $Revision$ $Date$\r
30  */\r
31 public class Feature implements java.io.Serializable {\r
32 \r
33 \r
34       //--------------------------/\r
35      //- Class/Member Variables -/\r
36     //--------------------------/\r
37 \r
38     /**\r
39      * Field _begin\r
40      */\r
41     private int _begin;\r
42 \r
43     /**\r
44      * keeps track of state for field: _begin\r
45      */\r
46     private boolean _has_begin;\r
47 \r
48     /**\r
49      * Field _end\r
50      */\r
51     private int _end;\r
52 \r
53     /**\r
54      * keeps track of state for field: _end\r
55      */\r
56     private boolean _has_end;\r
57 \r
58     /**\r
59      * Field _type\r
60      */\r
61     private java.lang.String _type;\r
62 \r
63     /**\r
64      * Field _description\r
65      */\r
66     private java.lang.String _description;\r
67 \r
68     /**\r
69      * Field _status\r
70      */\r
71     private java.lang.String _status;\r
72 \r
73     /**\r
74      * Field _featureGroup\r
75      */\r
76     private java.lang.String _featureGroup;\r
77 \r
78     /**\r
79      * Field _score\r
80      */\r
81     private float _score;\r
82 \r
83     /**\r
84      * keeps track of state for field: _score\r
85      */\r
86     private boolean _has_score;\r
87 \r
88     /**\r
89      * Field _otherDataList\r
90      */\r
91     private java.util.Vector _otherDataList;\r
92 \r
93 \r
94       //----------------/\r
95      //- Constructors -/\r
96     //----------------/\r
97 \r
98     public Feature() {\r
99         super();\r
100         _otherDataList = new Vector();\r
101     } //-- jalview.schemabinding.version2.Feature()\r
102 \r
103 \r
104       //-----------/\r
105      //- Methods -/\r
106     //-----------/\r
107 \r
108     /**\r
109      * Method addOtherData\r
110      * \r
111      * \r
112      * \r
113      * @param vOtherData\r
114      */\r
115     public void addOtherData(jalview.schemabinding.version2.OtherData vOtherData)\r
116         throws java.lang.IndexOutOfBoundsException\r
117     {\r
118         _otherDataList.addElement(vOtherData);\r
119     } //-- void addOtherData(jalview.schemabinding.version2.OtherData) \r
120 \r
121     /**\r
122      * Method addOtherData\r
123      * \r
124      * \r
125      * \r
126      * @param index\r
127      * @param vOtherData\r
128      */\r
129     public void addOtherData(int index, jalview.schemabinding.version2.OtherData vOtherData)\r
130         throws java.lang.IndexOutOfBoundsException\r
131     {\r
132         _otherDataList.insertElementAt(vOtherData, index);\r
133     } //-- void addOtherData(int, jalview.schemabinding.version2.OtherData) \r
134 \r
135     /**\r
136      * Method deleteBegin\r
137      * \r
138      */\r
139     public void deleteBegin()\r
140     {\r
141         this._has_begin= false;\r
142     } //-- void deleteBegin() \r
143 \r
144     /**\r
145      * Method deleteEnd\r
146      * \r
147      */\r
148     public void deleteEnd()\r
149     {\r
150         this._has_end= false;\r
151     } //-- void deleteEnd() \r
152 \r
153     /**\r
154      * Method deleteScore\r
155      * \r
156      */\r
157     public void deleteScore()\r
158     {\r
159         this._has_score= false;\r
160     } //-- void deleteScore() \r
161 \r
162     /**\r
163      * Method enumerateOtherData\r
164      * \r
165      * \r
166      * \r
167      * @return Enumeration\r
168      */\r
169     public java.util.Enumeration enumerateOtherData()\r
170     {\r
171         return _otherDataList.elements();\r
172     } //-- java.util.Enumeration enumerateOtherData() \r
173 \r
174     /**\r
175      * Returns the value of field 'begin'.\r
176      * \r
177      * @return int\r
178      * @return the value of field 'begin'.\r
179      */\r
180     public int getBegin()\r
181     {\r
182         return this._begin;\r
183     } //-- int getBegin() \r
184 \r
185     /**\r
186      * Returns the value of field 'description'.\r
187      * \r
188      * @return String\r
189      * @return the value of field 'description'.\r
190      */\r
191     public java.lang.String getDescription()\r
192     {\r
193         return this._description;\r
194     } //-- java.lang.String getDescription() \r
195 \r
196     /**\r
197      * Returns the value of field 'end'.\r
198      * \r
199      * @return int\r
200      * @return the value of field 'end'.\r
201      */\r
202     public int getEnd()\r
203     {\r
204         return this._end;\r
205     } //-- int getEnd() \r
206 \r
207     /**\r
208      * Returns the value of field 'featureGroup'.\r
209      * \r
210      * @return String\r
211      * @return the value of field 'featureGroup'.\r
212      */\r
213     public java.lang.String getFeatureGroup()\r
214     {\r
215         return this._featureGroup;\r
216     } //-- java.lang.String getFeatureGroup() \r
217 \r
218     /**\r
219      * Method getOtherData\r
220      * \r
221      * \r
222      * \r
223      * @param index\r
224      * @return OtherData\r
225      */\r
226     public jalview.schemabinding.version2.OtherData getOtherData(int index)\r
227         throws java.lang.IndexOutOfBoundsException\r
228     {\r
229         //-- check bounds for index\r
230         if ((index < 0) || (index > _otherDataList.size())) {\r
231             throw new IndexOutOfBoundsException();\r
232         }\r
233         \r
234         return (jalview.schemabinding.version2.OtherData) _otherDataList.elementAt(index);\r
235     } //-- jalview.schemabinding.version2.OtherData getOtherData(int) \r
236 \r
237     /**\r
238      * Method getOtherData\r
239      * \r
240      * \r
241      * \r
242      * @return OtherData\r
243      */\r
244     public jalview.schemabinding.version2.OtherData[] getOtherData()\r
245     {\r
246         int size = _otherDataList.size();\r
247         jalview.schemabinding.version2.OtherData[] mArray = new jalview.schemabinding.version2.OtherData[size];\r
248         for (int index = 0; index < size; index++) {\r
249             mArray[index] = (jalview.schemabinding.version2.OtherData) _otherDataList.elementAt(index);\r
250         }\r
251         return mArray;\r
252     } //-- jalview.schemabinding.version2.OtherData[] getOtherData() \r
253 \r
254     /**\r
255      * Method getOtherDataCount\r
256      * \r
257      * \r
258      * \r
259      * @return int\r
260      */\r
261     public int getOtherDataCount()\r
262     {\r
263         return _otherDataList.size();\r
264     } //-- int getOtherDataCount() \r
265 \r
266     /**\r
267      * Returns the value of field 'score'.\r
268      * \r
269      * @return float\r
270      * @return the value of field 'score'.\r
271      */\r
272     public float getScore()\r
273     {\r
274         return this._score;\r
275     } //-- float getScore() \r
276 \r
277     /**\r
278      * Returns the value of field 'status'.\r
279      * \r
280      * @return String\r
281      * @return the value of field 'status'.\r
282      */\r
283     public java.lang.String getStatus()\r
284     {\r
285         return this._status;\r
286     } //-- java.lang.String getStatus() \r
287 \r
288     /**\r
289      * Returns the value of field 'type'.\r
290      * \r
291      * @return String\r
292      * @return the value of field 'type'.\r
293      */\r
294     public java.lang.String getType()\r
295     {\r
296         return this._type;\r
297     } //-- java.lang.String getType() \r
298 \r
299     /**\r
300      * Method hasBegin\r
301      * \r
302      * \r
303      * \r
304      * @return boolean\r
305      */\r
306     public boolean hasBegin()\r
307     {\r
308         return this._has_begin;\r
309     } //-- boolean hasBegin() \r
310 \r
311     /**\r
312      * Method hasEnd\r
313      * \r
314      * \r
315      * \r
316      * @return boolean\r
317      */\r
318     public boolean hasEnd()\r
319     {\r
320         return this._has_end;\r
321     } //-- boolean hasEnd() \r
322 \r
323     /**\r
324      * Method hasScore\r
325      * \r
326      * \r
327      * \r
328      * @return boolean\r
329      */\r
330     public boolean hasScore()\r
331     {\r
332         return this._has_score;\r
333     } //-- boolean hasScore() \r
334 \r
335     /**\r
336      * Method isValid\r
337      * \r
338      * \r
339      * \r
340      * @return boolean\r
341      */\r
342     public boolean isValid()\r
343     {\r
344         try {\r
345             validate();\r
346         }\r
347         catch (org.exolab.castor.xml.ValidationException vex) {\r
348             return false;\r
349         }\r
350         return true;\r
351     } //-- boolean isValid() \r
352 \r
353     /**\r
354      * Method marshal\r
355      * \r
356      * \r
357      * \r
358      * @param out\r
359      */\r
360     public void marshal(java.io.Writer out)\r
361         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
362     {\r
363         \r
364         Marshaller.marshal(this, out);\r
365     } //-- void marshal(java.io.Writer) \r
366 \r
367     /**\r
368      * Method marshal\r
369      * \r
370      * \r
371      * \r
372      * @param handler\r
373      */\r
374     public void marshal(org.xml.sax.ContentHandler handler)\r
375         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
376     {\r
377         \r
378         Marshaller.marshal(this, handler);\r
379     } //-- void marshal(org.xml.sax.ContentHandler) \r
380 \r
381     /**\r
382      * Method removeAllOtherData\r
383      * \r
384      */\r
385     public void removeAllOtherData()\r
386     {\r
387         _otherDataList.removeAllElements();\r
388     } //-- void removeAllOtherData() \r
389 \r
390     /**\r
391      * Method removeOtherData\r
392      * \r
393      * \r
394      * \r
395      * @param index\r
396      * @return OtherData\r
397      */\r
398     public jalview.schemabinding.version2.OtherData removeOtherData(int index)\r
399     {\r
400         java.lang.Object obj = _otherDataList.elementAt(index);\r
401         _otherDataList.removeElementAt(index);\r
402         return (jalview.schemabinding.version2.OtherData) obj;\r
403     } //-- jalview.schemabinding.version2.OtherData removeOtherData(int) \r
404 \r
405     /**\r
406      * Sets the value of field 'begin'.\r
407      * \r
408      * @param begin the value of field 'begin'.\r
409      */\r
410     public void setBegin(int begin)\r
411     {\r
412         this._begin = begin;\r
413         this._has_begin = true;\r
414     } //-- void setBegin(int) \r
415 \r
416     /**\r
417      * Sets the value of field 'description'.\r
418      * \r
419      * @param description the value of field 'description'.\r
420      */\r
421     public void setDescription(java.lang.String description)\r
422     {\r
423         this._description = description;\r
424     } //-- void setDescription(java.lang.String) \r
425 \r
426     /**\r
427      * Sets the value of field 'end'.\r
428      * \r
429      * @param end the value of field 'end'.\r
430      */\r
431     public void setEnd(int end)\r
432     {\r
433         this._end = end;\r
434         this._has_end = true;\r
435     } //-- void setEnd(int) \r
436 \r
437     /**\r
438      * Sets the value of field 'featureGroup'.\r
439      * \r
440      * @param featureGroup the value of field 'featureGroup'.\r
441      */\r
442     public void setFeatureGroup(java.lang.String featureGroup)\r
443     {\r
444         this._featureGroup = featureGroup;\r
445     } //-- void setFeatureGroup(java.lang.String) \r
446 \r
447     /**\r
448      * Method setOtherData\r
449      * \r
450      * \r
451      * \r
452      * @param index\r
453      * @param vOtherData\r
454      */\r
455     public void setOtherData(int index, jalview.schemabinding.version2.OtherData vOtherData)\r
456         throws java.lang.IndexOutOfBoundsException\r
457     {\r
458         //-- check bounds for index\r
459         if ((index < 0) || (index > _otherDataList.size())) {\r
460             throw new IndexOutOfBoundsException();\r
461         }\r
462         _otherDataList.setElementAt(vOtherData, index);\r
463     } //-- void setOtherData(int, jalview.schemabinding.version2.OtherData) \r
464 \r
465     /**\r
466      * Method setOtherData\r
467      * \r
468      * \r
469      * \r
470      * @param otherDataArray\r
471      */\r
472     public void setOtherData(jalview.schemabinding.version2.OtherData[] otherDataArray)\r
473     {\r
474         //-- copy array\r
475         _otherDataList.removeAllElements();\r
476         for (int i = 0; i < otherDataArray.length; i++) {\r
477             _otherDataList.addElement(otherDataArray[i]);\r
478         }\r
479     } //-- void setOtherData(jalview.schemabinding.version2.OtherData) \r
480 \r
481     /**\r
482      * Sets the value of field 'score'.\r
483      * \r
484      * @param score the value of field 'score'.\r
485      */\r
486     public void setScore(float score)\r
487     {\r
488         this._score = score;\r
489         this._has_score = true;\r
490     } //-- void setScore(float) \r
491 \r
492     /**\r
493      * Sets the value of field 'status'.\r
494      * \r
495      * @param status the value of field 'status'.\r
496      */\r
497     public void setStatus(java.lang.String status)\r
498     {\r
499         this._status = status;\r
500     } //-- void setStatus(java.lang.String) \r
501 \r
502     /**\r
503      * Sets the value of field 'type'.\r
504      * \r
505      * @param type the value of field 'type'.\r
506      */\r
507     public void setType(java.lang.String type)\r
508     {\r
509         this._type = type;\r
510     } //-- void setType(java.lang.String) \r
511 \r
512     /**\r
513      * Method unmarshal\r
514      * \r
515      * \r
516      * \r
517      * @param reader\r
518      * @return Object\r
519      */\r
520     public static java.lang.Object unmarshal(java.io.Reader reader)\r
521         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
522     {\r
523         return (jalview.schemabinding.version2.Feature) Unmarshaller.unmarshal(jalview.schemabinding.version2.Feature.class, reader);\r
524     } //-- java.lang.Object unmarshal(java.io.Reader) \r
525 \r
526     /**\r
527      * Method validate\r
528      * \r
529      */\r
530     public void validate()\r
531         throws org.exolab.castor.xml.ValidationException\r
532     {\r
533         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
534         validator.validate(this);\r
535     } //-- void validate() \r
536 \r
537 }\r