Clover icon

jalviewX

  1. Project Clover database Wed Oct 31 2018 15:13:58 GMT
  2. Package jalview.schemabinding.version2.descriptors

File SettingDescriptor.java

 

Coverage histogram

../../../../img/srcFileCovDistChart8.png
19% of files have more coverage

Code metrics

46
330
52
1
905
718
90
0.27
6.35
52
1.73

Classes

Class Line # Actions
SettingDescriptor 21 330 90 86
0.799065479.9%
 

Contributing tests

This file is covered by 9 tests. .

Source view

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.Setting;
15   
16    /**
17    * Class SettingDescriptor.
18    *
19    * @version $Revision$ $Date$
20    */
 
21    public class SettingDescriptor
22    extends 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  1669 toggle public SettingDescriptor()
54    {
55  1669 super();
56  1669 _nsURI = "www.jalview.org";
57  1669 _xmlName = "setting";
58  1669 _elementDefinition = true;
59   
60    // -- set grouping compositor
61  1669 setCompositorAsSequence();
62  1669 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
63  1669 org.exolab.castor.mapping.FieldHandler handler = null;
64  1669 org.exolab.castor.xml.FieldValidator fieldValidator = null;
65    // -- initialize attribute descriptors
66   
67    // -- _type
68  1669 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
69    java.lang.String.class, "_type", "type",
70    org.exolab.castor.xml.NodeType.Attribute);
71  1669 desc.setImmutable(true);
72  1669 handler = new org.exolab.castor.xml.XMLFieldHandler()
73    {
 
74  426 toggle public java.lang.Object getValue(java.lang.Object object)
75    throws IllegalStateException
76    {
77  426 Setting target = (Setting) object;
78  426 return target.getType();
79    }
80   
 
81  1243 toggle public void setValue(java.lang.Object object, java.lang.Object value)
82    throws IllegalStateException, IllegalArgumentException
83    {
84  1243 try
85    {
86  1243 Setting target = (Setting) object;
87  1243 target.setType((java.lang.String) value);
88    } catch (java.lang.Exception ex)
89    {
90  0 throw new IllegalStateException(ex.toString());
91    }
92    }
93   
 
94  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
95    {
96  0 return null;
97    }
98    };
99  1669 desc.setHandler(handler);
100  1669 desc.setRequired(true);
101  1669 desc.setMultivalued(false);
102  1669 addFieldDescriptor(desc);
103   
104    // -- validation code for: _type
105  1669 fieldValidator = new org.exolab.castor.xml.FieldValidator();
106  1669 fieldValidator.setMinOccurs(1);
107    { // -- local scope
108  1669 org.exolab.castor.xml.validators.StringValidator typeValidator;
109  1669 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
110  1669 fieldValidator.setValidator(typeValidator);
111  1669 typeValidator.setWhiteSpace("preserve");
112    }
113  1669 desc.setValidator(fieldValidator);
114    // -- _colour
115  1669 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
116    java.lang.Integer.TYPE, "_colour", "colour",
117    org.exolab.castor.xml.NodeType.Attribute);
118  1669 handler = new org.exolab.castor.xml.XMLFieldHandler()
119    {
 
120  426 toggle public java.lang.Object getValue(java.lang.Object object)
121    throws IllegalStateException
122    {
123  426 Setting target = (Setting) object;
124  426 if (!target.hasColour())
125    {
126  0 return null;
127    }
128  426 return new java.lang.Integer(target.getColour());
129    }
130   
 
131  1243 toggle public void setValue(java.lang.Object object, java.lang.Object value)
132    throws IllegalStateException, IllegalArgumentException
133    {
134  1243 try
135    {
136  1243 Setting target = (Setting) object;
137    // ignore null values for non optional primitives
138  1243 if (value == null)
139    {
140  0 return;
141    }
142   
143  1243 target.setColour(((java.lang.Integer) value).intValue());
144    } catch (java.lang.Exception ex)
145    {
146  0 throw new IllegalStateException(ex.toString());
147    }
148    }
149   
 
150  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
151    {
152  0 return null;
153    }
154    };
155  1669 desc.setHandler(handler);
156  1669 desc.setRequired(true);
157  1669 desc.setMultivalued(false);
158  1669 addFieldDescriptor(desc);
159   
160    // -- validation code for: _colour
161  1669 fieldValidator = new org.exolab.castor.xml.FieldValidator();
162  1669 fieldValidator.setMinOccurs(1);
163    { // -- local scope
164  1669 org.exolab.castor.xml.validators.IntValidator typeValidator;
165  1669 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
166  1669 fieldValidator.setValidator(typeValidator);
167  1669 typeValidator.setMinInclusive(-2147483648);
168  1669 typeValidator.setMaxInclusive(2147483647);
169    }
170  1669 desc.setValidator(fieldValidator);
171    // -- _display
172  1669 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
173    java.lang.Boolean.TYPE, "_display", "display",
174    org.exolab.castor.xml.NodeType.Attribute);
175  1669 handler = new org.exolab.castor.xml.XMLFieldHandler()
176    {
 
177  426 toggle public java.lang.Object getValue(java.lang.Object object)
178    throws IllegalStateException
179    {
180  426 Setting target = (Setting) object;
181  426 if (!target.hasDisplay())
182    {
183  0 return null;
184    }
185  426 return (target.getDisplay() ? java.lang.Boolean.TRUE
186    : java.lang.Boolean.FALSE);
187    }
188   
 
189  1243 toggle public void setValue(java.lang.Object object, java.lang.Object value)
190    throws IllegalStateException, IllegalArgumentException
191    {
192  1243 try
193    {
194  1243 Setting target = (Setting) object;
195    // ignore null values for non optional primitives
196  1243 if (value == null)
197    {
198  0 return;
199    }
200   
201  1243 target.setDisplay(((java.lang.Boolean) value).booleanValue());
202    } catch (java.lang.Exception ex)
203    {
204  0 throw new IllegalStateException(ex.toString());
205    }
206    }
207   
 
208  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
209    {
210  0 return null;
211    }
212    };
213  1669 desc.setHandler(handler);
214  1669 desc.setRequired(true);
215  1669 desc.setMultivalued(false);
216  1669 addFieldDescriptor(desc);
217   
218    // -- validation code for: _display
219  1669 fieldValidator = new org.exolab.castor.xml.FieldValidator();
220  1669 fieldValidator.setMinOccurs(1);
221    { // -- local scope
222  1669 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
223  1669 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
224  1669 fieldValidator.setValidator(typeValidator);
225    }
226  1669 desc.setValidator(fieldValidator);
227    // -- _order
228  1669 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
229    java.lang.Float.TYPE, "_order", "order",
230    org.exolab.castor.xml.NodeType.Attribute);
231  1669 handler = new org.exolab.castor.xml.XMLFieldHandler()
232    {
 
233  426 toggle public java.lang.Object getValue(java.lang.Object object)
234    throws IllegalStateException
235    {
236  426 Setting target = (Setting) object;
237  426 if (!target.hasOrder())
238    {
239  0 return null;
240    }
241  426 return new java.lang.Float(target.getOrder());
242    }
243   
 
244  1243 toggle public void setValue(java.lang.Object object, java.lang.Object value)
245    throws IllegalStateException, IllegalArgumentException
246    {
247  1243 try
248    {
249  1243 Setting target = (Setting) object;
250    // if null, use delete method for optional primitives
251  1243 if (value == null)
252    {
253  0 target.deleteOrder();
254  0 return;
255    }
256  1243 target.setOrder(((java.lang.Float) value).floatValue());
257    } catch (java.lang.Exception ex)
258    {
259  0 throw new IllegalStateException(ex.toString());
260    }
261    }
262   
 
263  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
264    {
265  0 return null;
266    }
267    };
268  1669 desc.setHandler(handler);
269  1669 desc.setMultivalued(false);
270  1669 addFieldDescriptor(desc);
271   
272    // -- validation code for: _order
273  1669 fieldValidator = new org.exolab.castor.xml.FieldValidator();
274    { // -- local scope
275  1669 org.exolab.castor.xml.validators.FloatValidator typeValidator;
276  1669 typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
277  1669 fieldValidator.setValidator(typeValidator);
278  1669 typeValidator.setMinInclusive((float) -3.4028235E38);
279  1669 typeValidator.setMaxInclusive((float) 3.4028235E38);
280    }
281  1669 desc.setValidator(fieldValidator);
282    // -- _mincolour
283  1669 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
284    java.lang.Integer.TYPE, "_mincolour", "mincolour",
285    org.exolab.castor.xml.NodeType.Attribute);
286  1669 handler = new org.exolab.castor.xml.XMLFieldHandler()
287    {
 
288  426 toggle public java.lang.Object getValue(java.lang.Object object)
289    throws IllegalStateException
290    {
291  426 Setting target = (Setting) object;
292  426 if (!target.hasMincolour())
293    {
294  418 return null;
295    }
296  8 return new java.lang.Integer(target.getMincolour());
297    }
298   
 
299  4 toggle public void setValue(java.lang.Object object, java.lang.Object value)
300    throws IllegalStateException, IllegalArgumentException
301    {
302  4 try
303    {
304  4 Setting target = (Setting) object;
305    // if null, use delete method for optional primitives
306  4 if (value == null)
307    {
308  0 target.deleteMincolour();
309  0 return;
310    }
311  4 target.setMincolour(((java.lang.Integer) value).intValue());
312    } catch (java.lang.Exception ex)
313    {
314  0 throw new IllegalStateException(ex.toString());
315    }
316    }
317   
 
318  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
319    {
320  0 return null;
321    }
322    };
323  1669 desc.setHandler(handler);
324  1669 desc.setMultivalued(false);
325  1669 addFieldDescriptor(desc);
326   
327    // -- validation code for: _mincolour
328  1669 fieldValidator = new org.exolab.castor.xml.FieldValidator();
329    { // -- local scope
330  1669 org.exolab.castor.xml.validators.IntValidator typeValidator;
331  1669 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
332  1669 fieldValidator.setValidator(typeValidator);
333  1669 typeValidator.setMinInclusive(-2147483648);
334  1669 typeValidator.setMaxInclusive(2147483647);
335    }
336  1669 desc.setValidator(fieldValidator);
337    // -- _noValueColour
338  1669 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
339    jalview.schemabinding.version2.types.NoValueColour.class,
340    "_noValueColour", "noValueColour",
341    org.exolab.castor.xml.NodeType.Attribute);
342  1669 handler = new org.exolab.castor.xml.XMLFieldHandler()
343    {
 
344  426 toggle public java.lang.Object getValue(java.lang.Object object)
345    throws IllegalStateException
346    {
347  426 Setting target = (Setting) object;
348  426 return target.getNoValueColour();
349    }
350   
 
351  213 toggle public void setValue(java.lang.Object object, java.lang.Object value)
352    throws IllegalStateException, IllegalArgumentException
353    {
354  213 try
355    {
356  213 Setting target = (Setting) object;
357  213 target.setNoValueColour(
358    (jalview.schemabinding.version2.types.NoValueColour) value);
359    } catch (java.lang.Exception ex)
360    {
361  0 throw new IllegalStateException(ex.toString());
362    }
363    }
364   
 
365  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
366    {
367  0 return null;
368    }
369    };
370  1669 handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(
371    jalview.schemabinding.version2.types.NoValueColour.class,
372    handler);
373  1669 desc.setImmutable(true);
374  1669 desc.setHandler(handler);
375  1669 desc.setMultivalued(false);
376  1669 addFieldDescriptor(desc);
377   
378    // -- validation code for: _noValueColour
379  1669 fieldValidator = new org.exolab.castor.xml.FieldValidator();
380    { // -- local scope
381    }
382  1669 desc.setValidator(fieldValidator);
383    // -- _threshold
384  1669 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
385    java.lang.Float.TYPE, "_threshold", "threshold",
386    org.exolab.castor.xml.NodeType.Attribute);
387  1669 handler = new org.exolab.castor.xml.XMLFieldHandler()
388    {
 
389  426 toggle public java.lang.Object getValue(java.lang.Object object)
390    throws IllegalStateException
391    {
392  426 Setting target = (Setting) object;
393  426 if (!target.hasThreshold())
394    {
395  418 return null;
396    }
397  8 return new java.lang.Float(target.getThreshold());
398    }
399   
 
400  4 toggle public void setValue(java.lang.Object object, java.lang.Object value)
401    throws IllegalStateException, IllegalArgumentException
402    {
403  4 try
404    {
405  4 Setting target = (Setting) object;
406    // if null, use delete method for optional primitives
407  4 if (value == null)
408    {
409  0 target.deleteThreshold();
410  0 return;
411    }
412  4 target.setThreshold(((java.lang.Float) value).floatValue());
413    } catch (java.lang.Exception ex)
414    {
415  0 throw new IllegalStateException(ex.toString());
416    }
417    }
418   
 
419  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
420    {
421  0 return null;
422    }
423    };
424  1669 desc.setHandler(handler);
425  1669 desc.setMultivalued(false);
426  1669 addFieldDescriptor(desc);
427   
428    // -- validation code for: _threshold
429  1669 fieldValidator = new org.exolab.castor.xml.FieldValidator();
430    { // -- local scope
431  1669 org.exolab.castor.xml.validators.FloatValidator typeValidator;
432  1669 typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
433  1669 fieldValidator.setValidator(typeValidator);
434  1669 typeValidator.setMinInclusive((float) -3.4028235E38);
435  1669 typeValidator.setMaxInclusive((float) 3.4028235E38);
436    }
437  1669 desc.setValidator(fieldValidator);
438    // -- _threshstate
439  1669 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
440    java.lang.Integer.TYPE, "_threshstate", "threshstate",
441    org.exolab.castor.xml.NodeType.Attribute);
442  1669 handler = new org.exolab.castor.xml.XMLFieldHandler()
443    {
 
444  426 toggle public java.lang.Object getValue(java.lang.Object object)
445    throws IllegalStateException
446    {
447  426 Setting target = (Setting) object;
448  426 if (!target.hasThreshstate())
449    {
450  418 return null;
451    }
452  8 return new java.lang.Integer(target.getThreshstate());
453    }
454   
 
455  4 toggle public void setValue(java.lang.Object object, java.lang.Object value)
456    throws IllegalStateException, IllegalArgumentException
457    {
458  4 try
459    {
460  4 Setting target = (Setting) object;
461    // if null, use delete method for optional primitives
462  4 if (value == null)
463    {
464  0 target.deleteThreshstate();
465  0 return;
466    }
467  4 target.setThreshstate(((java.lang.Integer) value).intValue());
468    } catch (java.lang.Exception ex)
469    {
470  0 throw new IllegalStateException(ex.toString());
471    }
472    }
473   
 
474  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
475    {
476  0 return null;
477    }
478    };
479  1669 desc.setHandler(handler);
480  1669 desc.setMultivalued(false);
481  1669 addFieldDescriptor(desc);
482   
483    // -- validation code for: _threshstate
484  1669 fieldValidator = new org.exolab.castor.xml.FieldValidator();
485    { // -- local scope
486  1669 org.exolab.castor.xml.validators.IntValidator typeValidator;
487  1669 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
488  1669 fieldValidator.setValidator(typeValidator);
489  1669 typeValidator.setMinInclusive(-2147483648);
490  1669 typeValidator.setMaxInclusive(2147483647);
491    }
492  1669 desc.setValidator(fieldValidator);
493    // -- _max
494  1669 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
495    java.lang.Float.TYPE, "_max", "max",
496    org.exolab.castor.xml.NodeType.Attribute);
497  1669 handler = new org.exolab.castor.xml.XMLFieldHandler()
498    {
 
499  426 toggle public java.lang.Object getValue(java.lang.Object object)
500    throws IllegalStateException
501    {
502  426 Setting target = (Setting) object;
503  426 if (!target.hasMax())
504    {
505  418 return null;
506    }
507  8 return new java.lang.Float(target.getMax());
508    }
509   
 
510  4 toggle public void setValue(java.lang.Object object, java.lang.Object value)
511    throws IllegalStateException, IllegalArgumentException
512    {
513  4 try
514    {
515  4 Setting target = (Setting) object;
516    // if null, use delete method for optional primitives
517  4 if (value == null)
518    {
519  0 target.deleteMax();
520  0 return;
521    }
522  4 target.setMax(((java.lang.Float) value).floatValue());
523    } catch (java.lang.Exception ex)
524    {
525  0 throw new IllegalStateException(ex.toString());
526    }
527    }
528   
 
529  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
530    {
531  0 return null;
532    }
533    };
534  1669 desc.setHandler(handler);
535  1669 desc.setMultivalued(false);
536  1669 addFieldDescriptor(desc);
537   
538    // -- validation code for: _max
539  1669 fieldValidator = new org.exolab.castor.xml.FieldValidator();
540    { // -- local scope
541  1669 org.exolab.castor.xml.validators.FloatValidator typeValidator;
542  1669 typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
543  1669 fieldValidator.setValidator(typeValidator);
544  1669 typeValidator.setMinInclusive((float) -3.4028235E38);
545  1669 typeValidator.setMaxInclusive((float) 3.4028235E38);
546    }
547  1669 desc.setValidator(fieldValidator);
548    // -- _min
549  1669 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
550    java.lang.Float.TYPE, "_min", "min",
551    org.exolab.castor.xml.NodeType.Attribute);
552  1669 handler = new org.exolab.castor.xml.XMLFieldHandler()
553    {
 
554  426 toggle public java.lang.Object getValue(java.lang.Object object)
555    throws IllegalStateException
556    {
557  426 Setting target = (Setting) object;
558  426 if (!target.hasMin())
559    {
560  418 return null;
561    }
562  8 return new java.lang.Float(target.getMin());
563    }
564   
 
565  4 toggle public void setValue(java.lang.Object object, java.lang.Object value)
566    throws IllegalStateException, IllegalArgumentException
567    {
568  4 try
569    {
570  4 Setting target = (Setting) object;
571    // if null, use delete method for optional primitives
572  4 if (value == null)
573    {
574  0 target.deleteMin();
575  0 return;
576    }
577  4 target.setMin(((java.lang.Float) value).floatValue());
578    } catch (java.lang.Exception ex)
579    {
580  0 throw new IllegalStateException(ex.toString());
581    }
582    }
583   
 
584  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
585    {
586  0 return null;
587    }
588    };
589  1669 desc.setHandler(handler);
590  1669 desc.setMultivalued(false);
591  1669 addFieldDescriptor(desc);
592   
593    // -- validation code for: _min
594  1669 fieldValidator = new org.exolab.castor.xml.FieldValidator();
595    { // -- local scope
596  1669 org.exolab.castor.xml.validators.FloatValidator typeValidator;
597  1669 typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
598  1669 fieldValidator.setValidator(typeValidator);
599  1669 typeValidator.setMinInclusive((float) -3.4028235E38);
600  1669 typeValidator.setMaxInclusive((float) 3.4028235E38);
601    }
602  1669 desc.setValidator(fieldValidator);
603    // -- _colourByLabel
604  1669 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
605    java.lang.Boolean.TYPE, "_colourByLabel", "colourByLabel",
606    org.exolab.castor.xml.NodeType.Attribute);
607  1669 handler = new org.exolab.castor.xml.XMLFieldHandler()
608    {
 
609  426 toggle public java.lang.Object getValue(java.lang.Object object)
610    throws IllegalStateException
611    {
612  426 Setting target = (Setting) object;
613  426 if (!target.hasColourByLabel())
614    {
615  418 return null;
616    }
617  8 return (target.getColourByLabel() ? java.lang.Boolean.TRUE
618    : java.lang.Boolean.FALSE);
619    }
620   
 
621  4 toggle public void setValue(java.lang.Object object, java.lang.Object value)
622    throws IllegalStateException, IllegalArgumentException
623    {
624  4 try
625    {
626  4 Setting target = (Setting) object;
627    // if null, use delete method for optional primitives
628  4 if (value == null)
629    {
630  0 target.deleteColourByLabel();
631  0 return;
632    }
633  4 target.setColourByLabel(
634    ((java.lang.Boolean) value).booleanValue());
635    } catch (java.lang.Exception ex)
636    {
637  0 throw new IllegalStateException(ex.toString());
638    }
639    }
640   
 
641  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
642    {
643  0 return null;
644    }
645    };
646  1669 desc.setHandler(handler);
647  1669 desc.setMultivalued(false);
648  1669 addFieldDescriptor(desc);
649   
650    // -- validation code for: _colourByLabel
651  1669 fieldValidator = new org.exolab.castor.xml.FieldValidator();
652    { // -- local scope
653  1669 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
654  1669 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
655  1669 fieldValidator.setValidator(typeValidator);
656    }
657  1669 desc.setValidator(fieldValidator);
658    // -- _autoScale
659  1669 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
660    java.lang.Boolean.TYPE, "_autoScale", "autoScale",
661    org.exolab.castor.xml.NodeType.Attribute);
662  1669 handler = new org.exolab.castor.xml.XMLFieldHandler()
663    {
 
664  426 toggle public java.lang.Object getValue(java.lang.Object object)
665    throws IllegalStateException
666    {
667  426 Setting target = (Setting) object;
668  426 if (!target.hasAutoScale())
669    {
670  418 return null;
671    }
672  8 return (target.getAutoScale() ? java.lang.Boolean.TRUE
673    : java.lang.Boolean.FALSE);
674    }
675   
 
676  4 toggle public void setValue(java.lang.Object object, java.lang.Object value)
677    throws IllegalStateException, IllegalArgumentException
678    {
679  4 try
680    {
681  4 Setting target = (Setting) object;
682    // if null, use delete method for optional primitives
683  4 if (value == null)
684    {
685  0 target.deleteAutoScale();
686  0 return;
687    }
688  4 target.setAutoScale(((java.lang.Boolean) value).booleanValue());
689    } catch (java.lang.Exception ex)
690    {
691  0 throw new IllegalStateException(ex.toString());
692    }
693    }
694   
 
695  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
696    {
697  0 return null;
698    }
699    };
700  1669 desc.setHandler(handler);
701  1669 desc.setMultivalued(false);
702  1669 addFieldDescriptor(desc);
703   
704    // -- validation code for: _autoScale
705  1669 fieldValidator = new org.exolab.castor.xml.FieldValidator();
706    { // -- local scope
707  1669 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
708  1669 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
709  1669 fieldValidator.setValidator(typeValidator);
710    }
711  1669 desc.setValidator(fieldValidator);
712    // -- initialize element descriptors
713   
714    // -- _attributeNameList
715  1669 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
716    java.lang.String.class, "_attributeNameList", "attributeName",
717    org.exolab.castor.xml.NodeType.Element);
718  1669 desc.setImmutable(true);
719  1669 handler = new org.exolab.castor.xml.XMLFieldHandler()
720    {
 
721  426 toggle public java.lang.Object getValue(java.lang.Object object)
722    throws IllegalStateException
723    {
724  426 Setting target = (Setting) object;
725  426 return target.getAttributeName();
726    }
727   
 
728  3 toggle public void setValue(java.lang.Object object, java.lang.Object value)
729    throws IllegalStateException, IllegalArgumentException
730    {
731  3 try
732    {
733  3 Setting target = (Setting) object;
734  3 target.addAttributeName((java.lang.String) value);
735    } catch (java.lang.Exception ex)
736    {
737  0 throw new IllegalStateException(ex.toString());
738    }
739    }
740   
 
741  0 toggle public void resetValue(Object object)
742    throws IllegalStateException, IllegalArgumentException
743    {
744  0 try
745    {
746  0 Setting target = (Setting) object;
747  0 target.removeAllAttributeName();
748    } catch (java.lang.Exception ex)
749    {
750  0 throw new IllegalStateException(ex.toString());
751    }
752    }
753   
 
754  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
755    {
756  0 return null;
757    }
758    };
759  1669 desc.setHandler(handler);
760  1669 desc.setNameSpaceURI("www.jalview.org");
761  1669 desc.setMultivalued(true);
762  1669 addFieldDescriptor(desc);
763   
764    // -- validation code for: _attributeNameList
765  1669 fieldValidator = new org.exolab.castor.xml.FieldValidator();
766  1669 fieldValidator.setMinOccurs(0);
767  1669 fieldValidator.setMaxOccurs(2);
768    { // -- local scope
769  1669 org.exolab.castor.xml.validators.StringValidator typeValidator;
770  1669 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
771  1669 fieldValidator.setValidator(typeValidator);
772  1669 typeValidator.setWhiteSpace("preserve");
773    }
774  1669 desc.setValidator(fieldValidator);
775    // -- _matcherSet
776  1669 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
777    jalview.schemabinding.version2.MatcherSet.class, "_matcherSet",
778    "matcherSet", org.exolab.castor.xml.NodeType.Element);
779  1669 handler = new org.exolab.castor.xml.XMLFieldHandler()
780    {
 
781  426 toggle public java.lang.Object getValue(java.lang.Object object)
782    throws IllegalStateException
783    {
784  426 Setting target = (Setting) object;
785  426 return target.getMatcherSet();
786    }
787   
 
788  3 toggle public void setValue(java.lang.Object object, java.lang.Object value)
789    throws IllegalStateException, IllegalArgumentException
790    {
791  3 try
792    {
793  3 Setting target = (Setting) object;
794  3 target.setMatcherSet(
795    (jalview.schemabinding.version2.MatcherSet) value);
796    } catch (java.lang.Exception ex)
797    {
798  0 throw new IllegalStateException(ex.toString());
799    }
800    }
801   
 
802  3 toggle public java.lang.Object newInstance(java.lang.Object parent)
803    {
804  3 return new jalview.schemabinding.version2.MatcherSet();
805    }
806    };
807  1669 desc.setHandler(handler);
808  1669 desc.setNameSpaceURI("www.jalview.org");
809  1669 desc.setMultivalued(false);
810  1669 addFieldDescriptor(desc);
811   
812    // -- validation code for: _matcherSet
813  1669 fieldValidator = new org.exolab.castor.xml.FieldValidator();
814    { // -- local scope
815    }
816  1669 desc.setValidator(fieldValidator);
817    }
818   
819    // -----------/
820    // - Methods -/
821    // -----------/
822   
823    /**
824    * Method getAccessMode.
825    *
826    * @return the access mode specified for this class.
827    */
 
