Clover icon

jalviewX

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

File TreeDescriptor.java

 

Coverage histogram

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

Code metrics

58
371
57
1
995
799
102
0.27
6.51
57
1.79

Classes

Class Line # Actions
TreeDescriptor 21 371 102 123
0.7469135574.7%
 

Contributing tests

No tests hitting this source file were found.

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.Tree;
15   
16    /**
17    * Class TreeDescriptor.
18    *
19    * @version $Revision$ $Date$
20    */
 
21    public class TreeDescriptor 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  16 toggle public TreeDescriptor()
54    {
55  16 super();
56  16 _nsURI = "www.jalview.org";
57  16 _xmlName = "tree";
58  16 _elementDefinition = true;
59   
60    // -- set grouping compositor
61  16 setCompositorAsSequence();
62  16 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
63  16 org.exolab.castor.mapping.FieldHandler handler = null;
64  16 org.exolab.castor.xml.FieldValidator fieldValidator = null;
65    // -- initialize attribute descriptors
66   
67    // -- _fontName
68  16 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
69    java.lang.String.class, "_fontName", "fontName",
70    org.exolab.castor.xml.NodeType.Attribute);
71  16 desc.setImmutable(true);
72  16 handler = new org.exolab.castor.xml.XMLFieldHandler()
73    {
 
74  4 toggle public java.lang.Object getValue(java.lang.Object object)
75    throws IllegalStateException
76    {
77  4 Tree target = (Tree) object;
78  4 return target.getFontName();
79    }
80   
 
81  12 toggle public void setValue(java.lang.Object object, java.lang.Object value)
82    throws IllegalStateException, IllegalArgumentException
83    {
84  12 try
85    {
86  12 Tree target = (Tree) object;
87  12 target.setFontName((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  16 desc.setHandler(handler);
100  16 desc.setMultivalued(false);
101  16 addFieldDescriptor(desc);
102   
103    // -- validation code for: _fontName
104  16 fieldValidator = new org.exolab.castor.xml.FieldValidator();
105    { // -- local scope
106  16 org.exolab.castor.xml.validators.StringValidator typeValidator;
107  16 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
108  16 fieldValidator.setValidator(typeValidator);
109  16 typeValidator.setWhiteSpace("preserve");
110    }
111  16 desc.setValidator(fieldValidator);
112    // -- _fontSize
113  16 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
114    java.lang.Integer.TYPE, "_fontSize", "fontSize",
115    org.exolab.castor.xml.NodeType.Attribute);
116  16 handler = new org.exolab.castor.xml.XMLFieldHandler()
117    {
 
118  4 toggle public java.lang.Object getValue(java.lang.Object object)
119    throws IllegalStateException
120    {
121  4 Tree target = (Tree) object;
122  4 if (!target.hasFontSize())
123    {
124  0 return null;
125    }
126  4 return new java.lang.Integer(target.getFontSize());
127    }
128   
 
129  12 toggle public void setValue(java.lang.Object object, java.lang.Object value)
130    throws IllegalStateException, IllegalArgumentException
131    {
132  12 try
133    {
134  12 Tree target = (Tree) object;
135    // if null, use delete method for optional primitives
136  12 if (value == null)
137    {
138  0 target.deleteFontSize();
139  0 return;
140    }
141  12 target.setFontSize(((java.lang.Integer) value).intValue());
142    } catch (java.lang.Exception ex)
143    {
144  0 throw new IllegalStateException(ex.toString());
145    }
146    }
147   
 
148  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
149    {
150  0 return null;
151    }
152    };
153  16 desc.setHandler(handler);
154  16 desc.setMultivalued(false);
155  16 addFieldDescriptor(desc);
156   
157    // -- validation code for: _fontSize
158  16 fieldValidator = new org.exolab.castor.xml.FieldValidator();
159    { // -- local scope
160  16 org.exolab.castor.xml.validators.IntValidator typeValidator;
161  16 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
162  16 fieldValidator.setValidator(typeValidator);
163  16 typeValidator.setMinInclusive(-2147483648);
164  16 typeValidator.setMaxInclusive(2147483647);
165    }
166  16 desc.setValidator(fieldValidator);
167    // -- _fontStyle
168  16 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
169    java.lang.Integer.TYPE, "_fontStyle", "fontStyle",
170    org.exolab.castor.xml.NodeType.Attribute);
171  16 handler = new org.exolab.castor.xml.XMLFieldHandler()
172    {
 
173  4 toggle public java.lang.Object getValue(java.lang.Object object)
174    throws IllegalStateException
175    {
176  4 Tree target = (Tree) object;
177  4 if (!target.hasFontStyle())
178    {
179  0 return null;
180    }
181  4 return new java.lang.Integer(target.getFontStyle());
182    }
183   
 
184  12 toggle public void setValue(java.lang.Object object, java.lang.Object value)
185    throws IllegalStateException, IllegalArgumentException
186    {
187  12 try
188    {
189  12 Tree target = (Tree) object;
190    // if null, use delete method for optional primitives
191  12 if (value == null)
192    {
193  0 target.deleteFontStyle();
194  0 return;
195    }
196  12 target.setFontStyle(((java.lang.Integer) value).intValue());
197    } catch (java.lang.Exception ex)
198    {
199  0 throw new IllegalStateException(ex.toString());
200    }
201    }
202   
 
203  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
204    {
205  0 return null;
206    }
207    };
208  16 desc.setHandler(handler);
209  16 desc.setMultivalued(false);
210  16 addFieldDescriptor(desc);
211   
212    // -- validation code for: _fontStyle
213  16 fieldValidator = new org.exolab.castor.xml.FieldValidator();
214    { // -- local scope
215  16 org.exolab.castor.xml.validators.IntValidator typeValidator;
216  16 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
217  16 fieldValidator.setValidator(typeValidator);
218  16 typeValidator.setMinInclusive(-2147483648);
219  16 typeValidator.setMaxInclusive(2147483647);
220    }
221  16 desc.setValidator(fieldValidator);
222    // -- _threshold
223  16 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
224    java.lang.Float.TYPE, "_threshold", "threshold",
225    org.exolab.castor.xml.NodeType.Attribute);
226  16 handler = new org.exolab.castor.xml.XMLFieldHandler()
227    {
 
228  4 toggle public java.lang.Object getValue(java.lang.Object object)
229    throws IllegalStateException
230    {
231  4 Tree target = (Tree) object;
232  4 if (!target.hasThreshold())
233    {
234  0 return null;
235    }
236  4 return new java.lang.Float(target.getThreshold());
237    }
238   
 
239  12 toggle public void setValue(java.lang.Object object, java.lang.Object value)
240    throws IllegalStateException, IllegalArgumentException
241    {
242  12 try
243    {
244  12 Tree target = (Tree) object;
245    // if null, use delete method for optional primitives
246  12 if (value == null)
247    {
248  0 target.deleteThreshold();
249  0 return;
250    }
251  12 target.setThreshold(((java.lang.Float) value).floatValue());
252    } catch (java.lang.Exception ex)
253    {
254  0 throw new IllegalStateException(ex.toString());
255    }
256    }
257   
 
258  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
259    {
260  0 return null;
261    }
262    };
263  16 desc.setHandler(handler);
264  16 desc.setMultivalued(false);
265  16 addFieldDescriptor(desc);
266   
267    // -- validation code for: _threshold
268  16 fieldValidator = new org.exolab.castor.xml.FieldValidator();
269    { // -- local scope
270  16 org.exolab.castor.xml.validators.FloatValidator typeValidator;
271  16 typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
272  16 fieldValidator.setValidator(typeValidator);
273  16 typeValidator.setMinInclusive((float) -3.4028235E38);
274  16 typeValidator.setMaxInclusive((float) 3.4028235E38);
275    }
276  16 desc.setValidator(fieldValidator);
277    // -- _showBootstrap
278  16 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
279    java.lang.Boolean.TYPE, "_showBootstrap", "showBootstrap",
280    org.exolab.castor.xml.NodeType.Attribute);
281  16 handler = new org.exolab.castor.xml.XMLFieldHandler()
282    {
 
283  4 toggle public java.lang.Object getValue(java.lang.Object object)
284    throws IllegalStateException
285    {
286  4 Tree target = (Tree) object;
287  4 if (!target.hasShowBootstrap())
288    {
289  0 return null;
290    }
291  4 return (target.getShowBootstrap() ? java.lang.Boolean.TRUE
292    : java.lang.Boolean.FALSE);
293    }
294   
 
295  12 toggle public void setValue(java.lang.Object object, java.lang.Object value)
296    throws IllegalStateException, IllegalArgumentException
297    {
298  12 try
299    {
300  12 Tree target = (Tree) object;
301    // if null, use delete method for optional primitives
302  12 if (value == null)
303    {
304  0 target.deleteShowBootstrap();
305  0 return;
306    }
307  12 target.setShowBootstrap(((java.lang.Boolean) value)
308    .booleanValue());
309    } catch (java.lang.Exception ex)
310    {
311  0 throw new IllegalStateException(ex.toString());
312    }
313    }
314   
 
315  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
316    {
317  0 return null;
318    }
319    };
320  16 desc.setHandler(handler);
321  16 desc.setMultivalued(false);
322  16 addFieldDescriptor(desc);
323   
324    // -- validation code for: _showBootstrap
325  16 fieldValidator = new org.exolab.castor.xml.FieldValidator();
326    { // -- local scope
327  16 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
328  16 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
329  16 fieldValidator.setValidator(typeValidator);
330    }
331  16 desc.setValidator(fieldValidator);
332    // -- _showDistances
333  16 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
334    java.lang.Boolean.TYPE, "_showDistances", "showDistances",
335    org.exolab.castor.xml.NodeType.Attribute);
336  16 handler = new org.exolab.castor.xml.XMLFieldHandler()
337    {
 
338  4 toggle public java.lang.Object getValue(java.lang.Object object)
339    throws IllegalStateException
340    {
341  4 Tree target = (Tree) object;
342  4 if (!target.hasShowDistances())
343    {
344  0 return null;
345    }
346  4 return (target.getShowDistances() ? java.lang.Boolean.TRUE
347    : java.lang.Boolean.FALSE);
348    }
349   
 
350  12 toggle public void setValue(java.lang.Object object, java.lang.Object value)
351    throws IllegalStateException, IllegalArgumentException
352    {
353  12 try
354    {
355  12 Tree target = (Tree) object;
356    // if null, use delete method for optional primitives
357  12 if (value == null)
358    {
359  0 target.deleteShowDistances();
360  0 return;
361    }
362  12 target.setShowDistances(((java.lang.Boolean) value)
363    .booleanValue());
364    } catch (java.lang.Exception ex)
365    {
366  0 throw new IllegalStateException(ex.toString());
367    }
368    }
369   
 
370  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
371    {
372  0 return null;
373    }
374    };
375  16 desc.setHandler(handler);
376  16 desc.setMultivalued(false);
377  16 addFieldDescriptor(desc);
378   
379    // -- validation code for: _showDistances
380  16 fieldValidator = new org.exolab.castor.xml.FieldValidator();
381    { // -- local scope
382  16 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
383  16 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
384  16 fieldValidator.setValidator(typeValidator);
385    }
386  16 desc.setValidator(fieldValidator);
387    // -- _markUnlinked
388  16 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
389    java.lang.Boolean.TYPE, "_markUnlinked", "markUnlinked",
390    org.exolab.castor.xml.NodeType.Attribute);
391  16 handler = new org.exolab.castor.xml.XMLFieldHandler()
392    {
 
393  4 toggle public java.lang.Object getValue(java.lang.Object object)
394    throws IllegalStateException
395    {
396  4 Tree target = (Tree) object;
397  4 if (!target.hasMarkUnlinked())
398    {
399  0 return null;
400    }
401  4 return (target.getMarkUnlinked() ? java.lang.Boolean.TRUE
402    : java.lang.Boolean.FALSE);
403    }
404   
 
405  12 toggle public void setValue(java.lang.Object object, java.lang.Object value)
406    throws IllegalStateException, IllegalArgumentException
407    {
408  12 try
409    {
410  12 Tree target = (Tree) object;
411    // if null, use delete method for optional primitives
412  12 if (value == null)
413    {
414  0 target.deleteMarkUnlinked();
415  0 return;
416    }
417  12 target.setMarkUnlinked(((java.lang.Boolean) value).booleanValue());
418    } catch (java.lang.Exception ex)
419    {
420  0 throw new IllegalStateException(ex.toString());
421    }
422    }
423   
 
424  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
425    {
426  0 return null;
427    }
428    };
429  16 desc.setHandler(handler);
430  16 desc.setMultivalued(false);
431  16 addFieldDescriptor(desc);
432   
433    // -- validation code for: _markUnlinked
434  16 fieldValidator = new org.exolab.castor.xml.FieldValidator();
435    { // -- local scope
436  16 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
437  16 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
438  16 fieldValidator.setValidator(typeValidator);
439    }
440  16 desc.setValidator(fieldValidator);
441    // -- _fitToWindow
442  16 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
443    java.lang.Boolean.TYPE, "_fitToWindow", "fitToWindow",
444    org.exolab.castor.xml.NodeType.Attribute);
445  16 handler = new org.exolab.castor.xml.XMLFieldHandler()
446    {
 
447  4 toggle public java.lang.Object getValue(java.lang.Object object)
448    throws IllegalStateException
449    {
450  4 Tree target = (Tree) object;
451  4 if (!target.hasFitToWindow())
452    {
453  0 return null;
454    }
455  4 return (target.getFitToWindow() ? java.lang.Boolean.TRUE
456    : java.lang.Boolean.FALSE);
457    }
458   
 
459  12 toggle public void setValue(java.lang.Object object, java.lang.Object value)
460    throws IllegalStateException, IllegalArgumentException
461    {
462  12 try
463    {
464  12 Tree target = (Tree) object;
465    // if null, use delete method for optional primitives
466  12 if (value == null)
467    {
468  0 target.deleteFitToWindow();
469  0 return;
470    }
471  12 target.setFitToWindow(((java.lang.Boolean) value).booleanValue());
472    } catch (java.lang.Exception ex)
473    {
474  0 throw new IllegalStateException(ex.toString());
475    }
476    }
477   
 
478  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
479    {
480  0 return null;
481    }
482    };
483  16 desc.setHandler(handler);
484  16 desc.setMultivalued(false);
485  16 addFieldDescriptor(desc);
486   
487    // -- validation code for: _fitToWindow
488  16 fieldValidator = new org.exolab.castor.xml.FieldValidator();
489    { // -- local scope
490  16 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
491  16 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
492  16 fieldValidator.setValidator(typeValidator);
493    }
494  16 desc.setValidator(fieldValidator);
495    // -- _currentTree
496  16 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
497    java.lang.Boolean.TYPE, "_currentTree", "currentTree",
498    org.exolab.castor.xml.NodeType.Attribute);
499  16 handler = new org.exolab.castor.xml.XMLFieldHandler()
500    {
 
501  4 toggle public java.lang.Object getValue(java.lang.Object object)
502    throws IllegalStateException
503    {
504  4 Tree target = (Tree) object;
505  4 if (!target.hasCurrentTree())
506    {
507  0 return null;
508    }
509  4 return (target.getCurrentTree() ? java.lang.Boolean.TRUE
510    : java.lang.Boolean.FALSE);
511    }
512   
 
513  12 toggle public void setValue(java.lang.Object object, java.lang.Object value)
514    throws IllegalStateException, IllegalArgumentException
515    {
516  12 try
517    {
518  12 Tree target = (Tree) object;
519    // if null, use delete method for optional primitives
520  12 if (value == null)
521    {
522  0 target.deleteCurrentTree();
523  0 return;
524    }
525  12 target.setCurrentTree(((java.lang.Boolean) value).booleanValue());
526    } catch (java.lang.Exception ex)
527    {
528  0 throw new IllegalStateException(ex.toString());
529    }
530    }
531   
 
532  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
533    {
534  0 return null;
535    }
536    };
537  16 desc.setHandler(handler);
538  16 desc.setMultivalued(false);
539  16 addFieldDescriptor(desc);
540   
541    // -- validation code for: _currentTree
542  16 fieldValidator = new org.exolab.castor.xml.FieldValidator();
543    { // -- local scope
544  16 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
545  16 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
546  16 fieldValidator.setValidator(typeValidator);
547    }
548  16 desc.setValidator(fieldValidator);
549    // -- _id
550  16 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
551    java.lang.String.class, "_id", "id",
552    org.exolab.castor.xml.NodeType.Attribute);
553  16 super.setIdentity(desc);
554  16 handler = new org.exolab.castor.xml.XMLFieldHandler()
555    {
 
556  4 toggle public java.lang.Object getValue(java.lang.Object object)
557    throws IllegalStateException
558    {
559  4 Tree target = (Tree) object;
560  4 return target.getId();
561    }
562   
 
563  0 toggle public void setValue(java.lang.Object object, java.lang.Object value)
564    throws IllegalStateException, IllegalArgumentException
565    {
566  0 try
567    {
568  0 Tree target = (Tree) object;
569  0 target.setId((java.lang.String) value);
570    } catch (java.lang.Exception ex)
571    {
572  0 throw new IllegalStateException(ex.toString());
573    }
574    }
575   
 
576  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
577    {
578  0 return new java.lang.String();
579    }
580    };
581  16 desc.setHandler(handler);
582  16 desc.setMultivalued(false);
583  16 addFieldDescriptor(desc);
584   
585    // -- validation code for: _id
586  16 fieldValidator = new org.exolab.castor.xml.FieldValidator();
587    { // -- local scope
588  16 org.exolab.castor.xml.validators.IdValidator typeValidator;
589  16 typeValidator = new org.exolab.castor.xml.validators.IdValidator();
590  16 fieldValidator.setValidator(typeValidator);
591    }
592  16 desc.setValidator(fieldValidator);
593    // -- _width
594  16 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
595    java.lang.Integer.TYPE, "_width", "width",
596    org.exolab.castor.xml.NodeType.Attribute);
597  16 handler = new org.exolab.castor.xml.XMLFieldHandler()
598    {
 
599  4 toggle public java.lang.Object getValue(java.lang.Object object)
600    throws IllegalStateException
601    {
602  4 Tree target = (Tree) object;
603  4 if (!target.hasWidth())
604    {
605  0 return null;
606    }
607  4 return new java.lang.Integer(target.getWidth());
608    }
609   
 
610  12 toggle public void setValue(java.lang.Object object, java.lang.Object value)
611    throws IllegalStateException, IllegalArgumentException
612    {
613  12 try
614    {
615  12 Tree target = (Tree) object;
616    // if null, use delete method for optional primitives
617  12 if (value == null)
618    {
619  0 target.deleteWidth();
620  0 return;
621    }
622  12 target.setWidth(((java.lang.Integer) value).intValue());
623    } catch (java.lang.Exception ex)
624    {
625  0 throw new IllegalStateException(ex.toString());
626    }
627    }
628   
 
629  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
630    {
631  0 return null;
632    }
633    };
634  16 desc.setHandler(handler);
635  16 desc.setMultivalued(false);
636  16 addFieldDescriptor(desc);
637   
638    // -- validation code for: _width
639  16 fieldValidator = new org.exolab.castor.xml.FieldValidator();
640    { // -- local scope
641  16 org.exolab.castor.xml.validators.IntValidator typeValidator;
642  16 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
643  16 fieldValidator.setValidator(typeValidator);
644  16 typeValidator.setMinInclusive(-2147483648);
645  16 typeValidator.setMaxInclusive(2147483647);
646    }
647  16 desc.setValidator(fieldValidator);
648    // -- _height
649  16 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
650    java.lang.Integer.TYPE, "_height", "height",
651    org.exolab.castor.xml.NodeType.Attribute);
652  16 handler = new org.exolab.castor.xml.XMLFieldHandler()
653    {
 
654  4 toggle public java.lang.Object getValue(java.lang.Object object)
655    throws IllegalStateException
656    {
657  4 Tree target = (Tree) object;
658  4 if (!target.hasHeight())
659    {
660  0 return null;
661    }
662  4 return new java.lang.Integer(target.getHeight());
663    }
664   
 
665  12 toggle public void setValue(java.lang.Object object, java.lang.Object value)
666    throws IllegalStateException, IllegalArgumentException
667    {
668  12 try
669    {
670  12 Tree target = (Tree) object;
671    // if null, use delete method for optional primitives
672  12 if (value == null)
673    {
674  0 target.deleteHeight();
675  0 return;
676    }
677  12 target.setHeight(((java.lang.Integer) value).intValue());
678    } catch (java.lang.Exception ex)
679    {
680  0 throw new IllegalStateException(ex.toString());
681    }
682    }
683   
 
684  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
685    {
686  0 return null;
687    }
688    };
689  16 desc.setHandler(handler);
690  16 desc.setMultivalued(false);
691  16 addFieldDescriptor(desc);
692   
693    // -- validation code for: _height
694  16 fieldValidator = new org.exolab.castor.xml.FieldValidator();
695    { // -- local scope
696  16 org.exolab.castor.xml.validators.IntValidator typeValidator;
697  16 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
698  16 fieldValidator.setValidator(typeValidator);
699  16 typeValidator.setMinInclusive(-2147483648);
700  16 typeValidator.setMaxInclusive(2147483647);
701    }
702  16 desc.setValidator(fieldValidator);
703    // -- _xpos
704  16 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
705    java.lang.Integer.TYPE, "_xpos", "xpos",
706    org.exolab.castor.xml.NodeType.Attribute);
707  16 handler = new org.exolab.castor.xml.XMLFieldHandler()
708    {
 
709  4 toggle public java.lang.Object getValue(java.lang.Object object)
710    throws IllegalStateException
711    {
712  4 Tree target = (Tree) object;
713  4 if (!target.hasXpos())
714    {
715  0 return null;
716    }
717  4 return new java.lang.Integer(target.getXpos());
718    }
719   
 
720  12 toggle public void setValue(java.lang.Object object, java.lang.Object value)
721    throws IllegalStateException, IllegalArgumentException
722    {
723  12 try
724    {
725  12 Tree target = (Tree) object;
726    // if null, use delete method for optional primitives
727  12 if (value == null)
728    {
729  0 target.deleteXpos();
730  0 return;
731    }
732  12 target.setXpos(((java.lang.Integer) value).intValue());
733    } catch (java.lang.Exception ex)
734    {
735  0 throw new IllegalStateException(ex.toString());
736    }
737    }
738   
 
739  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
740    {
741  0 return null;
742    }
743    };
744  16 desc.setHandler(handler);
745  16 desc.setMultivalued(false);
746  16 addFieldDescriptor(desc);
747   
748    // -- validation code for: _xpos
749  16 fieldValidator = new org.exolab.castor.xml.FieldValidator();
750    { // -- local scope
751  16 org.exolab.castor.xml.validators.IntValidator typeValidator;
752  16 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
753  16 fieldValidator.setValidator(typeValidator);
754  16 typeValidator.setMinInclusive(-2147483648);
755  16 typeValidator.setMaxInclusive(2147483647);
756    }
757  16 desc.setValidator(fieldValidator);
758    // -- _ypos
759  16 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
760    java.lang.Integer.TYPE, "_ypos", "ypos",
761    org.exolab.castor.xml.NodeType.Attribute);
762  16 handler = new org.exolab.castor.xml.XMLFieldHandler()
763    {
 
764  4 toggle public java.lang.Object getValue(java.lang.Object object)
765    throws IllegalStateException
766    {
767  4 Tree target = (Tree) object;
768  4 if (!target.hasYpos())
769    {
770  0 return null;
771    }
772  4 return new java.lang.Integer(target.getYpos());
773    }
774   
 
775  12 toggle public void setValue(java.lang.Object object, java.lang.Object value)
776    throws IllegalStateException, IllegalArgumentException
777    {
778  12 try
779    {
780  12 Tree target = (Tree) object;
781    // if null, use delete method for optional primitives
782  12 if (value == null)
783    {
784  0 target.deleteYpos();
785  0 return;
786    }
787  12 target.setYpos(((java.lang.Integer) value).intValue());
788    } catch (java.lang.Exception ex)
789    {
790  0 throw new IllegalStateException(ex.toString());
791    }
792    }
793   
 
794  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
795    {
796  0 return null;
797    }
798    };
799  16 desc.setHandler(handler);
800  16 desc.setMultivalued(false);
801  16 addFieldDescriptor(desc);
802   
803    // -- validation code for: _ypos
804  16 fieldValidator = new org.exolab.castor.xml.FieldValidator();
805    { // -- local scope
806  16 org.exolab.castor.xml.validators.IntValidator typeValidator;
807  16 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
808  16 fieldValidator.setValidator(typeValidator);
809  16 typeValidator.setMinInclusive(-2147483648);
810  16 typeValidator.setMaxInclusive(2147483647);
811    }
812  16 desc.setValidator(fieldValidator);
813    // -- initialize element descriptors
814   
815    // -- _title
816  16 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
817    java.lang.String.class, "_title", "title",
818    org.exolab.castor.xml.NodeType.Element);
819  16 desc.setImmutable(true);
820  16 handler = new org.exolab.castor.xml.XMLFieldHandler()
821    {
 
822  4 toggle public java.lang.Object getValue(java.lang.Object object)
823    throws IllegalStateException
824    {
825  4 Tree target = (Tree) object;
826  4 return target.getTitle();
827    }
828   
 
829  12 toggle public void setValue(java.lang.Object object, java.lang.Object value)
830    throws IllegalStateException, IllegalArgumentException
831    {
832  12 try
833    {
834  12 Tree target = (Tree) object;
835  12 target.setTitle((java.lang.String) value);
836    } catch (java.lang.Exception ex)
837    {
838  0 throw new IllegalStateException(ex.toString());
839    }
840    }
841   
 
842  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
843    {
844  0 return null;
845    }
846    };
847  16 desc.setHandler(handler);
848  16 desc.setNameSpaceURI("www.jalview.org");
849  16 desc.setMultivalued(false);
850  16 addFieldDescriptor(desc);
851   
852    // -- validation code for: _title
853  16 fieldValidator = new org.exolab.castor.xml.FieldValidator();
854    { // -- local scope
855  16 org.exolab.castor.xml.validators.StringValidator typeValidator;
856  16 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
857  16 fieldValidator.setValidator(typeValidator);
858  16 typeValidator.setWhiteSpace("preserve");
859    }
860  16 desc.setValidator(fieldValidator);
861    // -- _newick
862  16 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
863    java.lang.String.class, "_newick", "newick",
864    org.exolab.castor.xml.NodeType.Element);
865  16 desc.setImmutable(true);
866  16 handler = new org.exolab.castor.xml.XMLFieldHandler()
867    {
 
868  4 toggle public java.lang.Object getValue(java.lang.Object object)
869    throws IllegalStateException
870    {
871  4 Tree target = (Tree) object;
872  4 return target.getNewick();
873    }
874   
 
875  12 toggle public void setValue(java.lang.Object object, java.lang.Object value)
876    throws IllegalStateException, IllegalArgumentException
877    {
878  12 try
879    {
880  12 Tree target = (Tree) object;
881  12 target.setNewick((java.lang.String) value);
882    } catch (java.lang.Exception ex)
883    {
884  0 throw new IllegalStateException(ex.toString());
885    }
886    }
887   
 
888  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
889    {
890  0 return null;
891    }
892    };
893  16 desc.setHandler(handler);
894  16 desc.setNameSpaceURI("www.jalview.org");
895  16 desc.setMultivalued(false);
896  16 addFieldDescriptor(desc);
897   
898    // -- validation code for: _newick
899  16 fieldValidator = new org.exolab.castor.xml.FieldValidator();
900    { // -- local scope
901  16 org.exolab.castor.xml.validators.StringValidator typeValidator;
902  16 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
903  16 fieldValidator.setValidator(typeValidator);
904  16 typeValidator.setWhiteSpace("preserve");
905    }
906  16 desc.setValidator(fieldValidator);
907    }
908   
909    // -----------/
910    // - Methods -/
911    // -----------/
912   
913    /**
914    * Method getAccessMode.
915    *
916    * @return the access mode specified for this class.
917    */
 
