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