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 Annotation implements java.io.Serializable {
\r
25 //--------------------------/
\r
26 //- Class/Member Variables -/
\r
27 //--------------------------/
\r
32 private boolean _graph;
\r
35 * keeps track of state for field: _graph
\r
37 private boolean _has_graph;
\r
42 private int _graphType;
\r
45 * keeps track of state for field: _graphType
\r
47 private boolean _has_graphType;
\r
50 * Field _sequenceRef.
\r
52 private java.lang.String _sequenceRef;
\r
57 private java.lang.String _groupRef;
\r
60 * Field _graphColour.
\r
62 private int _graphColour;
\r
65 * keeps track of state for field: _graphColour
\r
67 private boolean _has_graphColour;
\r
70 * Field _graphGroup.
\r
72 private int _graphGroup;
\r
75 * keeps track of state for field: _graphGroup
\r
77 private boolean _has_graphGroup;
\r
82 private java.lang.String _id;
\r
87 private boolean _scoreOnly = false;
\r
90 * keeps track of state for field: _scoreOnly
\r
92 private boolean _has_scoreOnly;
\r
97 private double _score;
\r
100 * keeps track of state for field: _score
\r
102 private boolean _has_score;
\r
107 private boolean _visible;
\r
110 * keeps track of state for field: _visible
\r
112 private boolean _has_visible;
\r
115 * Field _centreColLabels.
\r
117 private boolean _centreColLabels;
\r
120 * keeps track of state for field: _centreColLabels
\r
122 private boolean _has_centreColLabels;
\r
125 * Field _scaleColLabels.
\r
127 private boolean _scaleColLabels;
\r
130 * keeps track of state for field: _scaleColLabels
\r
132 private boolean _has_scaleColLabels;
\r
135 * Field _showAllColLabels.
\r
137 private boolean _showAllColLabels;
\r
140 * keeps track of state for field: _showAllColLabels
\r
142 private boolean _has_showAllColLabels;
\r
145 * is an autocalculated annotation row
\r
147 private boolean _autoCalculated = false;
\r
150 * keeps track of state for field: _autoCalculated
\r
152 private boolean _has_autoCalculated;
\r
155 * Field _annotationElementList.
\r
157 private java.util.Vector _annotationElementList;
\r
162 private java.lang.String _label;
\r
165 * Field _description.
\r
167 private java.lang.String _description;
\r
170 * Field _thresholdLine.
\r
172 private jalview.schemabinding.version2.ThresholdLine _thresholdLine;
\r
175 //----------------/
\r
176 //- Constructors -/
\r
177 //----------------/
\r
179 public Annotation() {
\r
181 this._annotationElementList = new java.util.Vector();
\r
192 * @param vAnnotationElement
\r
193 * @throws java.lang.IndexOutOfBoundsException if the index
\r
194 * given is outside the bounds of the collection
\r
196 public void addAnnotationElement(
\r
197 final jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
\r
198 throws java.lang.IndexOutOfBoundsException {
\r
199 this._annotationElementList.addElement(vAnnotationElement);
\r
206 * @param vAnnotationElement
\r
207 * @throws java.lang.IndexOutOfBoundsException if the index
\r
208 * given is outside the bounds of the collection
\r
210 public void addAnnotationElement(
\r
212 final jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
\r
213 throws java.lang.IndexOutOfBoundsException {
\r
214 this._annotationElementList.add(index, vAnnotationElement);
\r
219 public void deleteAutoCalculated(
\r
221 this._has_autoCalculated= false;
\r
226 public void deleteCentreColLabels(
\r
228 this._has_centreColLabels= false;
\r
233 public void deleteGraph(
\r
235 this._has_graph= false;
\r
240 public void deleteGraphColour(
\r
242 this._has_graphColour= false;
\r
247 public void deleteGraphGroup(
\r
249 this._has_graphGroup= false;
\r
254 public void deleteGraphType(
\r
256 this._has_graphType= false;
\r
261 public void deleteScaleColLabels(
\r
263 this._has_scaleColLabels= false;
\r
268 public void deleteScore(
\r
270 this._has_score= false;
\r
275 public void deleteScoreOnly(
\r
277 this._has_scoreOnly= false;
\r
282 public void deleteShowAllColLabels(
\r
284 this._has_showAllColLabels= false;
\r
289 public void deleteVisible(
\r
291 this._has_visible= false;
\r
295 * Method enumerateAnnotationElement.
\r
297 * @return an Enumeration over all
\r
298 * jalview.schemabinding.version2.AnnotationElement elements
\r
300 public java.util.Enumeration enumerateAnnotationElement(
\r
302 return this._annotationElementList.elements();
\r
306 * Method getAnnotationElement.
\r
309 * @throws java.lang.IndexOutOfBoundsException if the index
\r
310 * given is outside the bounds of the collection
\r
311 * @return the value of the
\r
312 * jalview.schemabinding.version2.AnnotationElement at the
\r
315 public jalview.schemabinding.version2.AnnotationElement getAnnotationElement(
\r
317 throws java.lang.IndexOutOfBoundsException {
\r
318 // check bounds for index
\r
319 if (index < 0 || index >= this._annotationElementList.size()) {
\r
320 throw new IndexOutOfBoundsException("getAnnotationElement: Index value '" + index + "' not in range [0.." + (this._annotationElementList.size() - 1) + "]");
\r
323 return (jalview.schemabinding.version2.AnnotationElement) _annotationElementList.get(index);
\r
327 * Method getAnnotationElement.Returns the contents of the
\r
328 * collection in an Array. <p>Note: Just in case the
\r
329 * collection contents are changing in another thread, we pass
\r
330 * a 0-length Array of the correct type into the API call.
\r
331 * This way we <i>know</i> that the Array returned is of
\r
332 * exactly the correct length.
\r
334 * @return this collection as an Array
\r
336 public jalview.schemabinding.version2.AnnotationElement[] getAnnotationElement(
\r
338 jalview.schemabinding.version2.AnnotationElement[] array = new jalview.schemabinding.version2.AnnotationElement[0];
\r
339 return (jalview.schemabinding.version2.AnnotationElement[]) this._annotationElementList.toArray(array);
\r
343 * Method getAnnotationElementCount.
\r
345 * @return the size of this collection
\r
347 public int getAnnotationElementCount(
\r
349 return this._annotationElementList.size();
\r
353 * Returns the value of field 'autoCalculated'. The field
\r
354 * 'autoCalculated' has the following description: is an
\r
355 * autocalculated annotation row
\r
357 * @return the value of field 'AutoCalculated'.
\r
359 public boolean getAutoCalculated(
\r
361 return this._autoCalculated;
\r
365 * Returns the value of field 'centreColLabels'.
\r
367 * @return the value of field 'CentreColLabels'.
\r
369 public boolean getCentreColLabels(
\r
371 return this._centreColLabels;
\r
375 * Returns the value of field 'description'.
\r
377 * @return the value of field 'Description'.
\r
379 public java.lang.String getDescription(
\r
381 return this._description;
\r
385 * Returns the value of field 'graph'.
\r
387 * @return the value of field 'Graph'.
\r
389 public boolean getGraph(
\r
391 return this._graph;
\r
395 * Returns the value of field 'graphColour'.
\r
397 * @return the value of field 'GraphColour'.
\r
399 public int getGraphColour(
\r
401 return this._graphColour;
\r
405 * Returns the value of field 'graphGroup'.
\r
407 * @return the value of field 'GraphGroup'.
\r
409 public int getGraphGroup(
\r
411 return this._graphGroup;
\r
415 * Returns the value of field 'graphType'.
\r
417 * @return the value of field 'GraphType'.
\r
419 public int getGraphType(
\r
421 return this._graphType;
\r
425 * Returns the value of field 'groupRef'.
\r
427 * @return the value of field 'GroupRef'.
\r
429 public java.lang.String getGroupRef(
\r
431 return this._groupRef;
\r
435 * Returns the value of field 'id'.
\r
437 * @return the value of field 'Id'.
\r
439 public java.lang.String getId(
\r
445 * Returns the value of field 'label'.
\r
447 * @return the value of field 'Label'.
\r
449 public java.lang.String getLabel(
\r
451 return this._label;
\r
455 * Returns the value of field 'scaleColLabels'.
\r
457 * @return the value of field 'ScaleColLabels'.
\r
459 public boolean getScaleColLabels(
\r
461 return this._scaleColLabels;
\r
465 * Returns the value of field 'score'.
\r
467 * @return the value of field 'Score'.
\r
469 public double getScore(
\r
471 return this._score;
\r
475 * Returns the value of field 'scoreOnly'.
\r
477 * @return the value of field 'ScoreOnly'.
\r
479 public boolean getScoreOnly(
\r
481 return this._scoreOnly;
\r
485 * Returns the value of field 'sequenceRef'.
\r
487 * @return the value of field 'SequenceRef'.
\r
489 public java.lang.String getSequenceRef(
\r
491 return this._sequenceRef;
\r
495 * Returns the value of field 'showAllColLabels'.
\r
497 * @return the value of field 'ShowAllColLabels'.
\r
499 public boolean getShowAllColLabels(
\r
501 return this._showAllColLabels;
\r
505 * Returns the value of field 'thresholdLine'.
\r
507 * @return the value of field 'ThresholdLine'.
\r
509 public jalview.schemabinding.version2.ThresholdLine getThresholdLine(
\r
511 return this._thresholdLine;
\r
515 * Returns the value of field 'visible'.
\r
517 * @return the value of field 'Visible'.
\r
519 public boolean getVisible(
\r
521 return this._visible;
\r
525 * Method hasAutoCalculated.
\r
527 * @return true if at least one AutoCalculated has been added
\r
529 public boolean hasAutoCalculated(
\r
531 return this._has_autoCalculated;
\r
535 * Method hasCentreColLabels.
\r
537 * @return true if at least one CentreColLabels has been added
\r
539 public boolean hasCentreColLabels(
\r
541 return this._has_centreColLabels;
\r
547 * @return true if at least one Graph has been added
\r
549 public boolean hasGraph(
\r
551 return this._has_graph;
\r
555 * Method hasGraphColour.
\r
557 * @return true if at least one GraphColour has been added
\r
559 public boolean hasGraphColour(
\r
561 return this._has_graphColour;
\r
565 * Method hasGraphGroup.
\r
567 * @return true if at least one GraphGroup has been added
\r
569 public boolean hasGraphGroup(
\r
571 return this._has_graphGroup;
\r
575 * Method hasGraphType.
\r
577 * @return true if at least one GraphType has been added
\r
579 public boolean hasGraphType(
\r
581 return this._has_graphType;
\r
585 * Method hasScaleColLabels.
\r
587 * @return true if at least one ScaleColLabels has been added
\r
589 public boolean hasScaleColLabels(
\r
591 return this._has_scaleColLabels;
\r
597 * @return true if at least one Score has been added
\r
599 public boolean hasScore(
\r
601 return this._has_score;
\r
605 * Method hasScoreOnly.
\r
607 * @return true if at least one ScoreOnly has been added
\r
609 public boolean hasScoreOnly(
\r
611 return this._has_scoreOnly;
\r
615 * Method hasShowAllColLabels.
\r
617 * @return true if at least one ShowAllColLabels has been added
\r
619 public boolean hasShowAllColLabels(
\r
621 return this._has_showAllColLabels;
\r
625 * Method hasVisible.
\r
627 * @return true if at least one Visible has been added
\r
629 public boolean hasVisible(
\r
631 return this._has_visible;
\r
635 * Returns the value of field 'autoCalculated'. The field
\r
636 * 'autoCalculated' has the following description: is an
\r
637 * autocalculated annotation row
\r
639 * @return the value of field 'AutoCalculated'.
\r
641 public boolean isAutoCalculated(
\r
643 return this._autoCalculated;
\r
647 * Returns the value of field 'centreColLabels'.
\r
649 * @return the value of field 'CentreColLabels'.
\r
651 public boolean isCentreColLabels(
\r
653 return this._centreColLabels;
\r
657 * Returns the value of field 'graph'.
\r
659 * @return the value of field 'Graph'.
\r
661 public boolean isGraph(
\r
663 return this._graph;
\r
667 * Returns the value of field 'scaleColLabels'.
\r
669 * @return the value of field 'ScaleColLabels'.
\r
671 public boolean isScaleColLabels(
\r
673 return this._scaleColLabels;
\r
677 * Returns the value of field 'scoreOnly'.
\r
679 * @return the value of field 'ScoreOnly'.
\r
681 public boolean isScoreOnly(
\r
683 return this._scoreOnly;
\r
687 * Returns the value of field 'showAllColLabels'.
\r
689 * @return the value of field 'ShowAllColLabels'.
\r
691 public boolean isShowAllColLabels(
\r
693 return this._showAllColLabels;
\r
699 * @return true if this object is valid according to the schema
\r
701 public boolean isValid(
\r
705 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
712 * Returns the value of field 'visible'.
\r
714 * @return the value of field 'Visible'.
\r
716 public boolean isVisible(
\r
718 return this._visible;
\r
725 * @throws org.exolab.castor.xml.MarshalException if object is
\r
726 * null or if any SAXException is thrown during marshaling
\r
727 * @throws org.exolab.castor.xml.ValidationException if this
\r
728 * object is an invalid instance according to the schema
\r
730 public void marshal(
\r
731 final java.io.Writer out)
\r
732 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
733 Marshaller.marshal(this, out);
\r
740 * @throws java.io.IOException if an IOException occurs during
\r
742 * @throws org.exolab.castor.xml.ValidationException if this
\r
743 * object is an invalid instance according to the schema
\r
744 * @throws org.exolab.castor.xml.MarshalException if object is
\r
745 * null or if any SAXException is thrown during marshaling
\r
747 public void marshal(
\r
748 final org.xml.sax.ContentHandler handler)
\r
749 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
750 Marshaller.marshal(this, handler);
\r
755 public void removeAllAnnotationElement(
\r
757 this._annotationElementList.clear();
\r
761 * Method removeAnnotationElement.
\r
763 * @param vAnnotationElement
\r
764 * @return true if the object was removed from the collection.
\r
766 public boolean removeAnnotationElement(
\r
767 final jalview.schemabinding.version2.AnnotationElement vAnnotationElement) {
\r
768 boolean removed = _annotationElementList.remove(vAnnotationElement);
\r
773 * Method removeAnnotationElementAt.
\r
776 * @return the element removed from the collection
\r
778 public jalview.schemabinding.version2.AnnotationElement removeAnnotationElementAt(
\r
780 java.lang.Object obj = this._annotationElementList.remove(index);
\r
781 return (jalview.schemabinding.version2.AnnotationElement) obj;
\r
788 * @param vAnnotationElement
\r
789 * @throws java.lang.IndexOutOfBoundsException if the index
\r
790 * given is outside the bounds of the collection
\r
792 public void setAnnotationElement(
\r
794 final jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
\r
795 throws java.lang.IndexOutOfBoundsException {
\r
796 // check bounds for index
\r
797 if (index < 0 || index >= this._annotationElementList.size()) {
\r
798 throw new IndexOutOfBoundsException("setAnnotationElement: Index value '" + index + "' not in range [0.." + (this._annotationElementList.size() - 1) + "]");
\r
801 this._annotationElementList.set(index, vAnnotationElement);
\r
807 * @param vAnnotationElementArray
\r
809 public void setAnnotationElement(
\r
810 final jalview.schemabinding.version2.AnnotationElement[] vAnnotationElementArray) {
\r
812 _annotationElementList.clear();
\r
814 for (int i = 0; i < vAnnotationElementArray.length; i++) {
\r
815 this._annotationElementList.add(vAnnotationElementArray[i]);
\r
820 * Sets the value of field 'autoCalculated'. The field
\r
821 * 'autoCalculated' has the following description: is an
\r
822 * autocalculated annotation row
\r
824 * @param autoCalculated the value of field 'autoCalculated'.
\r
826 public void setAutoCalculated(
\r
827 final boolean autoCalculated) {
\r
828 this._autoCalculated = autoCalculated;
\r
829 this._has_autoCalculated = true;
\r
833 * Sets the value of field 'centreColLabels'.
\r
835 * @param centreColLabels the value of field 'centreColLabels'.
\r
837 public void setCentreColLabels(
\r
838 final boolean centreColLabels) {
\r
839 this._centreColLabels = centreColLabels;
\r
840 this._has_centreColLabels = true;
\r
844 * Sets the value of field 'description'.
\r
846 * @param description the value of field 'description'.
\r
848 public void setDescription(
\r
849 final java.lang.String description) {
\r
850 this._description = description;
\r
854 * Sets the value of field 'graph'.
\r
856 * @param graph the value of field 'graph'.
\r
858 public void setGraph(
\r
859 final boolean graph) {
\r
860 this._graph = graph;
\r
861 this._has_graph = true;
\r
865 * Sets the value of field 'graphColour'.
\r
867 * @param graphColour the value of field 'graphColour'.
\r
869 public void setGraphColour(
\r
870 final int graphColour) {
\r
871 this._graphColour = graphColour;
\r
872 this._has_graphColour = true;
\r
876 * Sets the value of field 'graphGroup'.
\r
878 * @param graphGroup the value of field 'graphGroup'.
\r
880 public void setGraphGroup(
\r
881 final int graphGroup) {
\r
882 this._graphGroup = graphGroup;
\r
883 this._has_graphGroup = true;
\r
887 * Sets the value of field 'graphType'.
\r
889 * @param graphType the value of field 'graphType'.
\r
891 public void setGraphType(
\r
892 final int graphType) {
\r
893 this._graphType = graphType;
\r
894 this._has_graphType = true;
\r
898 * Sets the value of field 'groupRef'.
\r
900 * @param groupRef the value of field 'groupRef'.
\r
902 public void setGroupRef(
\r
903 final java.lang.String groupRef) {
\r
904 this._groupRef = groupRef;
\r
908 * Sets the value of field 'id'.
\r
910 * @param id the value of field 'id'.
\r
913 final java.lang.String id) {
\r
918 * Sets the value of field 'label'.
\r
920 * @param label the value of field 'label'.
\r
922 public void setLabel(
\r
923 final java.lang.String label) {
\r
924 this._label = label;
\r
928 * Sets the value of field 'scaleColLabels'.
\r
930 * @param scaleColLabels the value of field 'scaleColLabels'.
\r
932 public void setScaleColLabels(
\r
933 final boolean scaleColLabels) {
\r
934 this._scaleColLabels = scaleColLabels;
\r
935 this._has_scaleColLabels = true;
\r
939 * Sets the value of field 'score'.
\r
941 * @param score the value of field 'score'.
\r
943 public void setScore(
\r
944 final double score) {
\r
945 this._score = score;
\r
946 this._has_score = true;
\r
950 * Sets the value of field 'scoreOnly'.
\r
952 * @param scoreOnly the value of field 'scoreOnly'.
\r
954 public void setScoreOnly(
\r
955 final boolean scoreOnly) {
\r
956 this._scoreOnly = scoreOnly;
\r
957 this._has_scoreOnly = true;
\r
961 * Sets the value of field 'sequenceRef'.
\r
963 * @param sequenceRef the value of field 'sequenceRef'.
\r
965 public void setSequenceRef(
\r
966 final java.lang.String sequenceRef) {
\r
967 this._sequenceRef = sequenceRef;
\r
971 * Sets the value of field 'showAllColLabels'.
\r
973 * @param showAllColLabels the value of field 'showAllColLabels'
\r
975 public void setShowAllColLabels(
\r
976 final boolean showAllColLabels) {
\r
977 this._showAllColLabels = showAllColLabels;
\r
978 this._has_showAllColLabels = true;
\r
982 * Sets the value of field 'thresholdLine'.
\r
984 * @param thresholdLine the value of field 'thresholdLine'.
\r
986 public void setThresholdLine(
\r
987 final jalview.schemabinding.version2.ThresholdLine thresholdLine) {
\r
988 this._thresholdLine = thresholdLine;
\r
992 * Sets the value of field 'visible'.
\r
994 * @param visible the value of field 'visible'.
\r
996 public void setVisible(
\r
997 final boolean visible) {
\r
998 this._visible = visible;
\r
999 this._has_visible = true;
\r
1003 * Method unmarshal.
\r
1006 * @throws org.exolab.castor.xml.MarshalException if object is
\r
1007 * null or if any SAXException is thrown during marshaling
\r
1008 * @throws org.exolab.castor.xml.ValidationException if this
\r
1009 * object is an invalid instance according to the schema
\r
1010 * @return the unmarshaled
\r
1011 * jalview.schemabinding.version2.Annotation
\r
1013 public static jalview.schemabinding.version2.Annotation unmarshal(
\r
1014 final java.io.Reader reader)
\r
1015 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
1016 return (jalview.schemabinding.version2.Annotation) Unmarshaller.unmarshal(jalview.schemabinding.version2.Annotation.class, reader);
\r
1022 * @throws org.exolab.castor.xml.ValidationException if this
\r
1023 * object is an invalid instance according to the schema
\r
1025 public void validate(
\r
1027 throws org.exolab.castor.xml.ValidationException {
\r
1028 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
1029 validator.validate(this);
\r