JAL-3178 include non-positional features in their group on export
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / AnnotationColourSchemeDescriptor.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package jalview.schemabinding.version2.descriptors;
9
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
13
14 import jalview.schemabinding.version2.AnnotationColourScheme;
15
16 /**
17  * Class AnnotationColourSchemeDescriptor.
18  * 
19  * @version $Revision$ $Date$
20  */
21 public class AnnotationColourSchemeDescriptor extends
22         org.exolab.castor.xml.util.XMLClassDescriptorImpl
23 {
24
25   // --------------------------/
26   // - Class/Member Variables -/
27   // --------------------------/
28
29   /**
30    * Field _elementDefinition.
31    */
32   private boolean _elementDefinition;
33
34   /**
35    * Field _nsPrefix.
36    */
37   private java.lang.String _nsPrefix;
38
39   /**
40    * Field _nsURI.
41    */
42   private java.lang.String _nsURI;
43
44   /**
45    * Field _xmlName.
46    */
47   private java.lang.String _xmlName;
48
49   // ----------------/
50   // - Constructors -/
51   // ----------------/
52
53   public AnnotationColourSchemeDescriptor()
54   {
55     super();
56     _nsURI = "www.jalview.org";
57     _xmlName = "AnnotationColourScheme";
58     _elementDefinition = false;
59     org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
60     org.exolab.castor.mapping.FieldHandler handler = null;
61     org.exolab.castor.xml.FieldValidator fieldValidator = null;
62     // -- initialize attribute descriptors
63
64     // -- _aboveThreshold
65     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
66             java.lang.Integer.TYPE, "_aboveThreshold", "aboveThreshold",
67             org.exolab.castor.xml.NodeType.Attribute);
68     handler = new org.exolab.castor.xml.XMLFieldHandler()
69     {
70       public java.lang.Object getValue(java.lang.Object object)
71               throws IllegalStateException
72       {
73         AnnotationColourScheme target = (AnnotationColourScheme) object;
74         if (!target.hasAboveThreshold())
75         {
76           return null;
77         }
78         return new java.lang.Integer(target.getAboveThreshold());
79       }
80
81       public void setValue(java.lang.Object object, java.lang.Object value)
82               throws IllegalStateException, IllegalArgumentException
83       {
84         try
85         {
86           AnnotationColourScheme target = (AnnotationColourScheme) object;
87           // if null, use delete method for optional primitives
88           if (value == null)
89           {
90             target.deleteAboveThreshold();
91             return;
92           }
93           target.setAboveThreshold(((java.lang.Integer) value).intValue());
94         } catch (java.lang.Exception ex)
95         {
96           throw new IllegalStateException(ex.toString());
97         }
98       }
99
100       public java.lang.Object newInstance(java.lang.Object parent)
101       {
102         return null;
103       }
104     };
105     desc.setHandler(handler);
106     desc.setMultivalued(false);
107     addFieldDescriptor(desc);
108
109     // -- validation code for: _aboveThreshold
110     fieldValidator = new org.exolab.castor.xml.FieldValidator();
111     { // -- local scope
112       org.exolab.castor.xml.validators.IntValidator typeValidator;
113       typeValidator = new org.exolab.castor.xml.validators.IntValidator();
114       fieldValidator.setValidator(typeValidator);
115       typeValidator.setMinInclusive(-2147483648);
116       typeValidator.setMaxInclusive(2147483647);
117     }
118     desc.setValidator(fieldValidator);
119     // -- _annotation
120     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
121             java.lang.String.class, "_annotation", "annotation",
122             org.exolab.castor.xml.NodeType.Attribute);
123     desc.setImmutable(true);
124     handler = new org.exolab.castor.xml.XMLFieldHandler()
125     {
126       public java.lang.Object getValue(java.lang.Object object)
127               throws IllegalStateException
128       {
129         AnnotationColourScheme target = (AnnotationColourScheme) object;
130         return target.getAnnotation();
131       }
132
133       public void setValue(java.lang.Object object, java.lang.Object value)
134               throws IllegalStateException, IllegalArgumentException
135       {
136         try
137         {
138           AnnotationColourScheme target = (AnnotationColourScheme) object;
139           target.setAnnotation((java.lang.String) value);
140         } catch (java.lang.Exception ex)
141         {
142           throw new IllegalStateException(ex.toString());
143         }
144       }
145
146       public java.lang.Object newInstance(java.lang.Object parent)
147       {
148         return null;
149       }
150     };
151     desc.setHandler(handler);
152     desc.setMultivalued(false);
153     addFieldDescriptor(desc);
154
155     // -- validation code for: _annotation
156     fieldValidator = new org.exolab.castor.xml.FieldValidator();
157     { // -- local scope
158       org.exolab.castor.xml.validators.StringValidator typeValidator;
159       typeValidator = new org.exolab.castor.xml.validators.StringValidator();
160       fieldValidator.setValidator(typeValidator);
161       typeValidator.setWhiteSpace("preserve");
162     }
163     desc.setValidator(fieldValidator);
164     // -- _minColour
165     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
166             java.lang.Integer.TYPE, "_minColour", "minColour",
167             org.exolab.castor.xml.NodeType.Attribute);
168     handler = new org.exolab.castor.xml.XMLFieldHandler()
169     {
170       public java.lang.Object getValue(java.lang.Object object)
171               throws IllegalStateException
172       {
173         AnnotationColourScheme target = (AnnotationColourScheme) object;
174         if (!target.hasMinColour())
175         {
176           return null;
177         }
178         return new java.lang.Integer(target.getMinColour());
179       }
180
181       public void setValue(java.lang.Object object, java.lang.Object value)
182               throws IllegalStateException, IllegalArgumentException
183       {
184         try
185         {
186           AnnotationColourScheme target = (AnnotationColourScheme) object;
187           // if null, use delete method for optional primitives
188           if (value == null)
189           {
190             target.deleteMinColour();
191             return;
192           }
193           target.setMinColour(((java.lang.Integer) value).intValue());
194         } catch (java.lang.Exception ex)
195         {
196           throw new IllegalStateException(ex.toString());
197         }
198       }
199
200       public java.lang.Object newInstance(java.lang.Object parent)
201       {
202         return null;
203       }
204     };
205     desc.setHandler(handler);
206     desc.setMultivalued(false);
207     addFieldDescriptor(desc);
208
209     // -- validation code for: _minColour
210     fieldValidator = new org.exolab.castor.xml.FieldValidator();
211     { // -- local scope
212       org.exolab.castor.xml.validators.IntValidator typeValidator;
213       typeValidator = new org.exolab.castor.xml.validators.IntValidator();
214       fieldValidator.setValidator(typeValidator);
215       typeValidator.setMinInclusive(-2147483648);
216       typeValidator.setMaxInclusive(2147483647);
217     }
218     desc.setValidator(fieldValidator);
219     // -- _maxColour
220     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
221             java.lang.Integer.TYPE, "_maxColour", "maxColour",
222             org.exolab.castor.xml.NodeType.Attribute);
223     handler = new org.exolab.castor.xml.XMLFieldHandler()
224     {
225       public java.lang.Object getValue(java.lang.Object object)
226               throws IllegalStateException
227       {
228         AnnotationColourScheme target = (AnnotationColourScheme) object;
229         if (!target.hasMaxColour())
230         {
231           return null;
232         }
233         return new java.lang.Integer(target.getMaxColour());
234       }
235
236       public void setValue(java.lang.Object object, java.lang.Object value)
237               throws IllegalStateException, IllegalArgumentException
238       {
239         try
240         {
241           AnnotationColourScheme target = (AnnotationColourScheme) object;
242           // if null, use delete method for optional primitives
243           if (value == null)
244           {
245             target.deleteMaxColour();
246             return;
247           }
248           target.setMaxColour(((java.lang.Integer) value).intValue());
249         } catch (java.lang.Exception ex)
250         {
251           throw new IllegalStateException(ex.toString());
252         }
253       }
254
255       public java.lang.Object newInstance(java.lang.Object parent)
256       {
257         return null;
258       }
259     };
260     desc.setHandler(handler);
261     desc.setMultivalued(false);
262     addFieldDescriptor(desc);
263
264     // -- validation code for: _maxColour
265     fieldValidator = new org.exolab.castor.xml.FieldValidator();
266     { // -- local scope
267       org.exolab.castor.xml.validators.IntValidator typeValidator;
268       typeValidator = new org.exolab.castor.xml.validators.IntValidator();
269       fieldValidator.setValidator(typeValidator);
270       typeValidator.setMinInclusive(-2147483648);
271       typeValidator.setMaxInclusive(2147483647);
272     }
273     desc.setValidator(fieldValidator);
274     // -- _colourScheme
275     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
276             java.lang.String.class, "_colourScheme", "colourScheme",
277             org.exolab.castor.xml.NodeType.Attribute);
278     desc.setImmutable(true);
279     handler = new org.exolab.castor.xml.XMLFieldHandler()
280     {
281       public java.lang.Object getValue(java.lang.Object object)
282               throws IllegalStateException
283       {
284         AnnotationColourScheme target = (AnnotationColourScheme) object;
285         return target.getColourScheme();
286       }
287
288       public void setValue(java.lang.Object object, java.lang.Object value)
289               throws IllegalStateException, IllegalArgumentException
290       {
291         try
292         {
293           AnnotationColourScheme target = (AnnotationColourScheme) object;
294           target.setColourScheme((java.lang.String) value);
295         } catch (java.lang.Exception ex)
296         {
297           throw new IllegalStateException(ex.toString());
298         }
299       }
300
301       public java.lang.Object newInstance(java.lang.Object parent)
302       {
303         return null;
304       }
305     };
306     desc.setHandler(handler);
307     desc.setMultivalued(false);
308     addFieldDescriptor(desc);
309
310     // -- validation code for: _colourScheme
311     fieldValidator = new org.exolab.castor.xml.FieldValidator();
312     { // -- local scope
313       org.exolab.castor.xml.validators.StringValidator typeValidator;
314       typeValidator = new org.exolab.castor.xml.validators.StringValidator();
315       fieldValidator.setValidator(typeValidator);
316       typeValidator.setWhiteSpace("preserve");
317     }
318     desc.setValidator(fieldValidator);
319     // -- _threshold
320     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
321             java.lang.Float.TYPE, "_threshold", "threshold",
322             org.exolab.castor.xml.NodeType.Attribute);
323     handler = new org.exolab.castor.xml.XMLFieldHandler()
324     {
325       public java.lang.Object getValue(java.lang.Object object)
326               throws IllegalStateException
327       {
328         AnnotationColourScheme target = (AnnotationColourScheme) object;
329         if (!target.hasThreshold())
330         {
331           return null;
332         }
333         return new java.lang.Float(target.getThreshold());
334       }
335
336       public void setValue(java.lang.Object object, java.lang.Object value)
337               throws IllegalStateException, IllegalArgumentException
338       {
339         try
340         {
341           AnnotationColourScheme target = (AnnotationColourScheme) object;
342           // if null, use delete method for optional primitives
343           if (value == null)
344           {
345             target.deleteThreshold();
346             return;
347           }
348           target.setThreshold(((java.lang.Float) value).floatValue());
349         } catch (java.lang.Exception ex)
350         {
351           throw new IllegalStateException(ex.toString());
352         }
353       }
354
355       public java.lang.Object newInstance(java.lang.Object parent)
356       {
357         return null;
358       }
359     };
360     desc.setHandler(handler);
361     desc.setMultivalued(false);
362     addFieldDescriptor(desc);
363
364     // -- validation code for: _threshold
365     fieldValidator = new org.exolab.castor.xml.FieldValidator();
366     { // -- local scope
367       org.exolab.castor.xml.validators.FloatValidator typeValidator;
368       typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
369       fieldValidator.setValidator(typeValidator);
370       typeValidator.setMinInclusive((float) -3.4028235E38);
371       typeValidator.setMaxInclusive((float) 3.4028235E38);
372     }
373     desc.setValidator(fieldValidator);
374     // -- _perSequence
375     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
376             java.lang.Boolean.TYPE, "_perSequence", "perSequence",
377             org.exolab.castor.xml.NodeType.Attribute);
378     handler = new org.exolab.castor.xml.XMLFieldHandler()
379     {
380       public java.lang.Object getValue(java.lang.Object object)
381               throws IllegalStateException
382       {
383         AnnotationColourScheme target = (AnnotationColourScheme) object;
384         if (!target.hasPerSequence())
385         {
386           return null;
387         }
388         return (target.getPerSequence() ? java.lang.Boolean.TRUE
389                 : java.lang.Boolean.FALSE);
390       }
391
392       public void setValue(java.lang.Object object, java.lang.Object value)
393               throws IllegalStateException, IllegalArgumentException
394       {
395         try
396         {
397           AnnotationColourScheme target = (AnnotationColourScheme) object;
398           // if null, use delete method for optional primitives
399           if (value == null)
400           {
401             target.deletePerSequence();
402             return;
403           }
404           target.setPerSequence(((java.lang.Boolean) value).booleanValue());
405         } catch (java.lang.Exception ex)
406         {
407           throw new IllegalStateException(ex.toString());
408         }
409       }
410
411       public java.lang.Object newInstance(java.lang.Object parent)
412       {
413         return null;
414       }
415     };
416     desc.setHandler(handler);
417     desc.setMultivalued(false);
418     addFieldDescriptor(desc);
419
420     // -- validation code for: _perSequence
421     fieldValidator = new org.exolab.castor.xml.FieldValidator();
422     { // -- local scope
423       org.exolab.castor.xml.validators.BooleanValidator typeValidator;
424       typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
425       fieldValidator.setValidator(typeValidator);
426     }
427     desc.setValidator(fieldValidator);
428     // -- _predefinedColours
429     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
430             java.lang.Boolean.TYPE, "_predefinedColours",
431             "predefinedColours", org.exolab.castor.xml.NodeType.Attribute);
432     handler = new org.exolab.castor.xml.XMLFieldHandler()
433     {
434       public java.lang.Object getValue(java.lang.Object object)
435               throws IllegalStateException
436       {
437         AnnotationColourScheme target = (AnnotationColourScheme) object;
438         if (!target.hasPredefinedColours())
439         {
440           return null;
441         }
442         return (target.getPredefinedColours() ? java.lang.Boolean.TRUE
443                 : java.lang.Boolean.FALSE);
444       }
445
446       public void setValue(java.lang.Object object, java.lang.Object value)
447               throws IllegalStateException, IllegalArgumentException
448       {
449         try
450         {
451           AnnotationColourScheme target = (AnnotationColourScheme) object;
452           // if null, use delete method for optional primitives
453           if (value == null)
454           {
455             target.deletePredefinedColours();
456             return;
457           }
458           target.setPredefinedColours(((java.lang.Boolean) value)
459                   .booleanValue());
460         } catch (java.lang.Exception ex)
461         {
462           throw new IllegalStateException(ex.toString());
463         }
464       }
465
466       public java.lang.Object newInstance(java.lang.Object parent)
467       {
468         return null;
469       }
470     };
471     desc.setHandler(handler);
472     desc.setMultivalued(false);
473     addFieldDescriptor(desc);
474
475     // -- validation code for: _predefinedColours
476     fieldValidator = new org.exolab.castor.xml.FieldValidator();
477     { // -- local scope
478       org.exolab.castor.xml.validators.BooleanValidator typeValidator;
479       typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
480       fieldValidator.setValidator(typeValidator);
481     }
482     desc.setValidator(fieldValidator);
483     // -- initialize element descriptors
484
485   }
486
487   // -----------/
488   // - Methods -/
489   // -----------/
490
491   /**
492    * Method getAccessMode.
493    * 
494    * @return the access mode specified for this class.
495    */
496   public org.exolab.castor.mapping.AccessMode getAccessMode()
497   {
498     return null;
499   }
500
501   /**
502    * Method getIdentity.
503    * 
504    * @return the identity field, null if this class has no identity.
505    */
506   public org.exolab.castor.mapping.FieldDescriptor getIdentity()
507   {
508     return super.getIdentity();
509   }
510
511   /**
512    * Method getJavaClass.
513    * 
514    * @return the Java class represented by this descriptor.
515    */
516   public java.lang.Class getJavaClass()
517   {
518     return jalview.schemabinding.version2.AnnotationColourScheme.class;
519   }
520
521   /**
522    * Method getNameSpacePrefix.
523    * 
524    * @return the namespace prefix to use when marshaling as XML.
525    */
526   public java.lang.String getNameSpacePrefix()
527   {
528     return _nsPrefix;
529   }
530
531   /**
532    * Method getNameSpaceURI.
533    * 
534    * @return the namespace URI used when marshaling and unmarshaling as XML.
535    */
536   public java.lang.String getNameSpaceURI()
537   {
538     return _nsURI;
539   }
540
541   /**
542    * Method getValidator.
543    * 
544    * @return a specific validator for the class described by this
545    *         ClassDescriptor.
546    */
547   public org.exolab.castor.xml.TypeValidator getValidator()
548   {
549     return this;
550   }
551
552   /**
553    * Method getXMLName.
554    * 
555    * @return the XML Name for the Class being described.
556    */
557   public java.lang.String getXMLName()
558   {
559     return _xmlName;
560   }
561
562   /**
563    * Method isElementDefinition.
564    * 
565    * @return true if XML schema definition of this Class is that of a global
566    *         element or element with anonymous type definition.
567    */
568   public boolean isElementDefinition()
569   {
570     return _elementDefinition;
571   }
572
573 }