2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML
\r
8 package jalview.schemabinding.version2;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\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
29 * @version $Revision$ $Date$
\r
31 public class Feature implements java.io.Serializable {
\r
34 //--------------------------/
\r
35 //- Class/Member Variables -/
\r
36 //--------------------------/
\r
44 * keeps track of state for field: _begin
\r
46 private boolean _has_begin;
\r
54 * keeps track of state for field: _end
\r
56 private boolean _has_end;
\r
61 private java.lang.String _type;
\r
64 * Field _description
\r
66 private java.lang.String _description;
\r
71 private java.lang.String _status;
\r
74 * Field _featureGroup
\r
76 private java.lang.String _featureGroup;
\r
81 private float _score;
\r
84 * keeps track of state for field: _score
\r
86 private boolean _has_score;
\r
89 * Field _otherDataList
\r
91 private java.util.Vector _otherDataList;
\r
100 _otherDataList = new Vector();
\r
101 } //-- jalview.schemabinding.version2.Feature()
\r
109 * Method addOtherData
\r
113 * @param vOtherData
\r
115 public void addOtherData(jalview.schemabinding.version2.OtherData vOtherData)
\r
116 throws java.lang.IndexOutOfBoundsException
\r
118 _otherDataList.addElement(vOtherData);
\r
119 } //-- void addOtherData(jalview.schemabinding.version2.OtherData)
\r
122 * Method addOtherData
\r
127 * @param vOtherData
\r
129 public void addOtherData(int index, jalview.schemabinding.version2.OtherData vOtherData)
\r
130 throws java.lang.IndexOutOfBoundsException
\r
132 _otherDataList.insertElementAt(vOtherData, index);
\r
133 } //-- void addOtherData(int, jalview.schemabinding.version2.OtherData)
\r
136 * Method deleteBegin
\r
139 public void deleteBegin()
\r
141 this._has_begin= false;
\r
142 } //-- void deleteBegin()
\r
148 public void deleteEnd()
\r
150 this._has_end= false;
\r
151 } //-- void deleteEnd()
\r
154 * Method deleteScore
\r
157 public void deleteScore()
\r
159 this._has_score= false;
\r
160 } //-- void deleteScore()
\r
163 * Method enumerateOtherData
\r
167 * @return Enumeration
\r
169 public java.util.Enumeration enumerateOtherData()
\r
171 return _otherDataList.elements();
\r
172 } //-- java.util.Enumeration enumerateOtherData()
\r
175 * Returns the value of field 'begin'.
\r
178 * @return the value of field 'begin'.
\r
180 public int getBegin()
\r
182 return this._begin;
\r
183 } //-- int getBegin()
\r
186 * Returns the value of field 'description'.
\r
189 * @return the value of field 'description'.
\r
191 public java.lang.String getDescription()
\r
193 return this._description;
\r
194 } //-- java.lang.String getDescription()
\r
197 * Returns the value of field 'end'.
\r
200 * @return the value of field 'end'.
\r
202 public int getEnd()
\r
205 } //-- int getEnd()
\r
208 * Returns the value of field 'featureGroup'.
\r
211 * @return the value of field 'featureGroup'.
\r
213 public java.lang.String getFeatureGroup()
\r
215 return this._featureGroup;
\r
216 } //-- java.lang.String getFeatureGroup()
\r
219 * Method getOtherData
\r
224 * @return OtherData
\r
226 public jalview.schemabinding.version2.OtherData getOtherData(int index)
\r
227 throws java.lang.IndexOutOfBoundsException
\r
229 //-- check bounds for index
\r
230 if ((index < 0) || (index > _otherDataList.size())) {
\r
231 throw new IndexOutOfBoundsException();
\r
234 return (jalview.schemabinding.version2.OtherData) _otherDataList.elementAt(index);
\r
235 } //-- jalview.schemabinding.version2.OtherData getOtherData(int)
\r
238 * Method getOtherData
\r
242 * @return OtherData
\r
244 public jalview.schemabinding.version2.OtherData[] getOtherData()
\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
252 } //-- jalview.schemabinding.version2.OtherData[] getOtherData()
\r
255 * Method getOtherDataCount
\r
261 public int getOtherDataCount()
\r
263 return _otherDataList.size();
\r
264 } //-- int getOtherDataCount()
\r
267 * Returns the value of field 'score'.
\r
270 * @return the value of field 'score'.
\r
272 public float getScore()
\r
274 return this._score;
\r
275 } //-- float getScore()
\r
278 * Returns the value of field 'status'.
\r
281 * @return the value of field 'status'.
\r
283 public java.lang.String getStatus()
\r
285 return this._status;
\r
286 } //-- java.lang.String getStatus()
\r
289 * Returns the value of field 'type'.
\r
292 * @return the value of field 'type'.
\r
294 public java.lang.String getType()
\r
297 } //-- java.lang.String getType()
\r
306 public boolean hasBegin()
\r
308 return this._has_begin;
\r
309 } //-- boolean hasBegin()
\r
318 public boolean hasEnd()
\r
320 return this._has_end;
\r
321 } //-- boolean hasEnd()
\r
330 public boolean hasScore()
\r
332 return this._has_score;
\r
333 } //-- boolean hasScore()
\r
342 public boolean isValid()
\r
347 catch (org.exolab.castor.xml.ValidationException vex) {
\r
351 } //-- boolean isValid()
\r
360 public void marshal(java.io.Writer out)
\r
361 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
364 Marshaller.marshal(this, out);
\r
365 } //-- void marshal(java.io.Writer)
\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
378 Marshaller.marshal(this, handler);
\r
379 } //-- void marshal(org.xml.sax.ContentHandler)
\r
382 * Method removeAllOtherData
\r
385 public void removeAllOtherData()
\r
387 _otherDataList.removeAllElements();
\r
388 } //-- void removeAllOtherData()
\r
391 * Method removeOtherData
\r
396 * @return OtherData
\r
398 public jalview.schemabinding.version2.OtherData removeOtherData(int index)
\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
406 * Sets the value of field 'begin'.
\r
408 * @param begin the value of field 'begin'.
\r
410 public void setBegin(int begin)
\r
412 this._begin = begin;
\r
413 this._has_begin = true;
\r
414 } //-- void setBegin(int)
\r
417 * Sets the value of field 'description'.
\r
419 * @param description the value of field 'description'.
\r
421 public void setDescription(java.lang.String description)
\r
423 this._description = description;
\r
424 } //-- void setDescription(java.lang.String)
\r
427 * Sets the value of field 'end'.
\r
429 * @param end the value of field 'end'.
\r
431 public void setEnd(int end)
\r
434 this._has_end = true;
\r
435 } //-- void setEnd(int)
\r
438 * Sets the value of field 'featureGroup'.
\r
440 * @param featureGroup the value of field 'featureGroup'.
\r
442 public void setFeatureGroup(java.lang.String featureGroup)
\r
444 this._featureGroup = featureGroup;
\r
445 } //-- void setFeatureGroup(java.lang.String)
\r
448 * Method setOtherData
\r
453 * @param vOtherData
\r
455 public void setOtherData(int index, jalview.schemabinding.version2.OtherData vOtherData)
\r
456 throws java.lang.IndexOutOfBoundsException
\r
458 //-- check bounds for index
\r
459 if ((index < 0) || (index > _otherDataList.size())) {
\r
460 throw new IndexOutOfBoundsException();
\r
462 _otherDataList.setElementAt(vOtherData, index);
\r
463 } //-- void setOtherData(int, jalview.schemabinding.version2.OtherData)
\r
466 * Method setOtherData
\r
470 * @param otherDataArray
\r
472 public void setOtherData(jalview.schemabinding.version2.OtherData[] otherDataArray)
\r
475 _otherDataList.removeAllElements();
\r
476 for (int i = 0; i < otherDataArray.length; i++) {
\r
477 _otherDataList.addElement(otherDataArray[i]);
\r
479 } //-- void setOtherData(jalview.schemabinding.version2.OtherData)
\r
482 * Sets the value of field 'score'.
\r
484 * @param score the value of field 'score'.
\r
486 public void setScore(float score)
\r
488 this._score = score;
\r
489 this._has_score = true;
\r
490 } //-- void setScore(float)
\r
493 * Sets the value of field 'status'.
\r
495 * @param status the value of field 'status'.
\r
497 public void setStatus(java.lang.String status)
\r
499 this._status = status;
\r
500 } //-- void setStatus(java.lang.String)
\r
503 * Sets the value of field 'type'.
\r
505 * @param type the value of field 'type'.
\r
507 public void setType(java.lang.String type)
\r
510 } //-- void setType(java.lang.String)
\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
523 return (jalview.schemabinding.version2.Feature) Unmarshaller.unmarshal(jalview.schemabinding.version2.Feature.class, reader);
\r
524 } //-- java.lang.Object unmarshal(java.io.Reader)
\r
530 public void validate()
\r
531 throws org.exolab.castor.xml.ValidationException
\r
533 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
534 validator.validate(this);
\r
535 } //-- void validate()
\r