828  0 toggle public org.exolab.castor.mapping.AccessMode getAccessMode()
829    {
830  0 return null;
831    }
832   
833    /**
834    * Method getIdentity.
835    *
836    * @return the identity field, null if this class has no identity.
837    */
 
838  5429 toggle public org.exolab.castor.mapping.FieldDescriptor getIdentity()
839    {
840  5429 return super.getIdentity();
841    }
842   
843    /**
844    * Method getJavaClass.
845    *
846    * @return the Java class represented by this descriptor.
847    */
 
848  1456 toggle public java.lang.Class getJavaClass()
849    {
850  1456 return jalview.schemabinding.version2.Setting.class;
851    }
852   
853    /**
854    * Method getNameSpacePrefix.
855    *
856    * @return the namespace prefix to use when marshaling as XML.
857    */
 
858  213 toggle public java.lang.String getNameSpacePrefix()
859    {
860  213 return _nsPrefix;
861    }
862   
863    /**
864    * Method getNameSpaceURI.
865    *
866    * @return the namespace URI used when marshaling and unmarshaling as XML.
867    */
 
868  0 toggle public java.lang.String getNameSpaceURI()
869    {
870  0 return _nsURI;
871    }
872   
873    /**
874    * Method getValidator.
875    *
876    * @return a specific validator for the class described by this
877    * ClassDescriptor.
878    */
 
879  213 toggle public org.exolab.castor.xml.TypeValidator getValidator()
880    {
881  213 return this;
882    }
883   
884    /**
885    * Method getXMLName.
886    *
887    * @return the XML Name for the Class being described.
888    */
 
889  3338 toggle public java.lang.String getXMLName()
890    {
891  3338 return _xmlName;
892    }
893   
894    /**
895    * Method isElementDefinition.
896    *
897    * @return true if XML schema definition of this Class is that of a global
898    * element or element with anonymous type definition.
899    */
 
900  0 toggle public boolean isElementDefinition()
901    {
902  0 return _elementDefinition;
903    }
904   
905    }