(JAL-965) new api methods to allow features to be loaded without automatically enabli...
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / AnnotationDescriptor.java
1 /*******************************************************************************
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3  * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
4  *
5  * This file is part of Jalview.
6  *
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10  *
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  *******************************************************************************/
18 /*
19  * This class was automatically generated with 
20  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
21  * Schema.
22  * $Id$
23  */
24
25 package jalview.schemabinding.version2.descriptors;
26
27   //---------------------------------/
28  //- Imported classes and packages -/
29 //---------------------------------/
30
31 import jalview.schemabinding.version2.Annotation;
32
33 /**
34  * Class AnnotationDescriptor.
35  * 
36  * @version $Revision$ $Date$
37  */
38 public class AnnotationDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
39
40
41       //--------------------------/
42      //- Class/Member Variables -/
43     //--------------------------/
44
45     /**
46      * Field _elementDefinition.
47      */
48     private boolean _elementDefinition;
49
50     /**
51      * Field _nsPrefix.
52      */
53     private java.lang.String _nsPrefix;
54
55     /**
56      * Field _nsURI.
57      */
58     private java.lang.String _nsURI;
59
60     /**
61      * Field _xmlName.
62      */
63     private java.lang.String _xmlName;
64
65
66       //----------------/
67      //- Constructors -/
68     //----------------/
69
70     public AnnotationDescriptor() {
71         super();
72         _nsURI = "www.vamsas.ac.uk/jalview/version2";
73         _xmlName = "Annotation";
74         _elementDefinition = true;
75         
76         //-- set grouping compositor
77         setCompositorAsSequence();
78         org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
79         org.exolab.castor.mapping.FieldHandler             handler        = null;
80         org.exolab.castor.xml.FieldValidator               fieldValidator = null;
81         //-- initialize attribute descriptors
82         
83         //-- _graph
84         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_graph", "graph", org.exolab.castor.xml.NodeType.Attribute);
85         handler = new org.exolab.castor.xml.XMLFieldHandler() {
86             public java.lang.Object getValue( java.lang.Object object ) 
87                 throws IllegalStateException
88             {
89                 Annotation target = (Annotation) object;
90                 if (!target.hasGraph()) { return null; }
91                 return (target.getGraph() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
92             }
93             public void setValue( java.lang.Object object, java.lang.Object value) 
94                 throws IllegalStateException, IllegalArgumentException
95             {
96                 try {
97                     Annotation target = (Annotation) object;
98                     // ignore null values for non optional primitives
99                     if (value == null) { return; }
100                     
101                     target.setGraph( ((java.lang.Boolean) value).booleanValue());
102                 } catch (java.lang.Exception ex) {
103                     throw new IllegalStateException(ex.toString());
104                 }
105             }
106             public java.lang.Object newInstance(java.lang.Object parent) {
107                 return null;
108             }
109         };
110         desc.setHandler(handler);
111         desc.setRequired(true);
112         desc.setMultivalued(false);
113         addFieldDescriptor(desc);
114         
115         //-- validation code for: _graph
116         fieldValidator = new org.exolab.castor.xml.FieldValidator();
117         fieldValidator.setMinOccurs(1);
118         { //-- local scope
119             org.exolab.castor.xml.validators.BooleanValidator typeValidator;
120             typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
121             fieldValidator.setValidator(typeValidator);
122         }
123         desc.setValidator(fieldValidator);
124         //-- _graphType
125         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_graphType", "graphType", org.exolab.castor.xml.NodeType.Attribute);
126         handler = new org.exolab.castor.xml.XMLFieldHandler() {
127             public java.lang.Object getValue( java.lang.Object object ) 
128                 throws IllegalStateException
129             {
130                 Annotation target = (Annotation) object;
131                 if (!target.hasGraphType()) { return null; }
132                 return new java.lang.Integer(target.getGraphType());
133             }
134             public void setValue( java.lang.Object object, java.lang.Object value) 
135                 throws IllegalStateException, IllegalArgumentException
136             {
137                 try {
138                     Annotation target = (Annotation) object;
139                     // if null, use delete method for optional primitives 
140                     if (value == null) {
141                         target.deleteGraphType();
142                         return;
143                     }
144                     target.setGraphType( ((java.lang.Integer) value).intValue());
145                 } catch (java.lang.Exception ex) {
146                     throw new IllegalStateException(ex.toString());
147                 }
148             }
149             public java.lang.Object newInstance(java.lang.Object parent) {
150                 return null;
151             }
152         };
153         desc.setHandler(handler);
154         desc.setMultivalued(false);
155         addFieldDescriptor(desc);
156         
157         //-- validation code for: _graphType
158         fieldValidator = new org.exolab.castor.xml.FieldValidator();
159         { //-- local scope
160             org.exolab.castor.xml.validators.IntValidator typeValidator;
161             typeValidator = new org.exolab.castor.xml.validators.IntValidator();
162             fieldValidator.setValidator(typeValidator);
163             typeValidator.setMinInclusive(-2147483648);
164             typeValidator.setMaxInclusive(2147483647);
165         }
166         desc.setValidator(fieldValidator);
167         //-- _sequenceRef
168         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_sequenceRef", "sequenceRef", org.exolab.castor.xml.NodeType.Attribute);
169         desc.setImmutable(true);
170         handler = new org.exolab.castor.xml.XMLFieldHandler() {
171             public java.lang.Object getValue( java.lang.Object object ) 
172                 throws IllegalStateException
173             {
174                 Annotation target = (Annotation) object;
175                 return target.getSequenceRef();
176             }
177             public void setValue( java.lang.Object object, java.lang.Object value) 
178                 throws IllegalStateException, IllegalArgumentException
179             {
180                 try {
181                     Annotation target = (Annotation) object;
182                     target.setSequenceRef( (java.lang.String) value);
183                 } catch (java.lang.Exception ex) {
184                     throw new IllegalStateException(ex.toString());
185                 }
186             }
187             public java.lang.Object newInstance(java.lang.Object parent) {
188                 return null;
189             }
190         };
191         desc.setHandler(handler);
192         desc.setMultivalued(false);
193         addFieldDescriptor(desc);
194         
195         //-- validation code for: _sequenceRef
196         fieldValidator = new org.exolab.castor.xml.FieldValidator();
197         { //-- local scope
198             org.exolab.castor.xml.validators.StringValidator typeValidator;
199             typeValidator = new org.exolab.castor.xml.validators.StringValidator();
200             fieldValidator.setValidator(typeValidator);
201             typeValidator.setWhiteSpace("preserve");
202         }
203         desc.setValidator(fieldValidator);
204         //-- _groupRef
205         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_groupRef", "groupRef", org.exolab.castor.xml.NodeType.Attribute);
206         desc.setImmutable(true);
207         handler = new org.exolab.castor.xml.XMLFieldHandler() {
208             public java.lang.Object getValue( java.lang.Object object ) 
209                 throws IllegalStateException
210             {
211                 Annotation target = (Annotation) object;
212                 return target.getGroupRef();
213             }
214             public void setValue( java.lang.Object object, java.lang.Object value) 
215                 throws IllegalStateException, IllegalArgumentException
216             {
217                 try {
218                     Annotation target = (Annotation) object;
219                     target.setGroupRef( (java.lang.String) value);
220                 } catch (java.lang.Exception ex) {
221                     throw new IllegalStateException(ex.toString());
222                 }
223             }
224             public java.lang.Object newInstance(java.lang.Object parent) {
225                 return null;
226             }
227         };
228         desc.setHandler(handler);
229         desc.setMultivalued(false);
230         addFieldDescriptor(desc);
231         
232         //-- validation code for: _groupRef
233         fieldValidator = new org.exolab.castor.xml.FieldValidator();
234         { //-- local scope
235             org.exolab.castor.xml.validators.StringValidator typeValidator;
236             typeValidator = new org.exolab.castor.xml.validators.StringValidator();
237             fieldValidator.setValidator(typeValidator);
238             typeValidator.setWhiteSpace("preserve");
239         }
240         desc.setValidator(fieldValidator);
241         //-- _graphColour
242         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_graphColour", "graphColour", org.exolab.castor.xml.NodeType.Attribute);
243         handler = new org.exolab.castor.xml.XMLFieldHandler() {
244             public java.lang.Object getValue( java.lang.Object object ) 
245                 throws IllegalStateException
246             {
247                 Annotation target = (Annotation) object;
248                 if (!target.hasGraphColour()) { return null; }
249                 return new java.lang.Integer(target.getGraphColour());
250             }
251             public void setValue( java.lang.Object object, java.lang.Object value) 
252                 throws IllegalStateException, IllegalArgumentException
253             {
254                 try {
255                     Annotation target = (Annotation) object;
256                     // if null, use delete method for optional primitives 
257                     if (value == null) {
258                         target.deleteGraphColour();
259                         return;
260                     }
261                     target.setGraphColour( ((java.lang.Integer) value).intValue());
262                 } catch (java.lang.Exception ex) {
263                     throw new IllegalStateException(ex.toString());
264                 }
265             }
266             public java.lang.Object newInstance(java.lang.Object parent) {
267                 return null;
268             }
269         };
270         desc.setHandler(handler);
271         desc.setMultivalued(false);
272         addFieldDescriptor(desc);
273         
274         //-- validation code for: _graphColour
275         fieldValidator = new org.exolab.castor.xml.FieldValidator();
276         { //-- local scope
277             org.exolab.castor.xml.validators.IntValidator typeValidator;
278             typeValidator = new org.exolab.castor.xml.validators.IntValidator();
279             fieldValidator.setValidator(typeValidator);
280             typeValidator.setMinInclusive(-2147483648);
281             typeValidator.setMaxInclusive(2147483647);
282         }
283         desc.setValidator(fieldValidator);
284         //-- _graphGroup
285         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_graphGroup", "graphGroup", org.exolab.castor.xml.NodeType.Attribute);
286         handler = new org.exolab.castor.xml.XMLFieldHandler() {
287             public java.lang.Object getValue( java.lang.Object object ) 
288                 throws IllegalStateException
289             {
290                 Annotation target = (Annotation) object;
291                 if (!target.hasGraphGroup()) { return null; }
292                 return new java.lang.Integer(target.getGraphGroup());
293             }
294             public void setValue( java.lang.Object object, java.lang.Object value) 
295                 throws IllegalStateException, IllegalArgumentException
296             {
297                 try {
298                     Annotation target = (Annotation) object;
299                     // if null, use delete method for optional primitives 
300                     if (value == null) {
301                         target.deleteGraphGroup();
302                         return;
303                     }
304                     target.setGraphGroup( ((java.lang.Integer) value).intValue());
305                 } catch (java.lang.Exception ex) {
306                     throw new IllegalStateException(ex.toString());
307                 }
308             }
309             public java.lang.Object newInstance(java.lang.Object parent) {
310                 return null;
311             }
312         };
313         desc.setHandler(handler);
314         desc.setMultivalued(false);
315         addFieldDescriptor(desc);
316         
317         //-- validation code for: _graphGroup
318         fieldValidator = new org.exolab.castor.xml.FieldValidator();
319         { //-- local scope
320             org.exolab.castor.xml.validators.IntValidator typeValidator;
321             typeValidator = new org.exolab.castor.xml.validators.IntValidator();
322             fieldValidator.setValidator(typeValidator);
323             typeValidator.setMinInclusive(-2147483648);
324             typeValidator.setMaxInclusive(2147483647);
325         }
326         desc.setValidator(fieldValidator);
327         //-- _graphHeight
328         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_graphHeight", "graphHeight", org.exolab.castor.xml.NodeType.Attribute);
329         handler = new org.exolab.castor.xml.XMLFieldHandler() {
330             public java.lang.Object getValue( java.lang.Object object ) 
331                 throws IllegalStateException
332             {
333                 Annotation target = (Annotation) object;
334                 if (!target.hasGraphHeight()) { return null; }
335                 return new java.lang.Integer(target.getGraphHeight());
336             }
337             public void setValue( java.lang.Object object, java.lang.Object value) 
338                 throws IllegalStateException, IllegalArgumentException
339             {
340                 try {
341                     Annotation target = (Annotation) object;
342                     // if null, use delete method for optional primitives 
343                     if (value == null) {
344                         target.deleteGraphHeight();
345                         return;
346                     }
347                     target.setGraphHeight( ((java.lang.Integer) value).intValue());
348                 } catch (java.lang.Exception ex) {
349                     throw new IllegalStateException(ex.toString());
350                 }
351             }
352             public java.lang.Object newInstance(java.lang.Object parent) {
353                 return null;
354             }
355         };
356         desc.setHandler(handler);
357         desc.setMultivalued(false);
358         addFieldDescriptor(desc);
359         
360         //-- validation code for: _graphHeight
361         fieldValidator = new org.exolab.castor.xml.FieldValidator();
362         { //-- local scope
363             org.exolab.castor.xml.validators.IntValidator typeValidator;
364             typeValidator = new org.exolab.castor.xml.validators.IntValidator();
365             fieldValidator.setValidator(typeValidator);
366             typeValidator.setMinInclusive(-2147483648);
367             typeValidator.setMaxInclusive(2147483647);
368         }
369         desc.setValidator(fieldValidator);
370         //-- _id
371         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);
372         desc.setImmutable(true);
373         handler = new org.exolab.castor.xml.XMLFieldHandler() {
374             public java.lang.Object getValue( java.lang.Object object ) 
375                 throws IllegalStateException
376             {
377                 Annotation target = (Annotation) object;
378                 return target.getId();
379             }
380             public void setValue( java.lang.Object object, java.lang.Object value) 
381                 throws IllegalStateException, IllegalArgumentException
382             {
383                 try {
384                     Annotation target = (Annotation) object;
385                     target.setId( (java.lang.String) value);
386                 } catch (java.lang.Exception ex) {
387                     throw new IllegalStateException(ex.toString());
388                 }
389             }
390             public java.lang.Object newInstance(java.lang.Object parent) {
391                 return null;
392             }
393         };
394         desc.setHandler(handler);
395         desc.setMultivalued(false);
396         addFieldDescriptor(desc);
397         
398         //-- validation code for: _id
399         fieldValidator = new org.exolab.castor.xml.FieldValidator();
400         { //-- local scope
401             org.exolab.castor.xml.validators.StringValidator typeValidator;
402             typeValidator = new org.exolab.castor.xml.validators.StringValidator();
403             fieldValidator.setValidator(typeValidator);
404             typeValidator.setWhiteSpace("preserve");
405         }
406         desc.setValidator(fieldValidator);
407         //-- _scoreOnly
408         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_scoreOnly", "scoreOnly", org.exolab.castor.xml.NodeType.Attribute);
409         handler = new org.exolab.castor.xml.XMLFieldHandler() {
410             public java.lang.Object getValue( java.lang.Object object ) 
411                 throws IllegalStateException
412             {
413                 Annotation target = (Annotation) object;
414                 if (!target.hasScoreOnly()) { return null; }
415                 return (target.getScoreOnly() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
416             }
417             public void setValue( java.lang.Object object, java.lang.Object value) 
418                 throws IllegalStateException, IllegalArgumentException
419             {
420                 try {
421                     Annotation target = (Annotation) object;
422                     // if null, use delete method for optional primitives 
423                     if (value == null) {
424                         target.deleteScoreOnly();
425                         return;
426                     }
427                     target.setScoreOnly( ((java.lang.Boolean) value).booleanValue());
428                 } catch (java.lang.Exception ex) {
429                     throw new IllegalStateException(ex.toString());
430                 }
431             }
432             public java.lang.Object newInstance(java.lang.Object parent) {
433                 return null;
434             }
435         };
436         desc.setHandler(handler);
437         desc.setMultivalued(false);
438         addFieldDescriptor(desc);
439         
440         //-- validation code for: _scoreOnly
441         fieldValidator = new org.exolab.castor.xml.FieldValidator();
442         { //-- local scope
443             org.exolab.castor.xml.validators.BooleanValidator typeValidator;
444             typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
445             fieldValidator.setValidator(typeValidator);
446         }
447         desc.setValidator(fieldValidator);
448         //-- _score
449         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Double.TYPE, "_score", "score", org.exolab.castor.xml.NodeType.Attribute);
450         handler = new org.exolab.castor.xml.XMLFieldHandler() {
451             public java.lang.Object getValue( java.lang.Object object ) 
452                 throws IllegalStateException
453             {
454                 Annotation target = (Annotation) object;
455                 if (!target.hasScore()) { return null; }
456                 return new java.lang.Double(target.getScore());
457             }
458             public void setValue( java.lang.Object object, java.lang.Object value) 
459                 throws IllegalStateException, IllegalArgumentException
460             {
461                 try {
462                     Annotation target = (Annotation) object;
463                     // if null, use delete method for optional primitives 
464                     if (value == null) {
465                         target.deleteScore();
466                         return;
467                     }
468                     target.setScore( ((java.lang.Double) value).doubleValue());
469                 } catch (java.lang.Exception ex) {
470                     throw new IllegalStateException(ex.toString());
471                 }
472             }
473             public java.lang.Object newInstance(java.lang.Object parent) {
474                 return null;
475             }
476         };
477         desc.setHandler(handler);
478         desc.setMultivalued(false);
479         addFieldDescriptor(desc);
480         
481         //-- validation code for: _score
482         fieldValidator = new org.exolab.castor.xml.FieldValidator();
483         { //-- local scope
484             org.exolab.castor.xml.validators.DoubleValidator typeValidator;
485             typeValidator = new org.exolab.castor.xml.validators.DoubleValidator();
486             fieldValidator.setValidator(typeValidator);
487             typeValidator.setMinInclusive(-1.7976931348623157E308);
488             typeValidator.setMaxInclusive(1.7976931348623157E308);
489         }
490         desc.setValidator(fieldValidator);
491         //-- _visible
492         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_visible", "visible", org.exolab.castor.xml.NodeType.Attribute);
493         handler = new org.exolab.castor.xml.XMLFieldHandler() {
494             public java.lang.Object getValue( java.lang.Object object ) 
495                 throws IllegalStateException
496             {
497                 Annotation target = (Annotation) object;
498                 if (!target.hasVisible()) { return null; }
499                 return (target.getVisible() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
500             }
501             public void setValue( java.lang.Object object, java.lang.Object value) 
502                 throws IllegalStateException, IllegalArgumentException
503             {
504                 try {
505                     Annotation target = (Annotation) object;
506                     // if null, use delete method for optional primitives 
507                     if (value == null) {
508                         target.deleteVisible();
509                         return;
510                     }
511                     target.setVisible( ((java.lang.Boolean) value).booleanValue());
512                 } catch (java.lang.Exception ex) {
513                     throw new IllegalStateException(ex.toString());
514                 }
515             }
516             public java.lang.Object newInstance(java.lang.Object parent) {
517                 return null;
518             }
519         };
520         desc.setHandler(handler);
521         desc.setMultivalued(false);
522         addFieldDescriptor(desc);
523         
524         //-- validation code for: _visible
525         fieldValidator = new org.exolab.castor.xml.FieldValidator();
526         { //-- local scope
527             org.exolab.castor.xml.validators.BooleanValidator typeValidator;
528             typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
529             fieldValidator.setValidator(typeValidator);
530         }
531         desc.setValidator(fieldValidator);
532         //-- _centreColLabels
533         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_centreColLabels", "centreColLabels", org.exolab.castor.xml.NodeType.Attribute);
534         handler = new org.exolab.castor.xml.XMLFieldHandler() {
535             public java.lang.Object getValue( java.lang.Object object ) 
536                 throws IllegalStateException
537             {
538                 Annotation target = (Annotation) object;
539                 if (!target.hasCentreColLabels()) { return null; }
540                 return (target.getCentreColLabels() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
541             }
542             public void setValue( java.lang.Object object, java.lang.Object value) 
543                 throws IllegalStateException, IllegalArgumentException
544             {
545                 try {
546                     Annotation target = (Annotation) object;
547                     // if null, use delete method for optional primitives 
548                     if (value == null) {
549                         target.deleteCentreColLabels();
550                         return;
551                     }
552                     target.setCentreColLabels( ((java.lang.Boolean) value).booleanValue());
553                 } catch (java.lang.Exception ex) {
554                     throw new IllegalStateException(ex.toString());
555                 }
556             }
557             public java.lang.Object newInstance(java.lang.Object parent) {
558                 return null;
559             }
560         };
561         desc.setHandler(handler);
562         desc.setMultivalued(false);
563         addFieldDescriptor(desc);
564         
565         //-- validation code for: _centreColLabels
566         fieldValidator = new org.exolab.castor.xml.FieldValidator();
567         { //-- local scope
568             org.exolab.castor.xml.validators.BooleanValidator typeValidator;
569             typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
570             fieldValidator.setValidator(typeValidator);
571         }
572         desc.setValidator(fieldValidator);
573         //-- _scaleColLabels
574         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_scaleColLabels", "scaleColLabels", org.exolab.castor.xml.NodeType.Attribute);
575         handler = new org.exolab.castor.xml.XMLFieldHandler() {
576             public java.lang.Object getValue( java.lang.Object object ) 
577                 throws IllegalStateException
578             {
579                 Annotation target = (Annotation) object;
580                 if (!target.hasScaleColLabels()) { return null; }
581                 return (target.getScaleColLabels() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
582             }
583             public void setValue( java.lang.Object object, java.lang.Object value) 
584                 throws IllegalStateException, IllegalArgumentException
585             {
586                 try {
587                     Annotation target = (Annotation) object;
588                     // if null, use delete method for optional primitives 
589                     if (value == null) {
590                         target.deleteScaleColLabels();
591                         return;
592                     }
593                     target.setScaleColLabels( ((java.lang.Boolean) value).booleanValue());
594                 } catch (java.lang.Exception ex) {
595                     throw new IllegalStateException(ex.toString());
596                 }
597             }
598             public java.lang.Object newInstance(java.lang.Object parent) {
599                 return null;
600             }
601         };
602         desc.setHandler(handler);
603         desc.setMultivalued(false);
604         addFieldDescriptor(desc);
605         
606         //-- validation code for: _scaleColLabels
607         fieldValidator = new org.exolab.castor.xml.FieldValidator();
608         { //-- local scope
609             org.exolab.castor.xml.validators.BooleanValidator typeValidator;
610             typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
611             fieldValidator.setValidator(typeValidator);
612         }
613         desc.setValidator(fieldValidator);
614         //-- _showAllColLabels
615         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showAllColLabels", "showAllColLabels", org.exolab.castor.xml.NodeType.Attribute);
616         handler = new org.exolab.castor.xml.XMLFieldHandler() {
617             public java.lang.Object getValue( java.lang.Object object ) 
618                 throws IllegalStateException
619             {
620                 Annotation target = (Annotation) object;
621                 if (!target.hasShowAllColLabels()) { return null; }
622                 return (target.getShowAllColLabels() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
623             }
624             public void setValue( java.lang.Object object, java.lang.Object value) 
625                 throws IllegalStateException, IllegalArgumentException
626             {
627                 try {
628                     Annotation target = (Annotation) object;
629                     // if null, use delete method for optional primitives 
630                     if (value == null) {
631                         target.deleteShowAllColLabels();
632                         return;
633                     }
634                     target.setShowAllColLabels( ((java.lang.Boolean) value).booleanValue());
635                 } catch (java.lang.Exception ex) {
636                     throw new IllegalStateException(ex.toString());
637                 }
638             }
639             public java.lang.Object newInstance(java.lang.Object parent) {
640                 return null;
641             }
642         };
643         desc.setHandler(handler);
644         desc.setMultivalued(false);
645         addFieldDescriptor(desc);
646         
647         //-- validation code for: _showAllColLabels
648         fieldValidator = new org.exolab.castor.xml.FieldValidator();
649         { //-- local scope
650             org.exolab.castor.xml.validators.BooleanValidator typeValidator;
651             typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
652             fieldValidator.setValidator(typeValidator);
653         }
654         desc.setValidator(fieldValidator);
655         //-- _autoCalculated
656         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_autoCalculated", "autoCalculated", org.exolab.castor.xml.NodeType.Attribute);
657         handler = new org.exolab.castor.xml.XMLFieldHandler() {
658             public java.lang.Object getValue( java.lang.Object object ) 
659                 throws IllegalStateException
660             {
661                 Annotation target = (Annotation) object;
662                 if (!target.hasAutoCalculated()) { return null; }
663                 return (target.getAutoCalculated() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
664             }
665             public void setValue( java.lang.Object object, java.lang.Object value) 
666                 throws IllegalStateException, IllegalArgumentException
667             {
668                 try {
669                     Annotation target = (Annotation) object;
670                     // if null, use delete method for optional primitives 
671                     if (value == null) {
672                         target.deleteAutoCalculated();
673                         return;
674                     }
675                     target.setAutoCalculated( ((java.lang.Boolean) value).booleanValue());
676                 } catch (java.lang.Exception ex) {
677                     throw new IllegalStateException(ex.toString());
678                 }
679             }
680             public java.lang.Object newInstance(java.lang.Object parent) {
681                 return null;
682             }
683         };
684         desc.setHandler(handler);
685         desc.setMultivalued(false);
686         addFieldDescriptor(desc);
687         
688         //-- validation code for: _autoCalculated
689         fieldValidator = new org.exolab.castor.xml.FieldValidator();
690         { //-- local scope
691             org.exolab.castor.xml.validators.BooleanValidator typeValidator;
692             typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
693             fieldValidator.setValidator(typeValidator);
694         }
695         desc.setValidator(fieldValidator);
696         //-- initialize element descriptors
697         
698         //-- _annotationElementList
699         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.AnnotationElement.class, "_annotationElementList", "annotationElement", org.exolab.castor.xml.NodeType.Element);
700         handler = new org.exolab.castor.xml.XMLFieldHandler() {
701             public java.lang.Object getValue( java.lang.Object object ) 
702                 throws IllegalStateException
703             {
704                 Annotation target = (Annotation) object;
705                 return target.getAnnotationElement();
706             }
707             public void setValue( java.lang.Object object, java.lang.Object value) 
708                 throws IllegalStateException, IllegalArgumentException
709             {
710                 try {
711                     Annotation target = (Annotation) object;
712                     target.addAnnotationElement( (jalview.schemabinding.version2.AnnotationElement) value);
713                 } catch (java.lang.Exception ex) {
714                     throw new IllegalStateException(ex.toString());
715                 }
716             }
717             public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
718                 try {
719                     Annotation target = (Annotation) object;
720                     target.removeAllAnnotationElement();
721                 } catch (java.lang.Exception ex) {
722                     throw new IllegalStateException(ex.toString());
723                 }
724             }
725             public java.lang.Object newInstance(java.lang.Object parent) {
726                 return new jalview.schemabinding.version2.AnnotationElement();
727             }
728         };
729         desc.setHandler(handler);
730         desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
731         desc.setMultivalued(true);
732         addFieldDescriptor(desc);
733         
734         //-- validation code for: _annotationElementList
735         fieldValidator = new org.exolab.castor.xml.FieldValidator();
736         fieldValidator.setMinOccurs(0);
737         { //-- local scope
738         }
739         desc.setValidator(fieldValidator);
740         //-- _label
741         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_label", "label", org.exolab.castor.xml.NodeType.Element);
742         desc.setImmutable(true);
743         handler = new org.exolab.castor.xml.XMLFieldHandler() {
744             public java.lang.Object getValue( java.lang.Object object ) 
745                 throws IllegalStateException
746             {
747                 Annotation target = (Annotation) object;
748                 return target.getLabel();
749             }
750             public void setValue( java.lang.Object object, java.lang.Object value) 
751                 throws IllegalStateException, IllegalArgumentException
752             {
753                 try {
754                     Annotation target = (Annotation) object;
755                     target.setLabel( (java.lang.String) value);
756                 } catch (java.lang.Exception ex) {
757                     throw new IllegalStateException(ex.toString());
758                 }
759             }
760             public java.lang.Object newInstance(java.lang.Object parent) {
761                 return null;
762             }
763         };
764         desc.setHandler(handler);
765         desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
766         desc.setRequired(true);
767         desc.setMultivalued(false);
768         addFieldDescriptor(desc);
769         
770         //-- validation code for: _label
771         fieldValidator = new org.exolab.castor.xml.FieldValidator();
772         fieldValidator.setMinOccurs(1);
773         { //-- local scope
774             org.exolab.castor.xml.validators.StringValidator typeValidator;
775             typeValidator = new org.exolab.castor.xml.validators.StringValidator();
776             fieldValidator.setValidator(typeValidator);
777             typeValidator.setWhiteSpace("preserve");
778         }
779         desc.setValidator(fieldValidator);
780         //-- _description
781         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", org.exolab.castor.xml.NodeType.Element);
782         desc.setImmutable(true);
783         handler = new org.exolab.castor.xml.XMLFieldHandler() {
784             public java.lang.Object getValue( java.lang.Object object ) 
785                 throws IllegalStateException
786             {
787                 Annotation target = (Annotation) object;
788                 return target.getDescription();
789             }
790             public void setValue( java.lang.Object object, java.lang.Object value) 
791                 throws IllegalStateException, IllegalArgumentException
792             {
793                 try {
794                     Annotation target = (Annotation) object;
795                     target.setDescription( (java.lang.String) value);
796                 } catch (java.lang.Exception ex) {
797                     throw new IllegalStateException(ex.toString());
798                 }
799             }
800             public java.lang.Object newInstance(java.lang.Object parent) {
801                 return null;
802             }
803         };
804         desc.setHandler(handler);
805         desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
806         desc.setMultivalued(false);
807         addFieldDescriptor(desc);
808         
809         //-- validation code for: _description
810         fieldValidator = new org.exolab.castor.xml.FieldValidator();
811         { //-- local scope
812             org.exolab.castor.xml.validators.StringValidator typeValidator;
813             typeValidator = new org.exolab.castor.xml.validators.StringValidator();
814             fieldValidator.setValidator(typeValidator);
815             typeValidator.setWhiteSpace("preserve");
816         }
817         desc.setValidator(fieldValidator);
818         //-- _thresholdLine
819         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.ThresholdLine.class, "_thresholdLine", "thresholdLine", org.exolab.castor.xml.NodeType.Element);
820         handler = new org.exolab.castor.xml.XMLFieldHandler() {
821             public java.lang.Object getValue( java.lang.Object object ) 
822                 throws IllegalStateException
823             {
824                 Annotation target = (Annotation) object;
825                 return target.getThresholdLine();
826             }
827             public void setValue( java.lang.Object object, java.lang.Object value) 
828                 throws IllegalStateException, IllegalArgumentException
829             {
830                 try {
831                     Annotation target = (Annotation) object;
832                     target.setThresholdLine( (jalview.schemabinding.version2.ThresholdLine) value);
833                 } catch (java.lang.Exception ex) {
834                     throw new IllegalStateException(ex.toString());
835                 }
836             }
837             public java.lang.Object newInstance(java.lang.Object parent) {
838                 return new jalview.schemabinding.version2.ThresholdLine();
839             }
840         };
841         desc.setHandler(handler);
842         desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
843         desc.setMultivalued(false);
844         addFieldDescriptor(desc);
845         
846         //-- validation code for: _thresholdLine
847         fieldValidator = new org.exolab.castor.xml.FieldValidator();
848         { //-- local scope
849         }
850         desc.setValidator(fieldValidator);
851     }
852
853
854       //-----------/
855      //- Methods -/
856     //-----------/
857
858     /**
859      * Method getAccessMode.
860      * 
861      * @return the access mode specified for this class.
862      */
863     public org.exolab.castor.mapping.AccessMode getAccessMode(
864     ) {
865         return null;
866     }
867
868     /**
869      * Method getIdentity.
870      * 
871      * @return the identity field, null if this class has no
872      * identity.
873      */
874     public org.exolab.castor.mapping.FieldDescriptor getIdentity(
875     ) {
876         return super.getIdentity();
877     }
878
879     /**
880      * Method getJavaClass.
881      * 
882      * @return the Java class represented by this descriptor.
883      */
884     public java.lang.Class getJavaClass(
885     ) {
886         return jalview.schemabinding.version2.Annotation.class;
887     }
888
889     /**
890      * Method getNameSpacePrefix.
891      * 
892      * @return the namespace prefix to use when marshaling as XML.
893      */
894     public java.lang.String getNameSpacePrefix(
895     ) {
896         return _nsPrefix;
897     }
898
899     /**
900      * Method getNameSpaceURI.
901      * 
902      * @return the namespace URI used when marshaling and
903      * unmarshaling as XML.
904      */
905     public java.lang.String getNameSpaceURI(
906     ) {
907         return _nsURI;
908     }
909
910     /**
911      * Method getValidator.
912      * 
913      * @return a specific validator for the class described by this
914      * ClassDescriptor.
915      */
916     public org.exolab.castor.xml.TypeValidator getValidator(
917     ) {
918         return this;
919     }
920
921     /**
922      * Method getXMLName.
923      * 
924      * @return the XML Name for the Class being described.
925      */
926     public java.lang.String getXMLName(
927     ) {
928         return _xmlName;
929     }
930
931     /**
932      * Method isElementDefinition.
933      * 
934      * @return true if XML schema definition of this Class is that
935      * of a global
936      * element or element with anonymous type definition.
937      */
938     public boolean isElementDefinition(
939     ) {
940         return _elementDefinition;
941     }
942
943 }