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 _graphColour
\r
66 private int _graphColour;
\r
69 * keeps track of state for field: _graphColour
\r
71 private boolean _has_graphColour;
\r
76 private int _graphGroup;
\r
79 * keeps track of state for field: _graphGroup
\r
81 private boolean _has_graphGroup;
\r
84 * Field _annotationElementList
\r
86 private java.util.Vector _annotationElementList;
\r
91 private java.lang.String _label;
\r
94 * Field _description
\r
96 private java.lang.String _description;
\r
99 * Field _thresholdLine
\r
101 private jalview.schemabinding.version2.ThresholdLine _thresholdLine;
\r
104 //----------------/
\r
105 //- Constructors -/
\r
106 //----------------/
\r
108 public Annotation() {
\r
110 _annotationElementList = new Vector();
\r
111 } //-- jalview.schemabinding.version2.Annotation()
\r
119 * Method addAnnotationElement
\r
123 * @param vAnnotationElement
\r
125 public void addAnnotationElement(jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
\r
126 throws java.lang.IndexOutOfBoundsException
\r
128 _annotationElementList.addElement(vAnnotationElement);
\r
129 } //-- void addAnnotationElement(jalview.schemabinding.version2.AnnotationElement)
\r
132 * Method addAnnotationElement
\r
137 * @param vAnnotationElement
\r
139 public void addAnnotationElement(int index, jalview.schemabinding.version2.AnnotationElement 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 index)
\r
202 throws java.lang.IndexOutOfBoundsException
\r
204 //-- check bounds for index
\r
205 if ((index < 0) || (index > _annotationElementList.size())) {
\r
206 throw new IndexOutOfBoundsException();
\r
209 return (jalview.schemabinding.version2.AnnotationElement) _annotationElementList.elementAt(index);
\r
210 } //-- jalview.schemabinding.version2.AnnotationElement getAnnotationElement(int)
\r
213 * Method getAnnotationElement
\r
217 * @return AnnotationElement
\r
219 public jalview.schemabinding.version2.AnnotationElement[] getAnnotationElement()
\r
221 int size = _annotationElementList.size();
\r
222 jalview.schemabinding.version2.AnnotationElement[] mArray = new jalview.schemabinding.version2.AnnotationElement[size];
\r
223 for (int index = 0; index < size; index++) {
\r
224 mArray[index] = (jalview.schemabinding.version2.AnnotationElement) _annotationElementList.elementAt(index);
\r
227 } //-- jalview.schemabinding.version2.AnnotationElement[] getAnnotationElement()
\r
230 * Method getAnnotationElementCount
\r
236 public int getAnnotationElementCount()
\r
238 return _annotationElementList.size();
\r
239 } //-- int getAnnotationElementCount()
\r
242 * Returns the value of field 'description'.
\r
245 * @return the value of field 'description'.
\r
247 public java.lang.String getDescription()
\r
249 return this._description;
\r
250 } //-- java.lang.String getDescription()
\r
253 * Returns the value of field 'graph'.
\r
256 * @return the value of field 'graph'.
\r
258 public boolean getGraph()
\r
260 return this._graph;
\r
261 } //-- boolean getGraph()
\r
264 * Returns the value of field 'graphColour'.
\r
267 * @return the value of field 'graphColour'.
\r
269 public int getGraphColour()
\r
271 return this._graphColour;
\r
272 } //-- int getGraphColour()
\r
275 * Returns the value of field 'graphGroup'.
\r
278 * @return the value of field 'graphGroup'.
\r
280 public int getGraphGroup()
\r
282 return this._graphGroup;
\r
283 } //-- int getGraphGroup()
\r
286 * Returns the value of field 'graphType'.
\r
289 * @return the value of field 'graphType'.
\r
291 public int getGraphType()
\r
293 return this._graphType;
\r
294 } //-- int getGraphType()
\r
297 * Returns the value of field 'label'.
\r
300 * @return the value of field 'label'.
\r
302 public java.lang.String getLabel()
\r
304 return this._label;
\r
305 } //-- java.lang.String getLabel()
\r
308 * Returns the value of field 'sequenceRef'.
\r
311 * @return the value of field 'sequenceRef'.
\r
313 public java.lang.String getSequenceRef()
\r
315 return this._sequenceRef;
\r
316 } //-- java.lang.String getSequenceRef()
\r
319 * Returns the value of field 'thresholdLine'.
\r
321 * @return ThresholdLine
\r
322 * @return the value of field 'thresholdLine'.
\r
324 public jalview.schemabinding.version2.ThresholdLine getThresholdLine()
\r
326 return this._thresholdLine;
\r
327 } //-- jalview.schemabinding.version2.ThresholdLine getThresholdLine()
\r
336 public boolean hasGraph()
\r
338 return this._has_graph;
\r
339 } //-- boolean hasGraph()
\r
342 * Method hasGraphColour
\r
348 public boolean hasGraphColour()
\r
350 return this._has_graphColour;
\r
351 } //-- boolean hasGraphColour()
\r
354 * Method hasGraphGroup
\r
360 public boolean hasGraphGroup()
\r
362 return this._has_graphGroup;
\r
363 } //-- boolean hasGraphGroup()
\r
366 * Method hasGraphType
\r
372 public boolean hasGraphType()
\r
374 return this._has_graphType;
\r
375 } //-- boolean hasGraphType()
\r
384 public boolean isValid()
\r
389 catch (org.exolab.castor.xml.ValidationException vex) {
\r
393 } //-- boolean isValid()
\r
402 public void marshal(java.io.Writer out)
\r
403 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
406 Marshaller.marshal(this, out);
\r
407 } //-- void marshal(java.io.Writer)
\r
416 public void marshal(org.xml.sax.ContentHandler handler)
\r
417 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
420 Marshaller.marshal(this, handler);
\r
421 } //-- void marshal(org.xml.sax.ContentHandler)
\r
424 * Method removeAllAnnotationElement
\r
427 public void removeAllAnnotationElement()
\r
429 _annotationElementList.removeAllElements();
\r
430 } //-- void removeAllAnnotationElement()
\r
433 * Method removeAnnotationElement
\r
438 * @return AnnotationElement
\r
440 public jalview.schemabinding.version2.AnnotationElement removeAnnotationElement(int index)
\r
442 java.lang.Object obj = _annotationElementList.elementAt(index);
\r
443 _annotationElementList.removeElementAt(index);
\r
444 return (jalview.schemabinding.version2.AnnotationElement) obj;
\r
445 } //-- jalview.schemabinding.version2.AnnotationElement removeAnnotationElement(int)
\r
448 * Method setAnnotationElement
\r
453 * @param vAnnotationElement
\r
455 public void setAnnotationElement(int index, jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
\r
456 throws java.lang.IndexOutOfBoundsException
\r
458 //-- check bounds for index
\r
459 if ((index < 0) || (index > _annotationElementList.size())) {
\r
460 throw new IndexOutOfBoundsException();
\r
462 _annotationElementList.setElementAt(vAnnotationElement, index);
\r
463 } //-- void setAnnotationElement(int, jalview.schemabinding.version2.AnnotationElement)
\r
466 * Method setAnnotationElement
\r
470 * @param annotationElementArray
\r
472 public void setAnnotationElement(jalview.schemabinding.version2.AnnotationElement[] annotationElementArray)
\r
475 _annotationElementList.removeAllElements();
\r
476 for (int i = 0; i < annotationElementArray.length; i++) {
\r
477 _annotationElementList.addElement(annotationElementArray[i]);
\r
479 } //-- void setAnnotationElement(jalview.schemabinding.version2.AnnotationElement)
\r
482 * Sets the value of field 'description'.
\r
484 * @param description the value of field 'description'.
\r
486 public void setDescription(java.lang.String description)
\r
488 this._description = description;
\r
489 } //-- void setDescription(java.lang.String)
\r
492 * Sets the value of field 'graph'.
\r
494 * @param graph the value of field 'graph'.
\r
496 public void setGraph(boolean graph)
\r
498 this._graph = graph;
\r
499 this._has_graph = true;
\r
500 } //-- void setGraph(boolean)
\r
503 * Sets the value of field 'graphColour'.
\r
505 * @param graphColour the value of field 'graphColour'.
\r
507 public void setGraphColour(int graphColour)
\r
509 this._graphColour = graphColour;
\r
510 this._has_graphColour = true;
\r
511 } //-- void setGraphColour(int)
\r
514 * Sets the value of field 'graphGroup'.
\r
516 * @param graphGroup the value of field 'graphGroup'.
\r
518 public void setGraphGroup(int graphGroup)
\r
520 this._graphGroup = graphGroup;
\r
521 this._has_graphGroup = true;
\r
522 } //-- void setGraphGroup(int)
\r
525 * Sets the value of field 'graphType'.
\r
527 * @param graphType the value of field 'graphType'.
\r
529 public void setGraphType(int graphType)
\r
531 this._graphType = graphType;
\r
532 this._has_graphType = true;
\r
533 } //-- void setGraphType(int)
\r
536 * Sets the value of field 'label'.
\r
538 * @param label the value of field 'label'.
\r
540 public void setLabel(java.lang.String label)
\r
542 this._label = label;
\r
543 } //-- void setLabel(java.lang.String)
\r
546 * Sets the value of field 'sequenceRef'.
\r
548 * @param sequenceRef the value of field 'sequenceRef'.
\r
550 public void setSequenceRef(java.lang.String sequenceRef)
\r
552 this._sequenceRef = sequenceRef;
\r
553 } //-- void setSequenceRef(java.lang.String)
\r
556 * Sets the value of field 'thresholdLine'.
\r
558 * @param thresholdLine the value of field 'thresholdLine'.
\r
560 public void setThresholdLine(jalview.schemabinding.version2.ThresholdLine thresholdLine)
\r
562 this._thresholdLine = thresholdLine;
\r
563 } //-- void setThresholdLine(jalview.schemabinding.version2.ThresholdLine)
\r
573 public static java.lang.Object unmarshal(java.io.Reader reader)
\r
574 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
576 return (jalview.schemabinding.version2.Annotation) Unmarshaller.unmarshal(jalview.schemabinding.version2.Annotation.class, reader);
\r
577 } //-- java.lang.Object unmarshal(java.io.Reader)
\r
583 public void validate()
\r
584 throws org.exolab.castor.xml.ValidationException
\r
586 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
587 validator.validate(this);
\r
588 } //-- void validate()
\r