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