extend XML model for graduated feature colours, group associated manual/auto annotati...
[jalview.git] / src / jalview / schemabinding / version2 / Annotation.java
1 /*\r
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1)\r
3  * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
4  * \r
5  * This program is free software; you can redistribute it and/or\r
6  * modify it under the terms of the GNU General Public License\r
7  * as published by the Free Software Foundation; either version 2\r
8  * of the License, or (at your option) any later version.\r
9  * \r
10  * This program is distributed in the hope that it will be useful,\r
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
13  * GNU General Public License for more details.\r
14  * \r
15  * You should have received a copy of the GNU General Public License\r
16  * along with this program; if not, write to the Free Software\r
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
18  */\r
19 package jalview.schemabinding.version2;\r
20 \r
21   //---------------------------------/\r
22  //- Imported classes and packages -/\r
23 //---------------------------------/\r
24 \r
25 import org.exolab.castor.xml.Marshaller;\r
26 import org.exolab.castor.xml.Unmarshaller;\r
27 \r
28 /**\r
29  * Class Annotation.\r
30  * \r
31  * @version $Revision$ $Date$\r
32  */\r
33 public class Annotation implements java.io.Serializable {\r
34 \r
35 \r
36       //--------------------------/\r
37      //- Class/Member Variables -/\r
38     //--------------------------/\r
39 \r
40     /**\r
41      * Field _graph.\r
42      */\r
43     private boolean _graph;\r
44 \r
45     /**\r
46      * keeps track of state for field: _graph\r
47      */\r
48     private boolean _has_graph;\r
49 \r
50     /**\r
51      * Field _graphType.\r
52      */\r
53     private int _graphType;\r
54 \r
55     /**\r
56      * keeps track of state for field: _graphType\r
57      */\r
58     private boolean _has_graphType;\r
59 \r
60     /**\r
61      * Field _sequenceRef.\r
62      */\r
63     private java.lang.String _sequenceRef;\r
64 \r
65     /**\r
66      * Field _groupRef.\r
67      */\r
68     private java.lang.String _groupRef;\r
69 \r
70     /**\r
71      * Field _graphColour.\r
72      */\r
73     private int _graphColour;\r
74 \r
75     /**\r
76      * keeps track of state for field: _graphColour\r
77      */\r
78     private boolean _has_graphColour;\r
79 \r
80     /**\r
81      * Field _graphGroup.\r
82      */\r
83     private int _graphGroup;\r
84 \r
85     /**\r
86      * keeps track of state for field: _graphGroup\r
87      */\r
88     private boolean _has_graphGroup;\r
89 \r
90     /**\r
91      * Field _id.\r
92      */\r
93     private java.lang.String _id;\r
94 \r
95     /**\r
96      * Field _scoreOnly.\r
97      */\r
98     private boolean _scoreOnly = false;\r
99 \r
100     /**\r
101      * keeps track of state for field: _scoreOnly\r
102      */\r
103     private boolean _has_scoreOnly;\r
104 \r
105     /**\r
106      * Field _score.\r
107      */\r
108     private double _score;\r
109 \r
110     /**\r
111      * keeps track of state for field: _score\r
112      */\r
113     private boolean _has_score;\r
114 \r
115     /**\r
116      * Field _visible.\r
117      */\r
118     private boolean _visible;\r
119 \r
120     /**\r
121      * keeps track of state for field: _visible\r
122      */\r
123     private boolean _has_visible;\r
124 \r
125     /**\r
126      * Field _centreColLabels.\r
127      */\r
128     private boolean _centreColLabels;\r
129 \r
130     /**\r
131      * keeps track of state for field: _centreColLabels\r
132      */\r
133     private boolean _has_centreColLabels;\r
134 \r
135     /**\r
136      * Field _scaleColLabels.\r
137      */\r
138     private boolean _scaleColLabels;\r
139 \r
140     /**\r
141      * keeps track of state for field: _scaleColLabels\r
142      */\r
143     private boolean _has_scaleColLabels;\r
144 \r
145     /**\r
146      * Field _showAllColLabels.\r
147      */\r
148     private boolean _showAllColLabels;\r
149 \r
150     /**\r
151      * keeps track of state for field: _showAllColLabels\r
152      */\r
153     private boolean _has_showAllColLabels;\r
154 \r
155     /**\r
156      * is an autocalculated annotation row\r
157      */\r
158     private boolean _autoCalculated = false;\r
159 \r
160     /**\r
161      * keeps track of state for field: _autoCalculated\r
162      */\r
163     private boolean _has_autoCalculated;\r
164 \r
165     /**\r
166      * Field _annotationElementList.\r
167      */\r
168     private java.util.Vector _annotationElementList;\r
169 \r
170     /**\r
171      * Field _label.\r
172      */\r
173     private java.lang.String _label;\r
174 \r
175     /**\r
176      * Field _description.\r
177      */\r
178     private java.lang.String _description;\r
179 \r
180     /**\r
181      * Field _thresholdLine.\r
182      */\r
183     private jalview.schemabinding.version2.ThresholdLine _thresholdLine;\r
184 \r
185 \r
186       //----------------/\r
187      //- Constructors -/\r
188     //----------------/\r
189 \r
190     public Annotation() {\r
191         super();\r
192         this._annotationElementList = new java.util.Vector();\r
193     }\r
194 \r
195 \r
196       //-----------/\r
197      //- Methods -/\r
198     //-----------/\r
199 \r
200     /**\r
201      * \r
202      * \r
203      * @param vAnnotationElement\r
204      * @throws java.lang.IndexOutOfBoundsException if the index\r
205      * given is outside the bounds of the collection\r
206      */\r
207     public void addAnnotationElement(\r
208             final jalview.schemabinding.version2.AnnotationElement vAnnotationElement)\r
209     throws java.lang.IndexOutOfBoundsException {\r
210         this._annotationElementList.addElement(vAnnotationElement);\r
211     }\r
212 \r
213     /**\r
214      * \r
215      * \r
216      * @param index\r
217      * @param vAnnotationElement\r
218      * @throws java.lang.IndexOutOfBoundsException if the index\r
219      * given is outside the bounds of the collection\r
220      */\r
221     public void addAnnotationElement(\r
222             final int index,\r
223             final jalview.schemabinding.version2.AnnotationElement vAnnotationElement)\r
224     throws java.lang.IndexOutOfBoundsException {\r
225         this._annotationElementList.add(index, vAnnotationElement);\r
226     }\r
227 \r
228     /**\r
229      */\r
230     public void deleteAutoCalculated(\r
231     ) {\r
232         this._has_autoCalculated= false;\r
233     }\r
234 \r
235     /**\r
236      */\r
237     public void deleteCentreColLabels(\r
238     ) {\r
239         this._has_centreColLabels= false;\r
240     }\r
241 \r
242     /**\r
243      */\r
244     public void deleteGraph(\r
245     ) {\r
246         this._has_graph= false;\r
247     }\r
248 \r
249     /**\r
250      */\r
251     public void deleteGraphColour(\r
252     ) {\r
253         this._has_graphColour= false;\r
254     }\r
255 \r
256     /**\r
257      */\r
258     public void deleteGraphGroup(\r
259     ) {\r
260         this._has_graphGroup= false;\r
261     }\r
262 \r
263     /**\r
264      */\r
265     public void deleteGraphType(\r
266     ) {\r
267         this._has_graphType= false;\r
268     }\r
269 \r
270     /**\r
271      */\r
272     public void deleteScaleColLabels(\r
273     ) {\r
274         this._has_scaleColLabels= false;\r
275     }\r
276 \r
277     /**\r
278      */\r
279     public void deleteScore(\r
280     ) {\r
281         this._has_score= false;\r
282     }\r
283 \r
284     /**\r
285      */\r
286     public void deleteScoreOnly(\r
287     ) {\r
288         this._has_scoreOnly= false;\r
289     }\r
290 \r
291     /**\r
292      */\r
293     public void deleteShowAllColLabels(\r
294     ) {\r
295         this._has_showAllColLabels= false;\r
296     }\r
297 \r
298     /**\r
299      */\r
300     public void deleteVisible(\r
301     ) {\r
302         this._has_visible= false;\r
303     }\r
304 \r
305     /**\r
306      * Method enumerateAnnotationElement.\r
307      * \r
308      * @return an Enumeration over all\r
309      * jalview.schemabinding.version2.AnnotationElement elements\r
310      */\r
311     public java.util.Enumeration enumerateAnnotationElement(\r
312     ) {\r
313         return this._annotationElementList.elements();\r
314     }\r
315 \r
316     /**\r
317      * Method getAnnotationElement.\r
318      * \r
319      * @param index\r
320      * @throws java.lang.IndexOutOfBoundsException if the index\r
321      * given is outside the bounds of the collection\r
322      * @return the value of the\r
323      * jalview.schemabinding.version2.AnnotationElement at the\r
324      * given index\r
325      */\r
326     public jalview.schemabinding.version2.AnnotationElement getAnnotationElement(\r
327             final int index)\r
328     throws java.lang.IndexOutOfBoundsException {\r
329         // check bounds for index\r
330         if (index < 0 || index >= this._annotationElementList.size()) {\r
331             throw new IndexOutOfBoundsException("getAnnotationElement: Index value '" + index + "' not in range [0.." + (this._annotationElementList.size() - 1) + "]");\r
332         }\r
333         \r
334         return (jalview.schemabinding.version2.AnnotationElement) _annotationElementList.get(index);\r
335     }\r
336 \r
337     /**\r
338      * Method getAnnotationElement.Returns the contents of the\r
339      * collection in an Array.  <p>Note:  Just in case the\r
340      * collection contents are changing in another thread, we pass\r
341      * a 0-length Array of the correct type into the API call. \r
342      * This way we <i>know</i> that the Array returned is of\r
343      * exactly the correct length.\r
344      * \r
345      * @return this collection as an Array\r
346      */\r
347     public jalview.schemabinding.version2.AnnotationElement[] getAnnotationElement(\r
348     ) {\r
349         jalview.schemabinding.version2.AnnotationElement[] array = new jalview.schemabinding.version2.AnnotationElement[0];\r
350         return (jalview.schemabinding.version2.AnnotationElement[]) this._annotationElementList.toArray(array);\r
351     }\r
352 \r
353     /**\r
354      * Method getAnnotationElementCount.\r
355      * \r
356      * @return the size of this collection\r
357      */\r
358     public int getAnnotationElementCount(\r
359     ) {\r
360         return this._annotationElementList.size();\r
361     }\r
362 \r
363     /**\r
364      * Returns the value of field 'autoCalculated'. The field\r
365      * 'autoCalculated' has the following description: is an\r
366      * autocalculated annotation row\r
367      * \r
368      * @return the value of field 'AutoCalculated'.\r
369      */\r
370     public boolean getAutoCalculated(\r
371     ) {\r
372         return this._autoCalculated;\r
373     }\r
374 \r
375     /**\r
376      * Returns the value of field 'centreColLabels'.\r
377      * \r
378      * @return the value of field 'CentreColLabels'.\r
379      */\r
380     public boolean getCentreColLabels(\r
381     ) {\r
382         return this._centreColLabels;\r
383     }\r
384 \r
385     /**\r
386      * Returns the value of field 'description'.\r
387      * \r
388      * @return the value of field 'Description'.\r
389      */\r
390     public java.lang.String getDescription(\r
391     ) {\r
392         return this._description;\r
393     }\r
394 \r
395     /**\r
396      * Returns the value of field 'graph'.\r
397      * \r
398      * @return the value of field 'Graph'.\r
399      */\r
400     public boolean getGraph(\r
401     ) {\r
402         return this._graph;\r
403     }\r
404 \r
405     /**\r
406      * Returns the value of field 'graphColour'.\r
407      * \r
408      * @return the value of field 'GraphColour'.\r
409      */\r
410     public int getGraphColour(\r
411     ) {\r
412         return this._graphColour;\r
413     }\r
414 \r
415     /**\r
416      * Returns the value of field 'graphGroup'.\r
417      * \r
418      * @return the value of field 'GraphGroup'.\r
419      */\r
420     public int getGraphGroup(\r
421     ) {\r
422         return this._graphGroup;\r
423     }\r
424 \r
425     /**\r
426      * Returns the value of field 'graphType'.\r
427      * \r
428      * @return the value of field 'GraphType'.\r
429      */\r
430     public int getGraphType(\r
431     ) {\r
432         return this._graphType;\r
433     }\r
434 \r
435     /**\r
436      * Returns the value of field 'groupRef'.\r
437      * \r
438      * @return the value of field 'GroupRef'.\r
439      */\r
440     public java.lang.String getGroupRef(\r
441     ) {\r
442         return this._groupRef;\r
443     }\r
444 \r
445     /**\r
446      * Returns the value of field 'id'.\r
447      * \r
448      * @return the value of field 'Id'.\r
449      */\r
450     public java.lang.String getId(\r
451     ) {\r
452         return this._id;\r
453     }\r
454 \r
455     /**\r
456      * Returns the value of field 'label'.\r
457      * \r
458      * @return the value of field 'Label'.\r
459      */\r
460     public java.lang.String getLabel(\r
461     ) {\r
462         return this._label;\r
463     }\r
464 \r
465     /**\r
466      * Returns the value of field 'scaleColLabels'.\r
467      * \r
468      * @return the value of field 'ScaleColLabels'.\r
469      */\r
470     public boolean getScaleColLabels(\r
471     ) {\r
472         return this._scaleColLabels;\r
473     }\r
474 \r
475     /**\r
476      * Returns the value of field 'score'.\r
477      * \r
478      * @return the value of field 'Score'.\r
479      */\r
480     public double getScore(\r
481     ) {\r
482         return this._score;\r
483     }\r
484 \r
485     /**\r
486      * Returns the value of field 'scoreOnly'.\r
487      * \r
488      * @return the value of field 'ScoreOnly'.\r
489      */\r
490     public boolean getScoreOnly(\r
491     ) {\r
492         return this._scoreOnly;\r
493     }\r
494 \r
495     /**\r
496      * Returns the value of field 'sequenceRef'.\r
497      * \r
498      * @return the value of field 'SequenceRef'.\r
499      */\r
500     public java.lang.String getSequenceRef(\r
501     ) {\r
502         return this._sequenceRef;\r
503     }\r
504 \r
505     /**\r
506      * Returns the value of field 'showAllColLabels'.\r
507      * \r
508      * @return the value of field 'ShowAllColLabels'.\r
509      */\r
510     public boolean getShowAllColLabels(\r
511     ) {\r
512         return this._showAllColLabels;\r
513     }\r
514 \r
515     /**\r
516      * Returns the value of field 'thresholdLine'.\r
517      * \r
518      * @return the value of field 'ThresholdLine'.\r
519      */\r
520     public jalview.schemabinding.version2.ThresholdLine getThresholdLine(\r
521     ) {\r
522         return this._thresholdLine;\r
523     }\r
524 \r
525     /**\r
526      * Returns the value of field 'visible'.\r
527      * \r
528      * @return the value of field 'Visible'.\r
529      */\r
530     public boolean getVisible(\r
531     ) {\r
532         return this._visible;\r
533     }\r
534 \r
535     /**\r
536      * Method hasAutoCalculated.\r
537      * \r
538      * @return true if at least one AutoCalculated has been added\r
539      */\r
540     public boolean hasAutoCalculated(\r
541     ) {\r
542         return this._has_autoCalculated;\r
543     }\r
544 \r
545     /**\r
546      * Method hasCentreColLabels.\r
547      * \r
548      * @return true if at least one CentreColLabels has been added\r
549      */\r
550     public boolean hasCentreColLabels(\r
551     ) {\r
552         return this._has_centreColLabels;\r
553     }\r
554 \r
555     /**\r
556      * Method hasGraph.\r
557      * \r
558      * @return true if at least one Graph has been added\r
559      */\r
560     public boolean hasGraph(\r
561     ) {\r
562         return this._has_graph;\r
563     }\r
564 \r
565     /**\r
566      * Method hasGraphColour.\r
567      * \r
568      * @return true if at least one GraphColour has been added\r
569      */\r
570     public boolean hasGraphColour(\r
571     ) {\r
572         return this._has_graphColour;\r
573     }\r
574 \r
575     /**\r
576      * Method hasGraphGroup.\r
577      * \r
578      * @return true if at least one GraphGroup has been added\r
579      */\r
580     public boolean hasGraphGroup(\r
581     ) {\r
582         return this._has_graphGroup;\r
583     }\r
584 \r
585     /**\r
586      * Method hasGraphType.\r
587      * \r
588      * @return true if at least one GraphType has been added\r
589      */\r
590     public boolean hasGraphType(\r
591     ) {\r
592         return this._has_graphType;\r
593     }\r
594 \r
595     /**\r
596      * Method hasScaleColLabels.\r
597      * \r
598      * @return true if at least one ScaleColLabels has been added\r
599      */\r
600     public boolean hasScaleColLabels(\r
601     ) {\r
602         return this._has_scaleColLabels;\r
603     }\r
604 \r
605     /**\r
606      * Method hasScore.\r
607      * \r
608      * @return true if at least one Score has been added\r
609      */\r
610     public boolean hasScore(\r
611     ) {\r
612         return this._has_score;\r
613     }\r
614 \r
615     /**\r
616      * Method hasScoreOnly.\r
617      * \r
618      * @return true if at least one ScoreOnly has been added\r
619      */\r
620     public boolean hasScoreOnly(\r
621     ) {\r
622         return this._has_scoreOnly;\r
623     }\r
624 \r
625     /**\r
626      * Method hasShowAllColLabels.\r
627      * \r
628      * @return true if at least one ShowAllColLabels has been added\r
629      */\r
630     public boolean hasShowAllColLabels(\r
631     ) {\r
632         return this._has_showAllColLabels;\r
633     }\r
634 \r
635     /**\r
636      * Method hasVisible.\r
637      * \r
638      * @return true if at least one Visible has been added\r
639      */\r
640     public boolean hasVisible(\r
641     ) {\r
642         return this._has_visible;\r
643     }\r
644 \r
645     /**\r
646      * Returns the value of field 'autoCalculated'. The field\r
647      * 'autoCalculated' has the following description: is an\r
648      * autocalculated annotation row\r
649      * \r
650      * @return the value of field 'AutoCalculated'.\r
651      */\r
652     public boolean isAutoCalculated(\r
653     ) {\r
654         return this._autoCalculated;\r
655     }\r
656 \r
657     /**\r
658      * Returns the value of field 'centreColLabels'.\r
659      * \r
660      * @return the value of field 'CentreColLabels'.\r
661      */\r
662     public boolean isCentreColLabels(\r
663     ) {\r
664         return this._centreColLabels;\r
665     }\r
666 \r
667     /**\r
668      * Returns the value of field 'graph'.\r
669      * \r
670      * @return the value of field 'Graph'.\r
671      */\r
672     public boolean isGraph(\r
673     ) {\r
674         return this._graph;\r
675     }\r
676 \r
677     /**\r
678      * Returns the value of field 'scaleColLabels'.\r
679      * \r
680      * @return the value of field 'ScaleColLabels'.\r
681      */\r
682     public boolean isScaleColLabels(\r
683     ) {\r
684         return this._scaleColLabels;\r
685     }\r
686 \r
687     /**\r
688      * Returns the value of field 'scoreOnly'.\r
689      * \r
690      * @return the value of field 'ScoreOnly'.\r
691      */\r
692     public boolean isScoreOnly(\r
693     ) {\r
694         return this._scoreOnly;\r
695     }\r
696 \r
697     /**\r
698      * Returns the value of field 'showAllColLabels'.\r
699      * \r
700      * @return the value of field 'ShowAllColLabels'.\r
701      */\r
702     public boolean isShowAllColLabels(\r
703     ) {\r
704         return this._showAllColLabels;\r
705     }\r
706 \r
707     /**\r
708      * Method isValid.\r
709      * \r
710      * @return true if this object is valid according to the schema\r
711      */\r
712     public boolean isValid(\r
713     ) {\r
714         try {\r
715             validate();\r
716         } catch (org.exolab.castor.xml.ValidationException vex) {\r
717             return false;\r
718         }\r
719         return true;\r
720     }\r
721 \r
722     /**\r
723      * Returns the value of field 'visible'.\r
724      * \r
725      * @return the value of field 'Visible'.\r
726      */\r
727     public boolean isVisible(\r
728     ) {\r
729         return this._visible;\r
730     }\r
731 \r
732     /**\r
733      * \r
734      * \r
735      * @param out\r
736      * @throws org.exolab.castor.xml.MarshalException if object is\r
737      * null or if any SAXException is thrown during marshaling\r
738      * @throws org.exolab.castor.xml.ValidationException if this\r
739      * object is an invalid instance according to the schema\r
740      */\r
741     public void marshal(\r
742             final java.io.Writer out)\r
743     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
744         Marshaller.marshal(this, out);\r
745     }\r
746 \r
747     /**\r
748      * \r
749      * \r
750      * @param handler\r
751      * @throws java.io.IOException if an IOException occurs during\r
752      * marshaling\r
753      * @throws org.exolab.castor.xml.ValidationException if this\r
754      * object is an invalid instance according to the schema\r
755      * @throws org.exolab.castor.xml.MarshalException if object is\r
756      * null or if any SAXException is thrown during marshaling\r
757      */\r
758     public void marshal(\r
759             final org.xml.sax.ContentHandler handler)\r
760     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
761         Marshaller.marshal(this, handler);\r
762     }\r
763 \r
764     /**\r
765      */\r
766     public void removeAllAnnotationElement(\r
767     ) {\r
768         this._annotationElementList.clear();\r
769     }\r
770 \r
771     /**\r
772      * Method removeAnnotationElement.\r
773      * \r
774      * @param vAnnotationElement\r
775      * @return true if the object was removed from the collection.\r
776      */\r
777     public boolean removeAnnotationElement(\r
778             final jalview.schemabinding.version2.AnnotationElement vAnnotationElement) {\r
779         boolean removed = _annotationElementList.remove(vAnnotationElement);\r
780         return removed;\r
781     }\r
782 \r
783     /**\r
784      * Method removeAnnotationElementAt.\r
785      * \r
786      * @param index\r
787      * @return the element removed from the collection\r
788      */\r
789     public jalview.schemabinding.version2.AnnotationElement removeAnnotationElementAt(\r
790             final int index) {\r
791         java.lang.Object obj = this._annotationElementList.remove(index);\r
792         return (jalview.schemabinding.version2.AnnotationElement) obj;\r
793     }\r
794 \r
795     /**\r
796      * \r
797      * \r
798      * @param index\r
799      * @param vAnnotationElement\r
800      * @throws java.lang.IndexOutOfBoundsException if the index\r
801      * given is outside the bounds of the collection\r
802      */\r
803     public void setAnnotationElement(\r
804             final int index,\r
805             final jalview.schemabinding.version2.AnnotationElement vAnnotationElement)\r
806     throws java.lang.IndexOutOfBoundsException {\r
807         // check bounds for index\r
808         if (index < 0 || index >= this._annotationElementList.size()) {\r
809             throw new IndexOutOfBoundsException("setAnnotationElement: Index value '" + index + "' not in range [0.." + (this._annotationElementList.size() - 1) + "]");\r
810         }\r
811         \r
812         this._annotationElementList.set(index, vAnnotationElement);\r
813     }\r
814 \r
815     /**\r
816      * \r
817      * \r
818      * @param vAnnotationElementArray\r
819      */\r
820     public void setAnnotationElement(\r
821             final jalview.schemabinding.version2.AnnotationElement[] vAnnotationElementArray) {\r
822         //-- copy array\r
823         _annotationElementList.clear();\r
824         \r
825         for (int i = 0; i < vAnnotationElementArray.length; i++) {\r
826                 this._annotationElementList.add(vAnnotationElementArray[i]);\r
827         }\r
828     }\r
829 \r
830     /**\r
831      * Sets the value of field 'autoCalculated'. The field\r
832      * 'autoCalculated' has the following description: is an\r
833      * autocalculated annotation row\r
834      * \r
835      * @param autoCalculated the value of field 'autoCalculated'.\r
836      */\r
837     public void setAutoCalculated(\r
838             final boolean autoCalculated) {\r
839         this._autoCalculated = autoCalculated;\r
840         this._has_autoCalculated = true;\r
841     }\r
842 \r
843     /**\r
844      * Sets the value of field 'centreColLabels'.\r
845      * \r
846      * @param centreColLabels the value of field 'centreColLabels'.\r
847      */\r
848     public void setCentreColLabels(\r
849             final boolean centreColLabels) {\r
850         this._centreColLabels = centreColLabels;\r
851         this._has_centreColLabels = true;\r
852     }\r
853 \r
854     /**\r
855      * Sets the value of field 'description'.\r
856      * \r
857      * @param description the value of field 'description'.\r
858      */\r
859     public void setDescription(\r
860             final java.lang.String description) {\r
861         this._description = description;\r
862     }\r
863 \r
864     /**\r
865      * Sets the value of field 'graph'.\r
866      * \r
867      * @param graph the value of field 'graph'.\r
868      */\r
869     public void setGraph(\r
870             final boolean graph) {\r
871         this._graph = graph;\r
872         this._has_graph = true;\r
873     }\r
874 \r
875     /**\r
876      * Sets the value of field 'graphColour'.\r
877      * \r
878      * @param graphColour the value of field 'graphColour'.\r
879      */\r
880     public void setGraphColour(\r
881             final int graphColour) {\r
882         this._graphColour = graphColour;\r
883         this._has_graphColour = true;\r
884     }\r
885 \r
886     /**\r
887      * Sets the value of field 'graphGroup'.\r
888      * \r
889      * @param graphGroup the value of field 'graphGroup'.\r
890      */\r
891     public void setGraphGroup(\r
892             final int graphGroup) {\r
893         this._graphGroup = graphGroup;\r
894         this._has_graphGroup = true;\r
895     }\r
896 \r
897     /**\r
898      * Sets the value of field 'graphType'.\r
899      * \r
900      * @param graphType the value of field 'graphType'.\r
901      */\r
902     public void setGraphType(\r
903             final int graphType) {\r
904         this._graphType = graphType;\r
905         this._has_graphType = true;\r
906     }\r
907 \r
908     /**\r
909      * Sets the value of field 'groupRef'.\r
910      * \r
911      * @param groupRef the value of field 'groupRef'.\r
912      */\r
913     public void setGroupRef(\r
914             final java.lang.String groupRef) {\r
915         this._groupRef = groupRef;\r
916     }\r
917 \r
918     /**\r
919      * Sets the value of field 'id'.\r
920      * \r
921      * @param id the value of field 'id'.\r
922      */\r
923     public void setId(\r
924             final java.lang.String id) {\r
925         this._id = id;\r
926     }\r
927 \r
928     /**\r
929      * Sets the value of field 'label'.\r
930      * \r
931      * @param label the value of field 'label'.\r
932      */\r
933     public void setLabel(\r
934             final java.lang.String label) {\r
935         this._label = label;\r
936     }\r
937 \r
938     /**\r
939      * Sets the value of field 'scaleColLabels'.\r
940      * \r
941      * @param scaleColLabels the value of field 'scaleColLabels'.\r
942      */\r
943     public void setScaleColLabels(\r
944             final boolean scaleColLabels) {\r
945         this._scaleColLabels = scaleColLabels;\r
946         this._has_scaleColLabels = true;\r
947     }\r
948 \r
949     /**\r
950      * Sets the value of field 'score'.\r
951      * \r
952      * @param score the value of field 'score'.\r
953      */\r
954     public void setScore(\r
955             final double score) {\r
956         this._score = score;\r
957         this._has_score = true;\r
958     }\r
959 \r
960     /**\r
961      * Sets the value of field 'scoreOnly'.\r
962      * \r
963      * @param scoreOnly the value of field 'scoreOnly'.\r
964      */\r
965     public void setScoreOnly(\r
966             final boolean scoreOnly) {\r
967         this._scoreOnly = scoreOnly;\r
968         this._has_scoreOnly = true;\r
969     }\r
970 \r
971     /**\r
972      * Sets the value of field 'sequenceRef'.\r
973      * \r
974      * @param sequenceRef the value of field 'sequenceRef'.\r
975      */\r
976     public void setSequenceRef(\r
977             final java.lang.String sequenceRef) {\r
978         this._sequenceRef = sequenceRef;\r
979     }\r
980 \r
981     /**\r
982      * Sets the value of field 'showAllColLabels'.\r
983      * \r
984      * @param showAllColLabels the value of field 'showAllColLabels'\r
985      */\r
986     public void setShowAllColLabels(\r
987             final boolean showAllColLabels) {\r
988         this._showAllColLabels = showAllColLabels;\r
989         this._has_showAllColLabels = true;\r
990     }\r
991 \r
992     /**\r
993      * Sets the value of field 'thresholdLine'.\r
994      * \r
995      * @param thresholdLine the value of field 'thresholdLine'.\r
996      */\r
997     public void setThresholdLine(\r
998             final jalview.schemabinding.version2.ThresholdLine thresholdLine) {\r
999         this._thresholdLine = thresholdLine;\r
1000     }\r
1001 \r
1002     /**\r
1003      * Sets the value of field 'visible'.\r
1004      * \r
1005      * @param visible the value of field 'visible'.\r
1006      */\r
1007     public void setVisible(\r
1008             final boolean visible) {\r
1009         this._visible = visible;\r
1010         this._has_visible = true;\r
1011     }\r
1012 \r
1013     /**\r
1014      * Method unmarshal.\r
1015      * \r
1016      * @param reader\r
1017      * @throws org.exolab.castor.xml.MarshalException if object is\r
1018      * null or if any SAXException is thrown during marshaling\r
1019      * @throws org.exolab.castor.xml.ValidationException if this\r
1020      * object is an invalid instance according to the schema\r
1021      * @return the unmarshaled\r
1022      * jalview.schemabinding.version2.Annotation\r
1023      */\r
1024     public static jalview.schemabinding.version2.Annotation unmarshal(\r
1025             final java.io.Reader reader)\r
1026     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
1027         return (jalview.schemabinding.version2.Annotation) Unmarshaller.unmarshal(jalview.schemabinding.version2.Annotation.class, reader);\r
1028     }\r
1029 \r
1030     /**\r
1031      * \r
1032      * \r
1033      * @throws org.exolab.castor.xml.ValidationException if this\r
1034      * object is an invalid instance according to the schema\r
1035      */\r
1036     public void validate(\r
1037     )\r
1038     throws org.exolab.castor.xml.ValidationException {\r
1039         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
1040         validator.validate(this);\r
1041     }\r
1042 \r
1043 }\r