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
5 * This file is part of Jalview.
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.
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.
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 *******************************************************************************/
19 * This class was automatically generated with
20 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
25 package jalview.schemabinding.version2.descriptors;
27 //---------------------------------/
28 //- Imported classes and packages -/
29 //---------------------------------/
31 import jalview.schemabinding.version2.Annotation;
34 * Class AnnotationDescriptor.
36 * @version $Revision$ $Date$
38 public class AnnotationDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
41 //--------------------------/
42 //- Class/Member Variables -/
43 //--------------------------/
46 * Field _elementDefinition.
48 private boolean _elementDefinition;
53 private java.lang.String _nsPrefix;
58 private java.lang.String _nsURI;
63 private java.lang.String _xmlName;
70 public AnnotationDescriptor() {
72 _nsURI = "www.vamsas.ac.uk/jalview/version2";
73 _xmlName = "Annotation";
74 _elementDefinition = true;
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
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
89 Annotation target = (Annotation) object;
90 if (!target.hasGraph()) { return null; }
91 return (target.getGraph() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
93 public void setValue( java.lang.Object object, java.lang.Object value)
94 throws IllegalStateException, IllegalArgumentException
97 Annotation target = (Annotation) object;
98 // ignore null values for non optional primitives
99 if (value == null) { return; }
101 target.setGraph( ((java.lang.Boolean) value).booleanValue());
102 } catch (java.lang.Exception ex) {
103 throw new IllegalStateException(ex.toString());
106 public java.lang.Object newInstance(java.lang.Object parent) {
110 desc.setHandler(handler);
111 desc.setRequired(true);
112 desc.setMultivalued(false);
113 addFieldDescriptor(desc);
115 //-- validation code for: _graph
116 fieldValidator = new org.exolab.castor.xml.FieldValidator();
117 fieldValidator.setMinOccurs(1);
119 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
120 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
121 fieldValidator.setValidator(typeValidator);
123 desc.setValidator(fieldValidator);
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
130 Annotation target = (Annotation) object;
131 if (!target.hasGraphType()) { return null; }
132 return new java.lang.Integer(target.getGraphType());
134 public void setValue( java.lang.Object object, java.lang.Object value)
135 throws IllegalStateException, IllegalArgumentException
138 Annotation target = (Annotation) object;
139 // if null, use delete method for optional primitives
141 target.deleteGraphType();
144 target.setGraphType( ((java.lang.Integer) value).intValue());
145 } catch (java.lang.Exception ex) {
146 throw new IllegalStateException(ex.toString());
149 public java.lang.Object newInstance(java.lang.Object parent) {
153 desc.setHandler(handler);
154 desc.setMultivalued(false);
155 addFieldDescriptor(desc);
157 //-- validation code for: _graphType
158 fieldValidator = new org.exolab.castor.xml.FieldValidator();
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);
166 desc.setValidator(fieldValidator);
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
174 Annotation target = (Annotation) object;
175 return target.getSequenceRef();
177 public void setValue( java.lang.Object object, java.lang.Object value)
178 throws IllegalStateException, IllegalArgumentException
181 Annotation target = (Annotation) object;
182 target.setSequenceRef( (java.lang.String) value);
183 } catch (java.lang.Exception ex) {
184 throw new IllegalStateException(ex.toString());
187 public java.lang.Object newInstance(java.lang.Object parent) {
191 desc.setHandler(handler);
192 desc.setMultivalued(false);
193 addFieldDescriptor(desc);
195 //-- validation code for: _sequenceRef
196 fieldValidator = new org.exolab.castor.xml.FieldValidator();
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");
203 desc.setValidator(fieldValidator);
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
211 Annotation target = (Annotation) object;
212 return target.getGroupRef();
214 public void setValue( java.lang.Object object, java.lang.Object value)
215 throws IllegalStateException, IllegalArgumentException
218 Annotation target = (Annotation) object;
219 target.setGroupRef( (java.lang.String) value);
220 } catch (java.lang.Exception ex) {
221 throw new IllegalStateException(ex.toString());
224 public java.lang.Object newInstance(java.lang.Object parent) {
228 desc.setHandler(handler);
229 desc.setMultivalued(false);
230 addFieldDescriptor(desc);
232 //-- validation code for: _groupRef
233 fieldValidator = new org.exolab.castor.xml.FieldValidator();
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");
240 desc.setValidator(fieldValidator);
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
247 Annotation target = (Annotation) object;
248 if (!target.hasGraphColour()) { return null; }
249 return new java.lang.Integer(target.getGraphColour());
251 public void setValue( java.lang.Object object, java.lang.Object value)
252 throws IllegalStateException, IllegalArgumentException
255 Annotation target = (Annotation) object;
256 // if null, use delete method for optional primitives
258 target.deleteGraphColour();
261 target.setGraphColour( ((java.lang.Integer) value).intValue());
262 } catch (java.lang.Exception ex) {
263 throw new IllegalStateException(ex.toString());
266 public java.lang.Object newInstance(java.lang.Object parent) {
270 desc.setHandler(handler);
271 desc.setMultivalued(false);
272 addFieldDescriptor(desc);
274 //-- validation code for: _graphColour
275 fieldValidator = new org.exolab.castor.xml.FieldValidator();
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);
283 desc.setValidator(fieldValidator);
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
290 Annotation target = (Annotation) object;
291 if (!target.hasGraphGroup()) { return null; }
292 return new java.lang.Integer(target.getGraphGroup());
294 public void setValue( java.lang.Object object, java.lang.Object value)
295 throws IllegalStateException, IllegalArgumentException
298 Annotation target = (Annotation) object;
299 // if null, use delete method for optional primitives
301 target.deleteGraphGroup();
304 target.setGraphGroup( ((java.lang.Integer) value).intValue());
305 } catch (java.lang.Exception ex) {
306 throw new IllegalStateException(ex.toString());
309 public java.lang.Object newInstance(java.lang.Object parent) {
313 desc.setHandler(handler);
314 desc.setMultivalued(false);
315 addFieldDescriptor(desc);
317 //-- validation code for: _graphGroup
318 fieldValidator = new org.exolab.castor.xml.FieldValidator();
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);
326 desc.setValidator(fieldValidator);
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
333 Annotation target = (Annotation) object;
334 if (!target.hasGraphHeight()) { return null; }
335 return new java.lang.Integer(target.getGraphHeight());
337 public void setValue( java.lang.Object object, java.lang.Object value)
338 throws IllegalStateException, IllegalArgumentException
341 Annotation target = (Annotation) object;
342 // if null, use delete method for optional primitives
344 target.deleteGraphHeight();
347 target.setGraphHeight( ((java.lang.Integer) value).intValue());
348 } catch (java.lang.Exception ex) {
349 throw new IllegalStateException(ex.toString());
352 public java.lang.Object newInstance(java.lang.Object parent) {
356 desc.setHandler(handler);
357 desc.setMultivalued(false);
358 addFieldDescriptor(desc);
360 //-- validation code for: _graphHeight
361 fieldValidator = new org.exolab.castor.xml.FieldValidator();
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);
369 desc.setValidator(fieldValidator);
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
377 Annotation target = (Annotation) object;
378 return target.getId();
380 public void setValue( java.lang.Object object, java.lang.Object value)
381 throws IllegalStateException, IllegalArgumentException
384 Annotation target = (Annotation) object;
385 target.setId( (java.lang.String) value);
386 } catch (java.lang.Exception ex) {
387 throw new IllegalStateException(ex.toString());
390 public java.lang.Object newInstance(java.lang.Object parent) {
394 desc.setHandler(handler);
395 desc.setMultivalued(false);
396 addFieldDescriptor(desc);
398 //-- validation code for: _id
399 fieldValidator = new org.exolab.castor.xml.FieldValidator();
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");
406 desc.setValidator(fieldValidator);
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
413 Annotation target = (Annotation) object;
414 if (!target.hasScoreOnly()) { return null; }
415 return (target.getScoreOnly() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
417 public void setValue( java.lang.Object object, java.lang.Object value)
418 throws IllegalStateException, IllegalArgumentException
421 Annotation target = (Annotation) object;
422 // if null, use delete method for optional primitives
424 target.deleteScoreOnly();
427 target.setScoreOnly( ((java.lang.Boolean) value).booleanValue());
428 } catch (java.lang.Exception ex) {
429 throw new IllegalStateException(ex.toString());
432 public java.lang.Object newInstance(java.lang.Object parent) {
436 desc.setHandler(handler);
437 desc.setMultivalued(false);
438 addFieldDescriptor(desc);
440 //-- validation code for: _scoreOnly
441 fieldValidator = new org.exolab.castor.xml.FieldValidator();
443 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
444 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
445 fieldValidator.setValidator(typeValidator);
447 desc.setValidator(fieldValidator);
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
454 Annotation target = (Annotation) object;
455 if (!target.hasScore()) { return null; }
456 return new java.lang.Double(target.getScore());
458 public void setValue( java.lang.Object object, java.lang.Object value)
459 throws IllegalStateException, IllegalArgumentException
462 Annotation target = (Annotation) object;
463 // if null, use delete method for optional primitives
465 target.deleteScore();
468 target.setScore( ((java.lang.Double) value).doubleValue());
469 } catch (java.lang.Exception ex) {
470 throw new IllegalStateException(ex.toString());
473 public java.lang.Object newInstance(java.lang.Object parent) {
477 desc.setHandler(handler);
478 desc.setMultivalued(false);
479 addFieldDescriptor(desc);
481 //-- validation code for: _score
482 fieldValidator = new org.exolab.castor.xml.FieldValidator();
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);
490 desc.setValidator(fieldValidator);
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
497 Annotation target = (Annotation) object;
498 if (!target.hasVisible()) { return null; }
499 return (target.getVisible() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
501 public void setValue( java.lang.Object object, java.lang.Object value)
502 throws IllegalStateException, IllegalArgumentException
505 Annotation target = (Annotation) object;
506 // if null, use delete method for optional primitives
508 target.deleteVisible();
511 target.setVisible( ((java.lang.Boolean) value).booleanValue());
512 } catch (java.lang.Exception ex) {
513 throw new IllegalStateException(ex.toString());
516 public java.lang.Object newInstance(java.lang.Object parent) {
520 desc.setHandler(handler);
521 desc.setMultivalued(false);
522 addFieldDescriptor(desc);
524 //-- validation code for: _visible
525 fieldValidator = new org.exolab.castor.xml.FieldValidator();
527 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
528 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
529 fieldValidator.setValidator(typeValidator);
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
538 Annotation target = (Annotation) object;
539 if (!target.hasCentreColLabels()) { return null; }
540 return (target.getCentreColLabels() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
542 public void setValue( java.lang.Object object, java.lang.Object value)
543 throws IllegalStateException, IllegalArgumentException
546 Annotation target = (Annotation) object;
547 // if null, use delete method for optional primitives
549 target.deleteCentreColLabels();
552 target.setCentreColLabels( ((java.lang.Boolean) value).booleanValue());
553 } catch (java.lang.Exception ex) {
554 throw new IllegalStateException(ex.toString());
557 public java.lang.Object newInstance(java.lang.Object parent) {
561 desc.setHandler(handler);
562 desc.setMultivalued(false);
563 addFieldDescriptor(desc);
565 //-- validation code for: _centreColLabels
566 fieldValidator = new org.exolab.castor.xml.FieldValidator();
568 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
569 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
570 fieldValidator.setValidator(typeValidator);
572 desc.setValidator(fieldValidator);
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
579 Annotation target = (Annotation) object;
580 if (!target.hasScaleColLabels()) { return null; }
581 return (target.getScaleColLabels() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
583 public void setValue( java.lang.Object object, java.lang.Object value)
584 throws IllegalStateException, IllegalArgumentException
587 Annotation target = (Annotation) object;
588 // if null, use delete method for optional primitives
590 target.deleteScaleColLabels();
593 target.setScaleColLabels( ((java.lang.Boolean) value).booleanValue());
594 } catch (java.lang.Exception ex) {
595 throw new IllegalStateException(ex.toString());
598 public java.lang.Object newInstance(java.lang.Object parent) {
602 desc.setHandler(handler);
603 desc.setMultivalued(false);
604 addFieldDescriptor(desc);
606 //-- validation code for: _scaleColLabels
607 fieldValidator = new org.exolab.castor.xml.FieldValidator();
609 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
610 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
611 fieldValidator.setValidator(typeValidator);
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
620 Annotation target = (Annotation) object;
621 if (!target.hasShowAllColLabels()) { return null; }
622 return (target.getShowAllColLabels() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
624 public void setValue( java.lang.Object object, java.lang.Object value)
625 throws IllegalStateException, IllegalArgumentException
628 Annotation target = (Annotation) object;
629 // if null, use delete method for optional primitives
631 target.deleteShowAllColLabels();
634 target.setShowAllColLabels( ((java.lang.Boolean) value).booleanValue());
635 } catch (java.lang.Exception ex) {
636 throw new IllegalStateException(ex.toString());
639 public java.lang.Object newInstance(java.lang.Object parent) {
643 desc.setHandler(handler);
644 desc.setMultivalued(false);
645 addFieldDescriptor(desc);
647 //-- validation code for: _showAllColLabels
648 fieldValidator = new org.exolab.castor.xml.FieldValidator();
650 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
651 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
652 fieldValidator.setValidator(typeValidator);
654 desc.setValidator(fieldValidator);
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
661 Annotation target = (Annotation) object;
662 if (!target.hasAutoCalculated()) { return null; }
663 return (target.getAutoCalculated() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
665 public void setValue( java.lang.Object object, java.lang.Object value)
666 throws IllegalStateException, IllegalArgumentException
669 Annotation target = (Annotation) object;
670 // if null, use delete method for optional primitives
672 target.deleteAutoCalculated();
675 target.setAutoCalculated( ((java.lang.Boolean) value).booleanValue());
676 } catch (java.lang.Exception ex) {
677 throw new IllegalStateException(ex.toString());
680 public java.lang.Object newInstance(java.lang.Object parent) {
684 desc.setHandler(handler);
685 desc.setMultivalued(false);
686 addFieldDescriptor(desc);
688 //-- validation code for: _autoCalculated
689 fieldValidator = new org.exolab.castor.xml.FieldValidator();
691 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
692 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
693 fieldValidator.setValidator(typeValidator);
695 desc.setValidator(fieldValidator);
696 //-- initialize element descriptors
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
704 Annotation target = (Annotation) object;
705 return target.getAnnotationElement();
707 public void setValue( java.lang.Object object, java.lang.Object value)
708 throws IllegalStateException, IllegalArgumentException
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());
717 public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
719 Annotation target = (Annotation) object;
720 target.removeAllAnnotationElement();
721 } catch (java.lang.Exception ex) {
722 throw new IllegalStateException(ex.toString());
725 public java.lang.Object newInstance(java.lang.Object parent) {
726 return new jalview.schemabinding.version2.AnnotationElement();
729 desc.setHandler(handler);
730 desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
731 desc.setMultivalued(true);
732 addFieldDescriptor(desc);
734 //-- validation code for: _annotationElementList
735 fieldValidator = new org.exolab.castor.xml.FieldValidator();
736 fieldValidator.setMinOccurs(0);
739 desc.setValidator(fieldValidator);
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
747 Annotation target = (Annotation) object;
748 return target.getLabel();
750 public void setValue( java.lang.Object object, java.lang.Object value)
751 throws IllegalStateException, IllegalArgumentException
754 Annotation target = (Annotation) object;
755 target.setLabel( (java.lang.String) value);
756 } catch (java.lang.Exception ex) {
757 throw new IllegalStateException(ex.toString());
760 public java.lang.Object newInstance(java.lang.Object parent) {
764 desc.setHandler(handler);
765 desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
766 desc.setRequired(true);
767 desc.setMultivalued(false);
768 addFieldDescriptor(desc);
770 //-- validation code for: _label
771 fieldValidator = new org.exolab.castor.xml.FieldValidator();
772 fieldValidator.setMinOccurs(1);
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");
779 desc.setValidator(fieldValidator);
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
787 Annotation target = (Annotation) object;
788 return target.getDescription();
790 public void setValue( java.lang.Object object, java.lang.Object value)
791 throws IllegalStateException, IllegalArgumentException
794 Annotation target = (Annotation) object;
795 target.setDescription( (java.lang.String) value);
796 } catch (java.lang.Exception ex) {
797 throw new IllegalStateException(ex.toString());
800 public java.lang.Object newInstance(java.lang.Object parent) {
804 desc.setHandler(handler);
805 desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
806 desc.setMultivalued(false);
807 addFieldDescriptor(desc);
809 //-- validation code for: _description
810 fieldValidator = new org.exolab.castor.xml.FieldValidator();
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");
817 desc.setValidator(fieldValidator);
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
824 Annotation target = (Annotation) object;
825 return target.getThresholdLine();
827 public void setValue( java.lang.Object object, java.lang.Object value)
828 throws IllegalStateException, IllegalArgumentException
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());
837 public java.lang.Object newInstance(java.lang.Object parent) {
838 return new jalview.schemabinding.version2.ThresholdLine();
841 desc.setHandler(handler);
842 desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
843 desc.setMultivalued(false);
844 addFieldDescriptor(desc);
846 //-- validation code for: _thresholdLine
847 fieldValidator = new org.exolab.castor.xml.FieldValidator();
850 desc.setValidator(fieldValidator);
859 * Method getAccessMode.
861 * @return the access mode specified for this class.
863 public org.exolab.castor.mapping.AccessMode getAccessMode(
869 * Method getIdentity.
871 * @return the identity field, null if this class has no
874 public org.exolab.castor.mapping.FieldDescriptor getIdentity(
876 return super.getIdentity();
880 * Method getJavaClass.
882 * @return the Java class represented by this descriptor.
884 public java.lang.Class getJavaClass(
886 return jalview.schemabinding.version2.Annotation.class;
890 * Method getNameSpacePrefix.
892 * @return the namespace prefix to use when marshaling as XML.
894 public java.lang.String getNameSpacePrefix(
900 * Method getNameSpaceURI.
902 * @return the namespace URI used when marshaling and
903 * unmarshaling as XML.
905 public java.lang.String getNameSpaceURI(
911 * Method getValidator.
913 * @return a specific validator for the class described by this
916 public org.exolab.castor.xml.TypeValidator getValidator(
924 * @return the XML Name for the Class being described.
926 public java.lang.String getXMLName(
932 * Method isElementDefinition.
934 * @return true if XML schema definition of this Class is that
936 * element or element with anonymous type definition.
938 public boolean isElementDefinition(
940 return _elementDefinition;