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 Annotation implements java.io.Serializable {
\r
34 //--------------------------/
\r
35 //- Class/Member Variables -/
\r
36 //--------------------------/
\r
41 private boolean _graph;
\r
44 * keeps track of state for field: _graph
\r
46 private boolean _has_graph;
\r
51 private int _graphType;
\r
54 * keeps track of state for field: _graphType
\r
56 private boolean _has_graphType;
\r
59 * Field _sequenceRef
\r
61 private java.lang.String _sequenceRef;
\r
64 * Field _annotationElementList
\r
66 private java.util.Vector _annotationElementList;
\r
71 private java.lang.String _label;
\r
74 * Field _description
\r
76 private java.lang.String _description;
\r
79 * Field _thresholdLine
\r
81 private jalview.schemabinding.version2.ThresholdLine _thresholdLine;
\r
88 public Annotation() {
\r
90 _annotationElementList = new Vector();
\r
91 } //-- jalview.schemabinding.version2.Annotation()
\r
99 * Method addAnnotationElement
\r
103 * @param vAnnotationElement
\r
105 public void addAnnotationElement(jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
\r
106 throws java.lang.IndexOutOfBoundsException
\r
108 _annotationElementList.addElement(vAnnotationElement);
\r
109 } //-- void addAnnotationElement(jalview.schemabinding.version2.AnnotationElement)
\r
112 * Method addAnnotationElement
\r
117 * @param vAnnotationElement
\r
119 public void addAnnotationElement(int index, jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
\r
120 throws java.lang.IndexOutOfBoundsException
\r
122 _annotationElementList.insertElementAt(vAnnotationElement, index);
\r
123 } //-- void addAnnotationElement(int, jalview.schemabinding.version2.AnnotationElement)
\r
126 * Method deleteGraph
\r
129 public void deleteGraph()
\r
131 this._has_graph= false;
\r
132 } //-- void deleteGraph()
\r
135 * Method deleteGraphType
\r
138 public void deleteGraphType()
\r
140 this._has_graphType= false;
\r
141 } //-- void deleteGraphType()
\r
144 * Method enumerateAnnotationElement
\r
148 * @return Enumeration
\r
150 public java.util.Enumeration enumerateAnnotationElement()
\r
152 return _annotationElementList.elements();
\r
153 } //-- java.util.Enumeration enumerateAnnotationElement()
\r
156 * Method getAnnotationElement
\r
161 * @return AnnotationElement
\r
163 public jalview.schemabinding.version2.AnnotationElement getAnnotationElement(int index)
\r
164 throws java.lang.IndexOutOfBoundsException
\r
166 //-- check bounds for index
\r
167 if ((index < 0) || (index > _annotationElementList.size())) {
\r
168 throw new IndexOutOfBoundsException();
\r
171 return (jalview.schemabinding.version2.AnnotationElement) _annotationElementList.elementAt(index);
\r
172 } //-- jalview.schemabinding.version2.AnnotationElement getAnnotationElement(int)
\r
175 * Method getAnnotationElement
\r
179 * @return AnnotationElement
\r
181 public jalview.schemabinding.version2.AnnotationElement[] getAnnotationElement()
\r
183 int size = _annotationElementList.size();
\r
184 jalview.schemabinding.version2.AnnotationElement[] mArray = new jalview.schemabinding.version2.AnnotationElement[size];
\r
185 for (int index = 0; index < size; index++) {
\r
186 mArray[index] = (jalview.schemabinding.version2.AnnotationElement) _annotationElementList.elementAt(index);
\r
189 } //-- jalview.schemabinding.version2.AnnotationElement[] getAnnotationElement()
\r
192 * Method getAnnotationElementCount
\r
198 public int getAnnotationElementCount()
\r
200 return _annotationElementList.size();
\r
201 } //-- int getAnnotationElementCount()
\r
204 * Returns the value of field 'description'.
\r
207 * @return the value of field 'description'.
\r
209 public java.lang.String getDescription()
\r
211 return this._description;
\r
212 } //-- java.lang.String getDescription()
\r
215 * Returns the value of field 'graph'.
\r
218 * @return the value of field 'graph'.
\r
220 public boolean getGraph()
\r
222 return this._graph;
\r
223 } //-- boolean getGraph()
\r
226 * Returns the value of field 'graphType'.
\r
229 * @return the value of field 'graphType'.
\r
231 public int getGraphType()
\r
233 return this._graphType;
\r
234 } //-- int getGraphType()
\r
237 * Returns the value of field 'label'.
\r
240 * @return the value of field 'label'.
\r
242 public java.lang.String getLabel()
\r
244 return this._label;
\r
245 } //-- java.lang.String getLabel()
\r
248 * Returns the value of field 'sequenceRef'.
\r
251 * @return the value of field 'sequenceRef'.
\r
253 public java.lang.String getSequenceRef()
\r
255 return this._sequenceRef;
\r
256 } //-- java.lang.String getSequenceRef()
\r
259 * Returns the value of field 'thresholdLine'.
\r
261 * @return ThresholdLine
\r
262 * @return the value of field 'thresholdLine'.
\r
264 public jalview.schemabinding.version2.ThresholdLine getThresholdLine()
\r
266 return this._thresholdLine;
\r
267 } //-- jalview.schemabinding.version2.ThresholdLine getThresholdLine()
\r
276 public boolean hasGraph()
\r
278 return this._has_graph;
\r
279 } //-- boolean hasGraph()
\r
282 * Method hasGraphType
\r
288 public boolean hasGraphType()
\r
290 return this._has_graphType;
\r
291 } //-- boolean hasGraphType()
\r
300 public boolean isValid()
\r
305 catch (org.exolab.castor.xml.ValidationException vex) {
\r
309 } //-- boolean isValid()
\r
318 public void marshal(java.io.Writer out)
\r
319 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
322 Marshaller.marshal(this, out);
\r
323 } //-- void marshal(java.io.Writer)
\r
332 public void marshal(org.xml.sax.ContentHandler handler)
\r
333 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
336 Marshaller.marshal(this, handler);
\r
337 } //-- void marshal(org.xml.sax.ContentHandler)
\r
340 * Method removeAllAnnotationElement
\r
343 public void removeAllAnnotationElement()
\r
345 _annotationElementList.removeAllElements();
\r
346 } //-- void removeAllAnnotationElement()
\r
349 * Method removeAnnotationElement
\r
354 * @return AnnotationElement
\r
356 public jalview.schemabinding.version2.AnnotationElement removeAnnotationElement(int index)
\r
358 java.lang.Object obj = _annotationElementList.elementAt(index);
\r
359 _annotationElementList.removeElementAt(index);
\r
360 return (jalview.schemabinding.version2.AnnotationElement) obj;
\r
361 } //-- jalview.schemabinding.version2.AnnotationElement removeAnnotationElement(int)
\r
364 * Method setAnnotationElement
\r
369 * @param vAnnotationElement
\r
371 public void setAnnotationElement(int index, jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
\r
372 throws java.lang.IndexOutOfBoundsException
\r
374 //-- check bounds for index
\r
375 if ((index < 0) || (index > _annotationElementList.size())) {
\r
376 throw new IndexOutOfBoundsException();
\r
378 _annotationElementList.setElementAt(vAnnotationElement, index);
\r
379 } //-- void setAnnotationElement(int, jalview.schemabinding.version2.AnnotationElement)
\r
382 * Method setAnnotationElement
\r
386 * @param annotationElementArray
\r
388 public void setAnnotationElement(jalview.schemabinding.version2.AnnotationElement[] annotationElementArray)
\r
391 _annotationElementList.removeAllElements();
\r
392 for (int i = 0; i < annotationElementArray.length; i++) {
\r
393 _annotationElementList.addElement(annotationElementArray[i]);
\r
395 } //-- void setAnnotationElement(jalview.schemabinding.version2.AnnotationElement)
\r
398 * Sets the value of field 'description'.
\r
400 * @param description the value of field 'description'.
\r
402 public void setDescription(java.lang.String description)
\r
404 this._description = description;
\r
405 } //-- void setDescription(java.lang.String)
\r
408 * Sets the value of field 'graph'.
\r
410 * @param graph the value of field 'graph'.
\r
412 public void setGraph(boolean graph)
\r
414 this._graph = graph;
\r
415 this._has_graph = true;
\r
416 } //-- void setGraph(boolean)
\r
419 * Sets the value of field 'graphType'.
\r
421 * @param graphType the value of field 'graphType'.
\r
423 public void setGraphType(int graphType)
\r
425 this._graphType = graphType;
\r
426 this._has_graphType = true;
\r
427 } //-- void setGraphType(int)
\r
430 * Sets the value of field 'label'.
\r
432 * @param label the value of field 'label'.
\r
434 public void setLabel(java.lang.String label)
\r
436 this._label = label;
\r
437 } //-- void setLabel(java.lang.String)
\r
440 * Sets the value of field 'sequenceRef'.
\r
442 * @param sequenceRef the value of field 'sequenceRef'.
\r
444 public void setSequenceRef(java.lang.String sequenceRef)
\r
446 this._sequenceRef = sequenceRef;
\r
447 } //-- void setSequenceRef(java.lang.String)
\r
450 * Sets the value of field 'thresholdLine'.
\r
452 * @param thresholdLine the value of field 'thresholdLine'.
\r
454 public void setThresholdLine(jalview.schemabinding.version2.ThresholdLine thresholdLine)
\r
456 this._thresholdLine = thresholdLine;
\r
457 } //-- void setThresholdLine(jalview.schemabinding.version2.ThresholdLine)
\r
467 public static java.lang.Object unmarshal(java.io.Reader reader)
\r
468 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
470 return (jalview.schemabinding.version2.Annotation) Unmarshaller.unmarshal(jalview.schemabinding.version2.Annotation.class, reader);
\r
471 } //-- java.lang.Object unmarshal(java.io.Reader)
\r
477 public void validate()
\r
478 throws org.exolab.castor.xml.ValidationException
\r
480 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
481 validator.validate(this);
\r
482 } //-- void validate()
\r