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
86 private java.lang.String _id;
\r
91 private boolean _scoreOnly = false;
\r
94 * keeps track of state for field: _scoreOnly
\r
96 private boolean _has_scoreOnly;
\r
101 private double _score;
\r
104 * keeps track of state for field: _score
\r
106 private boolean _has_score;
\r
109 * Field _annotationElementList
\r
111 private java.util.Vector _annotationElementList;
\r
116 private java.lang.String _label;
\r
119 * Field _description
\r
121 private java.lang.String _description;
\r
124 * Field _thresholdLine
\r
126 private jalview.schemabinding.version2.ThresholdLine _thresholdLine;
\r
129 //----------------/
\r
130 //- Constructors -/
\r
131 //----------------/
\r
133 public Annotation() {
\r
135 _annotationElementList = new Vector();
\r
136 } //-- jalview.schemabinding.version2.Annotation()
\r
144 * Method addAnnotationElement
\r
148 * @param vAnnotationElement
\r
150 public void addAnnotationElement(jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
\r
151 throws java.lang.IndexOutOfBoundsException
\r
153 _annotationElementList.addElement(vAnnotationElement);
\r
154 } //-- void addAnnotationElement(jalview.schemabinding.version2.AnnotationElement)
\r
157 * Method addAnnotationElement
\r
162 * @param vAnnotationElement
\r
164 public void addAnnotationElement(int index, jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
\r
165 throws java.lang.IndexOutOfBoundsException
\r
167 _annotationElementList.insertElementAt(vAnnotationElement, index);
\r
168 } //-- void addAnnotationElement(int, jalview.schemabinding.version2.AnnotationElement)
\r
171 * Method deleteGraph
\r
174 public void deleteGraph()
\r
176 this._has_graph= false;
\r
177 } //-- void deleteGraph()
\r
180 * Method deleteGraphColour
\r
183 public void deleteGraphColour()
\r
185 this._has_graphColour= false;
\r
186 } //-- void deleteGraphColour()
\r
189 * Method deleteGraphGroup
\r
192 public void deleteGraphGroup()
\r
194 this._has_graphGroup= false;
\r
195 } //-- void deleteGraphGroup()
\r
198 * Method deleteGraphType
\r
201 public void deleteGraphType()
\r
203 this._has_graphType= false;
\r
204 } //-- void deleteGraphType()
\r
207 * Method deleteScore
\r
210 public void deleteScore()
\r
212 this._has_score= false;
\r
213 } //-- void deleteScore()
\r
216 * Method deleteScoreOnly
\r
219 public void deleteScoreOnly()
\r
221 this._has_scoreOnly= false;
\r
222 } //-- void deleteScoreOnly()
\r
225 * Method enumerateAnnotationElement
\r
229 * @return Enumeration
\r
231 public java.util.Enumeration enumerateAnnotationElement()
\r
233 return _annotationElementList.elements();
\r
234 } //-- java.util.Enumeration enumerateAnnotationElement()
\r
237 * Method getAnnotationElement
\r
242 * @return AnnotationElement
\r
244 public jalview.schemabinding.version2.AnnotationElement getAnnotationElement(int index)
\r
245 throws java.lang.IndexOutOfBoundsException
\r
247 //-- check bounds for index
\r
248 if ((index < 0) || (index > _annotationElementList.size())) {
\r
249 throw new IndexOutOfBoundsException();
\r
252 return (jalview.schemabinding.version2.AnnotationElement) _annotationElementList.elementAt(index);
\r
253 } //-- jalview.schemabinding.version2.AnnotationElement getAnnotationElement(int)
\r
256 * Method getAnnotationElement
\r
260 * @return AnnotationElement
\r
262 public jalview.schemabinding.version2.AnnotationElement[] getAnnotationElement()
\r
264 int size = _annotationElementList.size();
\r
265 jalview.schemabinding.version2.AnnotationElement[] mArray = new jalview.schemabinding.version2.AnnotationElement[size];
\r
266 for (int index = 0; index < size; index++) {
\r
267 mArray[index] = (jalview.schemabinding.version2.AnnotationElement) _annotationElementList.elementAt(index);
\r
270 } //-- jalview.schemabinding.version2.AnnotationElement[] getAnnotationElement()
\r
273 * Method getAnnotationElementCount
\r
279 public int getAnnotationElementCount()
\r
281 return _annotationElementList.size();
\r
282 } //-- int getAnnotationElementCount()
\r
285 * Returns the value of field 'description'.
\r
288 * @return the value of field 'description'.
\r
290 public java.lang.String getDescription()
\r
292 return this._description;
\r
293 } //-- java.lang.String getDescription()
\r
296 * Returns the value of field 'graph'.
\r
299 * @return the value of field 'graph'.
\r
301 public boolean getGraph()
\r
303 return this._graph;
\r
304 } //-- boolean getGraph()
\r
307 * Returns the value of field 'graphColour'.
\r
310 * @return the value of field 'graphColour'.
\r
312 public int getGraphColour()
\r
314 return this._graphColour;
\r
315 } //-- int getGraphColour()
\r
318 * Returns the value of field 'graphGroup'.
\r
321 * @return the value of field 'graphGroup'.
\r
323 public int getGraphGroup()
\r
325 return this._graphGroup;
\r
326 } //-- int getGraphGroup()
\r
329 * Returns the value of field 'graphType'.
\r
332 * @return the value of field 'graphType'.
\r
334 public int getGraphType()
\r
336 return this._graphType;
\r
337 } //-- int getGraphType()
\r
340 * Returns the value of field 'id'.
\r
343 * @return the value of field 'id'.
\r
345 public java.lang.String getId()
\r
348 } //-- java.lang.String getId()
\r
351 * Returns the value of field 'label'.
\r
354 * @return the value of field 'label'.
\r
356 public java.lang.String getLabel()
\r
358 return this._label;
\r
359 } //-- java.lang.String getLabel()
\r
362 * Returns the value of field 'score'.
\r
365 * @return the value of field 'score'.
\r
367 public double getScore()
\r
369 return this._score;
\r
370 } //-- double getScore()
\r
373 * Returns the value of field 'scoreOnly'.
\r
376 * @return the value of field 'scoreOnly'.
\r
378 public boolean getScoreOnly()
\r
380 return this._scoreOnly;
\r
381 } //-- boolean getScoreOnly()
\r
384 * Returns the value of field 'sequenceRef'.
\r
387 * @return the value of field 'sequenceRef'.
\r
389 public java.lang.String getSequenceRef()
\r
391 return this._sequenceRef;
\r
392 } //-- java.lang.String getSequenceRef()
\r
395 * Returns the value of field 'thresholdLine'.
\r
397 * @return ThresholdLine
\r
398 * @return the value of field 'thresholdLine'.
\r
400 public jalview.schemabinding.version2.ThresholdLine getThresholdLine()
\r
402 return this._thresholdLine;
\r
403 } //-- jalview.schemabinding.version2.ThresholdLine getThresholdLine()
\r
412 public boolean hasGraph()
\r
414 return this._has_graph;
\r
415 } //-- boolean hasGraph()
\r
418 * Method hasGraphColour
\r
424 public boolean hasGraphColour()
\r
426 return this._has_graphColour;
\r
427 } //-- boolean hasGraphColour()
\r
430 * Method hasGraphGroup
\r
436 public boolean hasGraphGroup()
\r
438 return this._has_graphGroup;
\r
439 } //-- boolean hasGraphGroup()
\r
442 * Method hasGraphType
\r
448 public boolean hasGraphType()
\r
450 return this._has_graphType;
\r
451 } //-- boolean hasGraphType()
\r
460 public boolean hasScore()
\r
462 return this._has_score;
\r
463 } //-- boolean hasScore()
\r
466 * Method hasScoreOnly
\r
472 public boolean hasScoreOnly()
\r
474 return this._has_scoreOnly;
\r
475 } //-- boolean hasScoreOnly()
\r
484 public boolean isValid()
\r
489 catch (org.exolab.castor.xml.ValidationException vex) {
\r
493 } //-- boolean isValid()
\r
502 public void marshal(java.io.Writer out)
\r
503 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
506 Marshaller.marshal(this, out);
\r
507 } //-- void marshal(java.io.Writer)
\r
516 public void marshal(org.xml.sax.ContentHandler handler)
\r
517 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
520 Marshaller.marshal(this, handler);
\r
521 } //-- void marshal(org.xml.sax.ContentHandler)
\r
524 * Method removeAllAnnotationElement
\r
527 public void removeAllAnnotationElement()
\r
529 _annotationElementList.removeAllElements();
\r
530 } //-- void removeAllAnnotationElement()
\r
533 * Method removeAnnotationElement
\r
538 * @return AnnotationElement
\r
540 public jalview.schemabinding.version2.AnnotationElement removeAnnotationElement(int index)
\r
542 java.lang.Object obj = _annotationElementList.elementAt(index);
\r
543 _annotationElementList.removeElementAt(index);
\r
544 return (jalview.schemabinding.version2.AnnotationElement) obj;
\r
545 } //-- jalview.schemabinding.version2.AnnotationElement removeAnnotationElement(int)
\r
548 * Method setAnnotationElement
\r
553 * @param vAnnotationElement
\r
555 public void setAnnotationElement(int index, jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
\r
556 throws java.lang.IndexOutOfBoundsException
\r
558 //-- check bounds for index
\r
559 if ((index < 0) || (index > _annotationElementList.size())) {
\r
560 throw new IndexOutOfBoundsException();
\r
562 _annotationElementList.setElementAt(vAnnotationElement, index);
\r
563 } //-- void setAnnotationElement(int, jalview.schemabinding.version2.AnnotationElement)
\r
566 * Method setAnnotationElement
\r
570 * @param annotationElementArray
\r
572 public void setAnnotationElement(jalview.schemabinding.version2.AnnotationElement[] annotationElementArray)
\r
575 _annotationElementList.removeAllElements();
\r
576 for (int i = 0; i < annotationElementArray.length; i++) {
\r
577 _annotationElementList.addElement(annotationElementArray[i]);
\r
579 } //-- void setAnnotationElement(jalview.schemabinding.version2.AnnotationElement)
\r
582 * Sets the value of field 'description'.
\r
584 * @param description the value of field 'description'.
\r
586 public void setDescription(java.lang.String description)
\r
588 this._description = description;
\r
589 } //-- void setDescription(java.lang.String)
\r
592 * Sets the value of field 'graph'.
\r
594 * @param graph the value of field 'graph'.
\r
596 public void setGraph(boolean graph)
\r
598 this._graph = graph;
\r
599 this._has_graph = true;
\r
600 } //-- void setGraph(boolean)
\r
603 * Sets the value of field 'graphColour'.
\r
605 * @param graphColour the value of field 'graphColour'.
\r
607 public void setGraphColour(int graphColour)
\r
609 this._graphColour = graphColour;
\r
610 this._has_graphColour = true;
\r
611 } //-- void setGraphColour(int)
\r
614 * Sets the value of field 'graphGroup'.
\r
616 * @param graphGroup the value of field 'graphGroup'.
\r
618 public void setGraphGroup(int graphGroup)
\r
620 this._graphGroup = graphGroup;
\r
621 this._has_graphGroup = true;
\r
622 } //-- void setGraphGroup(int)
\r
625 * Sets the value of field 'graphType'.
\r
627 * @param graphType the value of field 'graphType'.
\r
629 public void setGraphType(int graphType)
\r
631 this._graphType = graphType;
\r
632 this._has_graphType = true;
\r
633 } //-- void setGraphType(int)
\r
636 * Sets the value of field 'id'.
\r
638 * @param id the value of field 'id'.
\r
640 public void setId(java.lang.String id)
\r
643 } //-- void setId(java.lang.String)
\r
646 * Sets the value of field 'label'.
\r
648 * @param label the value of field 'label'.
\r
650 public void setLabel(java.lang.String label)
\r
652 this._label = label;
\r
653 } //-- void setLabel(java.lang.String)
\r
656 * Sets the value of field 'score'.
\r
658 * @param score the value of field 'score'.
\r
660 public void setScore(double score)
\r
662 this._score = score;
\r
663 this._has_score = true;
\r
664 } //-- void setScore(double)
\r
667 * Sets the value of field 'scoreOnly'.
\r
669 * @param scoreOnly the value of field 'scoreOnly'.
\r
671 public void setScoreOnly(boolean scoreOnly)
\r
673 this._scoreOnly = scoreOnly;
\r
674 this._has_scoreOnly = true;
\r
675 } //-- void setScoreOnly(boolean)
\r
678 * Sets the value of field 'sequenceRef'.
\r
680 * @param sequenceRef the value of field 'sequenceRef'.
\r
682 public void setSequenceRef(java.lang.String sequenceRef)
\r
684 this._sequenceRef = sequenceRef;
\r
685 } //-- void setSequenceRef(java.lang.String)
\r
688 * Sets the value of field 'thresholdLine'.
\r
690 * @param thresholdLine the value of field 'thresholdLine'.
\r
692 public void setThresholdLine(jalview.schemabinding.version2.ThresholdLine thresholdLine)
\r
694 this._thresholdLine = thresholdLine;
\r
695 } //-- void setThresholdLine(jalview.schemabinding.version2.ThresholdLine)
\r
705 public static java.lang.Object unmarshal(java.io.Reader reader)
\r
706 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
708 return (jalview.schemabinding.version2.Annotation) Unmarshaller.unmarshal(jalview.schemabinding.version2.Annotation.class, reader);
\r
709 } //-- java.lang.Object unmarshal(java.io.Reader)
\r
715 public void validate()
\r
716 throws org.exolab.castor.xml.ValidationException
\r
718 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
719 validator.validate(this);
\r
720 } //-- void validate()
\r