2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
\r
8 package jalview.schemabinding.version2;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
14 import org.exolab.castor.xml.Marshaller;
\r
15 import org.exolab.castor.xml.Unmarshaller;
\r
20 * @version $Revision$ $Date$
\r
22 public class Feature implements java.io.Serializable {
\r
25 //--------------------------/
\r
26 //- Class/Member Variables -/
\r
27 //--------------------------/
\r
35 * keeps track of state for field: _begin
\r
37 private boolean _has_begin;
\r
45 * keeps track of state for field: _end
\r
47 private boolean _has_end;
\r
52 private java.lang.String _type;
\r
55 * Field _description.
\r
57 private java.lang.String _description;
\r
62 private java.lang.String _status;
\r
65 * Field _featureGroup.
\r
67 private java.lang.String _featureGroup;
\r
72 private float _score;
\r
75 * keeps track of state for field: _score
\r
77 private boolean _has_score;
\r
80 * Field _otherDataList.
\r
82 private java.util.Vector _otherDataList;
\r
91 this._otherDataList = new java.util.Vector();
\r
102 * @param vOtherData
\r
103 * @throws java.lang.IndexOutOfBoundsException if the index
\r
104 * given is outside the bounds of the collection
\r
106 public void addOtherData(
\r
107 final jalview.schemabinding.version2.OtherData vOtherData)
\r
108 throws java.lang.IndexOutOfBoundsException {
\r
109 this._otherDataList.addElement(vOtherData);
\r
116 * @param vOtherData
\r
117 * @throws java.lang.IndexOutOfBoundsException if the index
\r
118 * given is outside the bounds of the collection
\r
120 public void addOtherData(
\r
122 final jalview.schemabinding.version2.OtherData vOtherData)
\r
123 throws java.lang.IndexOutOfBoundsException {
\r
124 this._otherDataList.add(index, vOtherData);
\r
129 public void deleteBegin(
\r
131 this._has_begin= false;
\r
136 public void deleteEnd(
\r
138 this._has_end= false;
\r
143 public void deleteScore(
\r
145 this._has_score= false;
\r
149 * Method enumerateOtherData.
\r
151 * @return an Enumeration over all
\r
152 * jalview.schemabinding.version2.OtherData elements
\r
154 public java.util.Enumeration enumerateOtherData(
\r
156 return this._otherDataList.elements();
\r
160 * Returns the value of field 'begin'.
\r
162 * @return the value of field 'Begin'.
\r
164 public int getBegin(
\r
166 return this._begin;
\r
170 * Returns the value of field 'description'.
\r
172 * @return the value of field 'Description'.
\r
174 public java.lang.String getDescription(
\r
176 return this._description;
\r
180 * Returns the value of field 'end'.
\r
182 * @return the value of field 'End'.
\r
190 * Returns the value of field 'featureGroup'.
\r
192 * @return the value of field 'FeatureGroup'.
\r
194 public java.lang.String getFeatureGroup(
\r
196 return this._featureGroup;
\r
200 * Method getOtherData.
\r
203 * @throws java.lang.IndexOutOfBoundsException if the index
\r
204 * given is outside the bounds of the collection
\r
205 * @return the value of the
\r
206 * jalview.schemabinding.version2.OtherData at the given index
\r
208 public jalview.schemabinding.version2.OtherData getOtherData(
\r
210 throws java.lang.IndexOutOfBoundsException {
\r
211 // check bounds for index
\r
212 if (index < 0 || index >= this._otherDataList.size()) {
\r
213 throw new IndexOutOfBoundsException("getOtherData: Index value '" + index + "' not in range [0.." + (this._otherDataList.size() - 1) + "]");
\r
216 return (jalview.schemabinding.version2.OtherData) _otherDataList.get(index);
\r
220 * Method getOtherData.Returns the contents of the collection
\r
221 * in an Array. <p>Note: Just in case the collection contents
\r
222 * are changing in another thread, we pass a 0-length Array of
\r
223 * the correct type into the API call. This way we <i>know</i>
\r
224 * that the Array returned is of exactly the correct length.
\r
226 * @return this collection as an Array
\r
228 public jalview.schemabinding.version2.OtherData[] getOtherData(
\r
230 jalview.schemabinding.version2.OtherData[] array = new jalview.schemabinding.version2.OtherData[0];
\r
231 return (jalview.schemabinding.version2.OtherData[]) this._otherDataList.toArray(array);
\r
235 * Method getOtherDataCount.
\r
237 * @return the size of this collection
\r
239 public int getOtherDataCount(
\r
241 return this._otherDataList.size();
\r
245 * Returns the value of field 'score'.
\r
247 * @return the value of field 'Score'.
\r
249 public float getScore(
\r
251 return this._score;
\r
255 * Returns the value of field 'status'.
\r
257 * @return the value of field 'Status'.
\r
259 public java.lang.String getStatus(
\r
261 return this._status;
\r
265 * Returns the value of field 'type'.
\r
267 * @return the value of field 'Type'.
\r
269 public java.lang.String getType(
\r
277 * @return true if at least one Begin has been added
\r
279 public boolean hasBegin(
\r
281 return this._has_begin;
\r
287 * @return true if at least one End has been added
\r
289 public boolean hasEnd(
\r
291 return this._has_end;
\r
297 * @return true if at least one Score has been added
\r
299 public boolean hasScore(
\r
301 return this._has_score;
\r
307 * @return true if this object is valid according to the schema
\r
309 public boolean isValid(
\r
313 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
323 * @throws org.exolab.castor.xml.MarshalException if object is
\r
324 * null or if any SAXException is thrown during marshaling
\r
325 * @throws org.exolab.castor.xml.ValidationException if this
\r
326 * object is an invalid instance according to the schema
\r
328 public void marshal(
\r
329 final java.io.Writer out)
\r
330 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
331 Marshaller.marshal(this, out);
\r
338 * @throws java.io.IOException if an IOException occurs during
\r
340 * @throws org.exolab.castor.xml.ValidationException if this
\r
341 * object is an invalid instance according to the schema
\r
342 * @throws org.exolab.castor.xml.MarshalException if object is
\r
343 * null or if any SAXException is thrown during marshaling
\r
345 public void marshal(
\r
346 final org.xml.sax.ContentHandler handler)
\r
347 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
348 Marshaller.marshal(this, handler);
\r
353 public void removeAllOtherData(
\r
355 this._otherDataList.clear();
\r
359 * Method removeOtherData.
\r
361 * @param vOtherData
\r
362 * @return true if the object was removed from the collection.
\r
364 public boolean removeOtherData(
\r
365 final jalview.schemabinding.version2.OtherData vOtherData) {
\r
366 boolean removed = _otherDataList.remove(vOtherData);
\r
371 * Method removeOtherDataAt.
\r
374 * @return the element removed from the collection
\r
376 public jalview.schemabinding.version2.OtherData removeOtherDataAt(
\r
378 java.lang.Object obj = this._otherDataList.remove(index);
\r
379 return (jalview.schemabinding.version2.OtherData) obj;
\r
383 * Sets the value of field 'begin'.
\r
385 * @param begin the value of field 'begin'.
\r
387 public void setBegin(
\r
389 this._begin = begin;
\r
390 this._has_begin = true;
\r
394 * Sets the value of field 'description'.
\r
396 * @param description the value of field 'description'.
\r
398 public void setDescription(
\r
399 final java.lang.String description) {
\r
400 this._description = description;
\r
404 * Sets the value of field 'end'.
\r
406 * @param end the value of field 'end'.
\r
408 public void setEnd(
\r
411 this._has_end = true;
\r
415 * Sets the value of field 'featureGroup'.
\r
417 * @param featureGroup the value of field 'featureGroup'.
\r
419 public void setFeatureGroup(
\r
420 final java.lang.String featureGroup) {
\r
421 this._featureGroup = featureGroup;
\r
428 * @param vOtherData
\r
429 * @throws java.lang.IndexOutOfBoundsException if the index
\r
430 * given is outside the bounds of the collection
\r
432 public void setOtherData(
\r
434 final jalview.schemabinding.version2.OtherData vOtherData)
\r
435 throws java.lang.IndexOutOfBoundsException {
\r
436 // check bounds for index
\r
437 if (index < 0 || index >= this._otherDataList.size()) {
\r
438 throw new IndexOutOfBoundsException("setOtherData: Index value '" + index + "' not in range [0.." + (this._otherDataList.size() - 1) + "]");
\r
441 this._otherDataList.set(index, vOtherData);
\r
447 * @param vOtherDataArray
\r
449 public void setOtherData(
\r
450 final jalview.schemabinding.version2.OtherData[] vOtherDataArray) {
\r
452 _otherDataList.clear();
\r
454 for (int i = 0; i < vOtherDataArray.length; i++) {
\r
455 this._otherDataList.add(vOtherDataArray[i]);
\r
460 * Sets the value of field 'score'.
\r
462 * @param score the value of field 'score'.
\r
464 public void setScore(
\r
465 final float score) {
\r
466 this._score = score;
\r
467 this._has_score = true;
\r
471 * Sets the value of field 'status'.
\r
473 * @param status the value of field 'status'.
\r
475 public void setStatus(
\r
476 final java.lang.String status) {
\r
477 this._status = status;
\r
481 * Sets the value of field 'type'.
\r
483 * @param type the value of field 'type'.
\r
485 public void setType(
\r
486 final java.lang.String type) {
\r
491 * Method unmarshal.
\r
494 * @throws org.exolab.castor.xml.MarshalException if object is
\r
495 * null or if any SAXException is thrown during marshaling
\r
496 * @throws org.exolab.castor.xml.ValidationException if this
\r
497 * object is an invalid instance according to the schema
\r
498 * @return the unmarshaled jalview.schemabinding.version2.Featur
\r
500 public static jalview.schemabinding.version2.Feature unmarshal(
\r
501 final java.io.Reader reader)
\r
502 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
503 return (jalview.schemabinding.version2.Feature) Unmarshaller.unmarshal(jalview.schemabinding.version2.Feature.class, reader);
\r
509 * @throws org.exolab.castor.xml.ValidationException if this
\r
510 * object is an invalid instance according to the schema
\r
512 public void validate(
\r
514 throws org.exolab.castor.xml.ValidationException {
\r
515 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
516 validator.validate(this);
\r