918  0 toggle public org.exolab.castor.mapping.AccessMode getAccessMode()
919    {
920  0 return null;
921    }
922   
923    /**
924    * Method getIdentity.
925    *
926    * @return the identity field, null if this class has no identity.
927    */
 
928  184 toggle public org.exolab.castor.mapping.FieldDescriptor getIdentity()
929    {
930  184 return super.getIdentity();
931    }
932   
933    /**
934    * Method getJavaClass.
935    *
936    * @return the Java class represented by this descriptor.
937    */
 
938  14 toggle public java.lang.Class getJavaClass()
939    {
940  14 return jalview.schemabinding.version2.Tree.class;
941    }
942   
943    /**
944    * Method getNameSpacePrefix.
945    *
946    * @return the namespace prefix to use when marshaling as XML.
947    */
 
948  2 toggle public java.lang.String getNameSpacePrefix()
949    {
950  2 return _nsPrefix;
951    }
952   
953    /**
954    * Method getNameSpaceURI.
955    *
956    * @return the namespace URI used when marshaling and unmarshaling as XML.
957    */
 
958  0 toggle public java.lang.String getNameSpaceURI()
959    {
960  0 return _nsURI;
961    }
962   
963    /**
964    * Method getValidator.
965    *
966    * @return a specific validator for the class described by this
967    * ClassDescriptor.
968    */
 
969  2 toggle public org.exolab.castor.xml.TypeValidator getValidator()
970    {
971  2 return this;
972    }
973   
974    /**
975    * Method getXMLName.
976    *
977    * @return the XML Name for the Class being described.
978    */
 
979  32 toggle public java.lang.String getXMLName()
980    {
981  32 return _xmlName;
982    }
983   
984    /**
985    * Method isElementDefinition.
986    *
987    * @return true if XML schema definition of this Class is that of a global
988    * element or element with anonymous type definition.
989    */
 
990  0 toggle public boolean isElementDefinition()
991    {
992  0 return _elementDefinition;
993    }
994   
995    }