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
16 import org.exolab.castor.xml.*;
\r
21 * @version $Revision$ $Date$
\r
23 public class Feature
\r
24 implements java.io.Serializable
\r
27 //--------------------------/
\r
28 //- Class/Member Variables -/
\r
29 //--------------------------/
\r
37 * keeps track of state for field: _begin
\r
39 private boolean _has_begin;
\r
47 * keeps track of state for field: _end
\r
49 private boolean _has_end;
\r
54 private java.lang.String _type;
\r
57 * Field _description
\r
59 private java.lang.String _description;
\r
64 private java.lang.String _status;
\r
67 * Field _featureGroup
\r
69 private java.lang.String _featureGroup;
\r
74 private float _score;
\r
77 * keeps track of state for field: _score
\r
79 private boolean _has_score;
\r
82 * Field _otherDataList
\r
84 private java.util.Vector _otherDataList;
\r
93 _otherDataList = new Vector();
\r
94 } //-- jalview.schemabinding.version2.Feature()
\r
101 * Method addOtherData
\r
105 * @param vOtherData
\r
107 public void addOtherData(jalview.schemabinding.version2.OtherData vOtherData)
\r
108 throws java.lang.IndexOutOfBoundsException
\r
110 _otherDataList.addElement(vOtherData);
\r
111 } //-- void addOtherData(jalview.schemabinding.version2.OtherData)
\r
114 * Method addOtherData
\r
119 * @param vOtherData
\r
121 public void addOtherData(int index,
\r
122 jalview.schemabinding.version2.OtherData vOtherData)
\r
123 throws java.lang.IndexOutOfBoundsException
\r
125 _otherDataList.insertElementAt(vOtherData, index);
\r
126 } //-- void addOtherData(int, jalview.schemabinding.version2.OtherData)
\r
129 * Method deleteBegin
\r
132 public void deleteBegin()
\r
134 this._has_begin = false;
\r
135 } //-- void deleteBegin()
\r
141 public void deleteEnd()
\r
143 this._has_end = false;
\r
144 } //-- void deleteEnd()
\r
147 * Method deleteScore
\r
150 public void deleteScore()
\r
152 this._has_score = false;
\r
153 } //-- void deleteScore()
\r
156 * Method enumerateOtherData
\r
160 * @return Enumeration
\r
162 public java.util.Enumeration enumerateOtherData()
\r
164 return _otherDataList.elements();
\r
165 } //-- java.util.Enumeration enumerateOtherData()
\r
168 * Returns the value of field 'begin'.
\r
171 * @return the value of field 'begin'.
\r
173 public int getBegin()
\r
175 return this._begin;
\r
176 } //-- int getBegin()
\r
179 * Returns the value of field 'description'.
\r
182 * @return the value of field 'description'.
\r
184 public java.lang.String getDescription()
\r
186 return this._description;
\r
187 } //-- java.lang.String getDescription()
\r
190 * Returns the value of field 'end'.
\r
193 * @return the value of field 'end'.
\r
195 public int getEnd()
\r
198 } //-- int getEnd()
\r
201 * Returns the value of field 'featureGroup'.
\r
204 * @return the value of field 'featureGroup'.
\r
206 public java.lang.String getFeatureGroup()
\r
208 return this._featureGroup;
\r
209 } //-- java.lang.String getFeatureGroup()
\r
212 * Method getOtherData
\r
217 * @return OtherData
\r
219 public jalview.schemabinding.version2.OtherData getOtherData(int index)
\r
220 throws java.lang.IndexOutOfBoundsException
\r
222 //-- check bounds for index
\r
223 if ( (index < 0) || (index > _otherDataList.size()))
\r
225 throw new IndexOutOfBoundsException();
\r
228 return (jalview.schemabinding.version2.OtherData) _otherDataList.elementAt(
\r
230 } //-- jalview.schemabinding.version2.OtherData getOtherData(int)
\r
233 * Method getOtherData
\r
237 * @return OtherData
\r
239 public jalview.schemabinding.version2.OtherData[] getOtherData()
\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
246 mArray[index] = (jalview.schemabinding.version2.OtherData) _otherDataList.
\r
250 } //-- jalview.schemabinding.version2.OtherData[] getOtherData()
\r
253 * Method getOtherDataCount
\r
259 public int getOtherDataCount()
\r
261 return _otherDataList.size();
\r
262 } //-- int getOtherDataCount()
\r
265 * Returns the value of field 'score'.
\r
268 * @return the value of field 'score'.
\r
270 public float getScore()
\r
272 return this._score;
\r
273 } //-- float getScore()
\r
276 * Returns the value of field 'status'.
\r
279 * @return the value of field 'status'.
\r
281 public java.lang.String getStatus()
\r
283 return this._status;
\r
284 } //-- java.lang.String getStatus()
\r
287 * Returns the value of field 'type'.
\r
290 * @return the value of field 'type'.
\r
292 public java.lang.String getType()
\r
295 } //-- java.lang.String getType()
\r
304 public boolean hasBegin()
\r
306 return this._has_begin;
\r
307 } //-- boolean hasBegin()
\r
316 public boolean hasEnd()
\r
318 return this._has_end;
\r
319 } //-- boolean hasEnd()
\r
328 public boolean hasScore()
\r
330 return this._has_score;
\r
331 } //-- boolean hasScore()
\r
340 public boolean isValid()
\r
346 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,
\r
362 org.exolab.castor.xml.ValidationException
\r
365 Marshaller.marshal(this, out);
\r
366 } //-- void marshal(java.io.Writer)
\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
380 Marshaller.marshal(this, handler);
\r
381 } //-- void marshal(org.xml.sax.ContentHandler)
\r
384 * Method removeAllOtherData
\r
387 public void removeAllOtherData()
\r
389 _otherDataList.removeAllElements();
\r
390 } //-- void removeAllOtherData()
\r
393 * Method removeOtherData
\r
398 * @return OtherData
\r
400 public jalview.schemabinding.version2.OtherData removeOtherData(int index)
\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
408 * Sets the value of field 'begin'.
\r
410 * @param begin the value of field 'begin'.
\r
412 public void setBegin(int begin)
\r
414 this._begin = begin;
\r
415 this._has_begin = true;
\r
416 } //-- void setBegin(int)
\r
419 * Sets the value of field 'description'.
\r
421 * @param description the value of field 'description'.
\r
423 public void setDescription(java.lang.String description)
\r
425 this._description = description;
\r
426 } //-- void setDescription(java.lang.String)
\r
429 * Sets the value of field 'end'.
\r
431 * @param end the value of field 'end'.
\r
433 public void setEnd(int end)
\r
436 this._has_end = true;
\r
437 } //-- void setEnd(int)
\r
440 * Sets the value of field 'featureGroup'.
\r
442 * @param featureGroup the value of field 'featureGroup'.
\r
444 public void setFeatureGroup(java.lang.String featureGroup)
\r
446 this._featureGroup = featureGroup;
\r
447 } //-- void setFeatureGroup(java.lang.String)
\r
450 * Method setOtherData
\r
455 * @param vOtherData
\r
457 public void setOtherData(int index,
\r
458 jalview.schemabinding.version2.OtherData vOtherData)
\r
459 throws java.lang.IndexOutOfBoundsException
\r
461 //-- check bounds for index
\r
462 if ( (index < 0) || (index > _otherDataList.size()))
\r
464 throw new IndexOutOfBoundsException();
\r
466 _otherDataList.setElementAt(vOtherData, index);
\r
467 } //-- void setOtherData(int, jalview.schemabinding.version2.OtherData)
\r
470 * Method setOtherData
\r
474 * @param otherDataArray
\r
476 public void setOtherData(jalview.schemabinding.version2.OtherData[]
\r
480 _otherDataList.removeAllElements();
\r
481 for (int i = 0; i < otherDataArray.length; i++)
\r
483 _otherDataList.addElement(otherDataArray[i]);
\r
485 } //-- void setOtherData(jalview.schemabinding.version2.OtherData)
\r
488 * Sets the value of field 'score'.
\r
490 * @param score the value of field 'score'.
\r
492 public void setScore(float score)
\r
494 this._score = score;
\r
495 this._has_score = true;
\r
496 } //-- void setScore(float)
\r
499 * Sets the value of field 'status'.
\r
501 * @param status the value of field 'status'.
\r
503 public void setStatus(java.lang.String status)
\r
505 this._status = status;
\r
506 } //-- void setStatus(java.lang.String)
\r
509 * Sets the value of field 'type'.
\r
511 * @param type the value of field 'type'.
\r
513 public void setType(java.lang.String type)
\r
516 } //-- void setType(java.lang.String)
\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
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
538 public void validate()
\r
539 throws org.exolab.castor.xml.ValidationException
\r
541 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.
\r
543 validator.validate(this);
\r
544 } //-- void validate()
\r