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 Annotation
\r
24 implements java.io.Serializable
\r
27 //--------------------------/
\r
28 //- Class/Member Variables -/
\r
29 //--------------------------/
\r
34 private boolean _graph;
\r
37 * keeps track of state for field: _graph
\r
39 private boolean _has_graph;
\r
44 private int _graphType;
\r
47 * keeps track of state for field: _graphType
\r
49 private boolean _has_graphType;
\r
52 * Field _sequenceRef
\r
54 private java.lang.String _sequenceRef;
\r
57 * Field _graphColour
\r
59 private int _graphColour;
\r
62 * keeps track of state for field: _graphColour
\r
64 private boolean _has_graphColour;
\r
69 private int _graphGroup;
\r
72 * keeps track of state for field: _graphGroup
\r
74 private boolean _has_graphGroup;
\r
79 private java.lang.String _id;
\r
82 * Field _annotationElementList
\r
84 private java.util.Vector _annotationElementList;
\r
89 private java.lang.String _label;
\r
92 * Field _description
\r
94 private java.lang.String _description;
\r
97 * Field _thresholdLine
\r
99 private jalview.schemabinding.version2.ThresholdLine _thresholdLine;
\r
101 //----------------/
\r
102 //- Constructors -/
\r
103 //----------------/
\r
105 public Annotation()
\r
108 _annotationElementList = new Vector();
\r
109 } //-- jalview.schemabinding.version2.Annotation()
\r
116 * Method addAnnotationElement
\r
120 * @param vAnnotationElement
\r
122 public void addAnnotationElement(jalview.schemabinding.version2.
\r
123 AnnotationElement vAnnotationElement)
\r
124 throws java.lang.IndexOutOfBoundsException
\r
126 _annotationElementList.addElement(vAnnotationElement);
\r
127 } //-- void addAnnotationElement(jalview.schemabinding.version2.AnnotationElement)
\r
130 * Method addAnnotationElement
\r
135 * @param vAnnotationElement
\r
137 public void addAnnotationElement(int index,
\r
138 jalview.schemabinding.version2.AnnotationElement
\r
139 vAnnotationElement)
\r
140 throws java.lang.IndexOutOfBoundsException
\r
142 _annotationElementList.insertElementAt(vAnnotationElement, index);
\r
143 } //-- void addAnnotationElement(int, jalview.schemabinding.version2.AnnotationElement)
\r
146 * Method deleteGraph
\r
149 public void deleteGraph()
\r
151 this._has_graph = false;
\r
152 } //-- void deleteGraph()
\r
155 * Method deleteGraphColour
\r
158 public void deleteGraphColour()
\r
160 this._has_graphColour = false;
\r
161 } //-- void deleteGraphColour()
\r
164 * Method deleteGraphGroup
\r
167 public void deleteGraphGroup()
\r
169 this._has_graphGroup = false;
\r
170 } //-- void deleteGraphGroup()
\r
173 * Method deleteGraphType
\r
176 public void deleteGraphType()
\r
178 this._has_graphType = false;
\r
179 } //-- void deleteGraphType()
\r
182 * Method enumerateAnnotationElement
\r
186 * @return Enumeration
\r
188 public java.util.Enumeration enumerateAnnotationElement()
\r
190 return _annotationElementList.elements();
\r
191 } //-- java.util.Enumeration enumerateAnnotationElement()
\r
194 * Method getAnnotationElement
\r
199 * @return AnnotationElement
\r
201 public jalview.schemabinding.version2.AnnotationElement getAnnotationElement(int
\r
203 throws java.lang.IndexOutOfBoundsException
\r
205 //-- check bounds for index
\r
206 if ( (index < 0) || (index > _annotationElementList.size()))
\r
208 throw new IndexOutOfBoundsException();
\r
211 return (jalview.schemabinding.version2.AnnotationElement)
\r
212 _annotationElementList.elementAt(index);
\r
213 } //-- jalview.schemabinding.version2.AnnotationElement getAnnotationElement(int)
\r
216 * Method getAnnotationElement
\r
220 * @return AnnotationElement
\r
222 public jalview.schemabinding.version2.AnnotationElement[]
\r
223 getAnnotationElement()
\r
225 int size = _annotationElementList.size();
\r
226 jalview.schemabinding.version2.AnnotationElement[] mArray = new jalview.
\r
227 schemabinding.version2.AnnotationElement[size];
\r
228 for (int index = 0; index < size; index++)
\r
230 mArray[index] = (jalview.schemabinding.version2.AnnotationElement)
\r
231 _annotationElementList.elementAt(index);
\r
234 } //-- jalview.schemabinding.version2.AnnotationElement[] getAnnotationElement()
\r
237 * Method getAnnotationElementCount
\r
243 public int getAnnotationElementCount()
\r
245 return _annotationElementList.size();
\r
246 } //-- int getAnnotationElementCount()
\r
249 * Returns the value of field 'description'.
\r
252 * @return the value of field 'description'.
\r
254 public java.lang.String getDescription()
\r
256 return this._description;
\r
257 } //-- java.lang.String getDescription()
\r
260 * Returns the value of field 'graph'.
\r
263 * @return the value of field 'graph'.
\r
265 public boolean getGraph()
\r
267 return this._graph;
\r
268 } //-- boolean getGraph()
\r
271 * Returns the value of field 'graphColour'.
\r
274 * @return the value of field 'graphColour'.
\r
276 public int getGraphColour()
\r
278 return this._graphColour;
\r
279 } //-- int getGraphColour()
\r
282 * Returns the value of field 'graphGroup'.
\r
285 * @return the value of field 'graphGroup'.
\r
287 public int getGraphGroup()
\r
289 return this._graphGroup;
\r
290 } //-- int getGraphGroup()
\r
293 * Returns the value of field 'graphType'.
\r
296 * @return the value of field 'graphType'.
\r
298 public int getGraphType()
\r
300 return this._graphType;
\r
301 } //-- int getGraphType()
\r
304 * Returns the value of field 'id'.
\r
307 * @return the value of field 'id'.
\r
309 public java.lang.String getId()
\r
312 } //-- java.lang.String getId()
\r
315 * Returns the value of field 'label'.
\r
318 * @return the value of field 'label'.
\r
320 public java.lang.String getLabel()
\r
322 return this._label;
\r
323 } //-- java.lang.String getLabel()
\r
326 * Returns the value of field 'sequenceRef'.
\r
329 * @return the value of field 'sequenceRef'.
\r
331 public java.lang.String getSequenceRef()
\r
333 return this._sequenceRef;
\r
334 } //-- java.lang.String getSequenceRef()
\r
337 * Returns the value of field 'thresholdLine'.
\r
339 * @return ThresholdLine
\r
340 * @return the value of field 'thresholdLine'.
\r
342 public jalview.schemabinding.version2.ThresholdLine getThresholdLine()
\r
344 return this._thresholdLine;
\r
345 } //-- jalview.schemabinding.version2.ThresholdLine getThresholdLine()
\r
354 public boolean hasGraph()
\r
356 return this._has_graph;
\r
357 } //-- boolean hasGraph()
\r
360 * Method hasGraphColour
\r
366 public boolean hasGraphColour()
\r
368 return this._has_graphColour;
\r
369 } //-- boolean hasGraphColour()
\r
372 * Method hasGraphGroup
\r
378 public boolean hasGraphGroup()
\r
380 return this._has_graphGroup;
\r
381 } //-- boolean hasGraphGroup()
\r
384 * Method hasGraphType
\r
390 public boolean hasGraphType()
\r
392 return this._has_graphType;
\r
393 } //-- boolean hasGraphType()
\r
402 public boolean isValid()
\r
408 catch (org.exolab.castor.xml.ValidationException vex)
\r
413 } //-- boolean isValid()
\r
422 public void marshal(java.io.Writer out)
\r
423 throws org.exolab.castor.xml.MarshalException,
\r
424 org.exolab.castor.xml.ValidationException
\r
427 Marshaller.marshal(this, out);
\r
428 } //-- void marshal(java.io.Writer)
\r
437 public void marshal(org.xml.sax.ContentHandler handler)
\r
438 throws java.io.IOException, org.exolab.castor.xml.MarshalException,
\r
439 org.exolab.castor.xml.ValidationException
\r
442 Marshaller.marshal(this, handler);
\r
443 } //-- void marshal(org.xml.sax.ContentHandler)
\r
446 * Method removeAllAnnotationElement
\r
449 public void removeAllAnnotationElement()
\r
451 _annotationElementList.removeAllElements();
\r
452 } //-- void removeAllAnnotationElement()
\r
455 * Method removeAnnotationElement
\r
460 * @return AnnotationElement
\r
462 public jalview.schemabinding.version2.AnnotationElement
\r
463 removeAnnotationElement(int index)
\r
465 java.lang.Object obj = _annotationElementList.elementAt(index);
\r
466 _annotationElementList.removeElementAt(index);
\r
467 return (jalview.schemabinding.version2.AnnotationElement) obj;
\r
468 } //-- jalview.schemabinding.version2.AnnotationElement removeAnnotationElement(int)
\r
471 * Method setAnnotationElement
\r
476 * @param vAnnotationElement
\r
478 public void setAnnotationElement(int index,
\r
479 jalview.schemabinding.version2.AnnotationElement
\r
480 vAnnotationElement)
\r
481 throws java.lang.IndexOutOfBoundsException
\r
483 //-- check bounds for index
\r
484 if ( (index < 0) || (index > _annotationElementList.size()))
\r
486 throw new IndexOutOfBoundsException();
\r
488 _annotationElementList.setElementAt(vAnnotationElement, index);
\r
489 } //-- void setAnnotationElement(int, jalview.schemabinding.version2.AnnotationElement)
\r
492 * Method setAnnotationElement
\r
496 * @param annotationElementArray
\r
498 public void setAnnotationElement(jalview.schemabinding.version2.
\r
499 AnnotationElement[] annotationElementArray)
\r
502 _annotationElementList.removeAllElements();
\r
503 for (int i = 0; i < annotationElementArray.length; i++)
\r
505 _annotationElementList.addElement(annotationElementArray[i]);
\r
507 } //-- void setAnnotationElement(jalview.schemabinding.version2.AnnotationElement)
\r
510 * Sets the value of field 'description'.
\r
512 * @param description the value of field 'description'.
\r
514 public void setDescription(java.lang.String description)
\r
516 this._description = description;
\r
517 } //-- void setDescription(java.lang.String)
\r
520 * Sets the value of field 'graph'.
\r
522 * @param graph the value of field 'graph'.
\r
524 public void setGraph(boolean graph)
\r
526 this._graph = graph;
\r
527 this._has_graph = true;
\r
528 } //-- void setGraph(boolean)
\r
531 * Sets the value of field 'graphColour'.
\r
533 * @param graphColour the value of field 'graphColour'.
\r
535 public void setGraphColour(int graphColour)
\r
537 this._graphColour = graphColour;
\r
538 this._has_graphColour = true;
\r
539 } //-- void setGraphColour(int)
\r
542 * Sets the value of field 'graphGroup'.
\r
544 * @param graphGroup the value of field 'graphGroup'.
\r
546 public void setGraphGroup(int graphGroup)
\r
548 this._graphGroup = graphGroup;
\r
549 this._has_graphGroup = true;
\r
550 } //-- void setGraphGroup(int)
\r
553 * Sets the value of field 'graphType'.
\r
555 * @param graphType the value of field 'graphType'.
\r
557 public void setGraphType(int graphType)
\r
559 this._graphType = graphType;
\r
560 this._has_graphType = true;
\r
561 } //-- void setGraphType(int)
\r
564 * Sets the value of field 'id'.
\r
566 * @param id the value of field 'id'.
\r
568 public void setId(java.lang.String id)
\r
571 } //-- void setId(java.lang.String)
\r
574 * Sets the value of field 'label'.
\r
576 * @param label the value of field 'label'.
\r
578 public void setLabel(java.lang.String label)
\r
580 this._label = label;
\r
581 } //-- void setLabel(java.lang.String)
\r
584 * Sets the value of field 'sequenceRef'.
\r
586 * @param sequenceRef the value of field 'sequenceRef'.
\r
588 public void setSequenceRef(java.lang.String sequenceRef)
\r
590 this._sequenceRef = sequenceRef;
\r
591 } //-- void setSequenceRef(java.lang.String)
\r
594 * Sets the value of field 'thresholdLine'.
\r
596 * @param thresholdLine the value of field 'thresholdLine'.
\r
598 public void setThresholdLine(jalview.schemabinding.version2.ThresholdLine
\r
601 this._thresholdLine = thresholdLine;
\r
602 } //-- void setThresholdLine(jalview.schemabinding.version2.ThresholdLine)
\r
612 public static java.lang.Object unmarshal(java.io.Reader reader)
\r
613 throws org.exolab.castor.xml.MarshalException,
\r
614 org.exolab.castor.xml.ValidationException
\r
616 return (jalview.schemabinding.version2.Annotation) Unmarshaller.unmarshal(
\r
617 jalview.schemabinding.version2.Annotation.class, reader);
\r
618 } //-- java.lang.Object unmarshal(java.io.Reader)
\r
624 public void validate()
\r
625 throws org.exolab.castor.xml.ValidationException
\r
627 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.
\r
629 validator.validate(this);
\r
630 } //-- void validate()
\r