1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3 * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, 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.JGroup;
34 * Class JGroupDescriptor.
36 * @version $Revision$ $Date$
38 public class JGroupDescriptor 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 JGroupDescriptor() {
72 _nsURI = "www.jalview.org";
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.Integer.TYPE, "_start", "start", 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 JGroup target = (JGroup) object;
90 if (!target.hasStart()) { return null; }
91 return new java.lang.Integer(target.getStart());
93 public void setValue( java.lang.Object object, java.lang.Object value)
94 throws IllegalStateException, IllegalArgumentException
97 JGroup target = (JGroup) object;
98 // if null, use delete method for optional primitives
100 target.deleteStart();
103 target.setStart( ((java.lang.Integer) value).intValue());
104 } catch (java.lang.Exception ex) {
105 throw new IllegalStateException(ex.toString());
108 public java.lang.Object newInstance(java.lang.Object parent) {
112 desc.setHandler(handler);
113 desc.setMultivalued(false);
114 addFieldDescriptor(desc);
116 //-- validation code for: _start
117 fieldValidator = new org.exolab.castor.xml.FieldValidator();
119 org.exolab.castor.xml.validators.IntValidator typeValidator;
120 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
121 fieldValidator.setValidator(typeValidator);
122 typeValidator.setMinInclusive(-2147483648);
123 typeValidator.setMaxInclusive(2147483647);
125 desc.setValidator(fieldValidator);
127 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute);
128 handler = new org.exolab.castor.xml.XMLFieldHandler() {
129 public java.lang.Object getValue( java.lang.Object object )
130 throws IllegalStateException
132 JGroup target = (JGroup) object;
133 if (!target.hasEnd()) { return null; }
134 return new java.lang.Integer(target.getEnd());
136 public void setValue( java.lang.Object object, java.lang.Object value)
137 throws IllegalStateException, IllegalArgumentException
140 JGroup target = (JGroup) object;
141 // if null, use delete method for optional primitives
146 target.setEnd( ((java.lang.Integer) value).intValue());
147 } catch (java.lang.Exception ex) {
148 throw new IllegalStateException(ex.toString());
151 public java.lang.Object newInstance(java.lang.Object parent) {
155 desc.setHandler(handler);
156 desc.setMultivalued(false);
157 addFieldDescriptor(desc);
159 //-- validation code for: _end
160 fieldValidator = new org.exolab.castor.xml.FieldValidator();
162 org.exolab.castor.xml.validators.IntValidator typeValidator;
163 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
164 fieldValidator.setValidator(typeValidator);
165 typeValidator.setMinInclusive(-2147483648);
166 typeValidator.setMaxInclusive(2147483647);
168 desc.setValidator(fieldValidator);
170 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute);
171 desc.setImmutable(true);
172 handler = new org.exolab.castor.xml.XMLFieldHandler() {
173 public java.lang.Object getValue( java.lang.Object object )
174 throws IllegalStateException
176 JGroup target = (JGroup) object;
177 return target.getName();
179 public void setValue( java.lang.Object object, java.lang.Object value)
180 throws IllegalStateException, IllegalArgumentException
183 JGroup target = (JGroup) object;
184 target.setName( (java.lang.String) value);
185 } catch (java.lang.Exception ex) {
186 throw new IllegalStateException(ex.toString());
189 public java.lang.Object newInstance(java.lang.Object parent) {
193 desc.setHandler(handler);
194 desc.setMultivalued(false);
195 addFieldDescriptor(desc);
197 //-- validation code for: _name
198 fieldValidator = new org.exolab.castor.xml.FieldValidator();
200 org.exolab.castor.xml.validators.StringValidator typeValidator;
201 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
202 fieldValidator.setValidator(typeValidator);
203 typeValidator.setWhiteSpace("preserve");
205 desc.setValidator(fieldValidator);
207 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_colour", "colour", org.exolab.castor.xml.NodeType.Attribute);
208 desc.setImmutable(true);
209 handler = new org.exolab.castor.xml.XMLFieldHandler() {
210 public java.lang.Object getValue( java.lang.Object object )
211 throws IllegalStateException
213 JGroup target = (JGroup) object;
214 return target.getColour();
216 public void setValue( java.lang.Object object, java.lang.Object value)
217 throws IllegalStateException, IllegalArgumentException
220 JGroup target = (JGroup) object;
221 target.setColour( (java.lang.String) value);
222 } catch (java.lang.Exception ex) {
223 throw new IllegalStateException(ex.toString());
226 public java.lang.Object newInstance(java.lang.Object parent) {
230 desc.setHandler(handler);
231 desc.setMultivalued(false);
232 addFieldDescriptor(desc);
234 //-- validation code for: _colour
235 fieldValidator = new org.exolab.castor.xml.FieldValidator();
237 org.exolab.castor.xml.validators.StringValidator typeValidator;
238 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
239 fieldValidator.setValidator(typeValidator);
240 typeValidator.setWhiteSpace("preserve");
242 desc.setValidator(fieldValidator);
244 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_consThreshold", "consThreshold", org.exolab.castor.xml.NodeType.Attribute);
245 handler = new org.exolab.castor.xml.XMLFieldHandler() {
246 public java.lang.Object getValue( java.lang.Object object )
247 throws IllegalStateException
249 JGroup target = (JGroup) object;
250 if (!target.hasConsThreshold()) { return null; }
251 return new java.lang.Integer(target.getConsThreshold());
253 public void setValue( java.lang.Object object, java.lang.Object value)
254 throws IllegalStateException, IllegalArgumentException
257 JGroup target = (JGroup) object;
258 // if null, use delete method for optional primitives
260 target.deleteConsThreshold();
263 target.setConsThreshold( ((java.lang.Integer) value).intValue());
264 } catch (java.lang.Exception ex) {
265 throw new IllegalStateException(ex.toString());
268 public java.lang.Object newInstance(java.lang.Object parent) {
272 desc.setHandler(handler);
273 desc.setMultivalued(false);
274 addFieldDescriptor(desc);
276 //-- validation code for: _consThreshold
277 fieldValidator = new org.exolab.castor.xml.FieldValidator();
279 org.exolab.castor.xml.validators.IntValidator typeValidator;
280 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
281 fieldValidator.setValidator(typeValidator);
282 typeValidator.setMinInclusive(-2147483648);
283 typeValidator.setMaxInclusive(2147483647);
285 desc.setValidator(fieldValidator);
287 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_pidThreshold", "pidThreshold", org.exolab.castor.xml.NodeType.Attribute);
288 handler = new org.exolab.castor.xml.XMLFieldHandler() {
289 public java.lang.Object getValue( java.lang.Object object )
290 throws IllegalStateException
292 JGroup target = (JGroup) object;
293 if (!target.hasPidThreshold()) { return null; }
294 return new java.lang.Integer(target.getPidThreshold());
296 public void setValue( java.lang.Object object, java.lang.Object value)
297 throws IllegalStateException, IllegalArgumentException
300 JGroup target = (JGroup) object;
301 // if null, use delete method for optional primitives
303 target.deletePidThreshold();
306 target.setPidThreshold( ((java.lang.Integer) value).intValue());
307 } catch (java.lang.Exception ex) {
308 throw new IllegalStateException(ex.toString());
311 public java.lang.Object newInstance(java.lang.Object parent) {
315 desc.setHandler(handler);
316 desc.setMultivalued(false);
317 addFieldDescriptor(desc);
319 //-- validation code for: _pidThreshold
320 fieldValidator = new org.exolab.castor.xml.FieldValidator();
322 org.exolab.castor.xml.validators.IntValidator typeValidator;
323 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
324 fieldValidator.setValidator(typeValidator);
325 typeValidator.setMinInclusive(-2147483648);
326 typeValidator.setMaxInclusive(2147483647);
328 desc.setValidator(fieldValidator);
330 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_outlineColour", "outlineColour", org.exolab.castor.xml.NodeType.Attribute);
331 handler = new org.exolab.castor.xml.XMLFieldHandler() {
332 public java.lang.Object getValue( java.lang.Object object )
333 throws IllegalStateException
335 JGroup target = (JGroup) object;
336 if (!target.hasOutlineColour()) { return null; }
337 return new java.lang.Integer(target.getOutlineColour());
339 public void setValue( java.lang.Object object, java.lang.Object value)
340 throws IllegalStateException, IllegalArgumentException
343 JGroup target = (JGroup) object;
344 // if null, use delete method for optional primitives
346 target.deleteOutlineColour();
349 target.setOutlineColour( ((java.lang.Integer) value).intValue());
350 } catch (java.lang.Exception ex) {
351 throw new IllegalStateException(ex.toString());
354 public java.lang.Object newInstance(java.lang.Object parent) {
358 desc.setHandler(handler);
359 desc.setMultivalued(false);
360 addFieldDescriptor(desc);
362 //-- validation code for: _outlineColour
363 fieldValidator = new org.exolab.castor.xml.FieldValidator();
365 org.exolab.castor.xml.validators.IntValidator typeValidator;
366 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
367 fieldValidator.setValidator(typeValidator);
368 typeValidator.setMinInclusive(-2147483648);
369 typeValidator.setMaxInclusive(2147483647);
371 desc.setValidator(fieldValidator);
373 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_displayBoxes", "displayBoxes", org.exolab.castor.xml.NodeType.Attribute);
374 handler = new org.exolab.castor.xml.XMLFieldHandler() {
375 public java.lang.Object getValue( java.lang.Object object )
376 throws IllegalStateException
378 JGroup target = (JGroup) object;
379 if (!target.hasDisplayBoxes()) { return null; }
380 return (target.getDisplayBoxes() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
382 public void setValue( java.lang.Object object, java.lang.Object value)
383 throws IllegalStateException, IllegalArgumentException
386 JGroup target = (JGroup) object;
387 // if null, use delete method for optional primitives
389 target.deleteDisplayBoxes();
392 target.setDisplayBoxes( ((java.lang.Boolean) value).booleanValue());
393 } catch (java.lang.Exception ex) {
394 throw new IllegalStateException(ex.toString());
397 public java.lang.Object newInstance(java.lang.Object parent) {
401 desc.setHandler(handler);
402 desc.setMultivalued(false);
403 addFieldDescriptor(desc);
405 //-- validation code for: _displayBoxes
406 fieldValidator = new org.exolab.castor.xml.FieldValidator();
408 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
409 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
410 fieldValidator.setValidator(typeValidator);
412 desc.setValidator(fieldValidator);
414 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_displayText", "displayText", org.exolab.castor.xml.NodeType.Attribute);
415 handler = new org.exolab.castor.xml.XMLFieldHandler() {
416 public java.lang.Object getValue( java.lang.Object object )
417 throws IllegalStateException
419 JGroup target = (JGroup) object;
420 if (!target.hasDisplayText()) { return null; }
421 return (target.getDisplayText() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
423 public void setValue( java.lang.Object object, java.lang.Object value)
424 throws IllegalStateException, IllegalArgumentException
427 JGroup target = (JGroup) object;
428 // if null, use delete method for optional primitives
430 target.deleteDisplayText();
433 target.setDisplayText( ((java.lang.Boolean) value).booleanValue());
434 } catch (java.lang.Exception ex) {
435 throw new IllegalStateException(ex.toString());
438 public java.lang.Object newInstance(java.lang.Object parent) {
442 desc.setHandler(handler);
443 desc.setMultivalued(false);
444 addFieldDescriptor(desc);
446 //-- validation code for: _displayText
447 fieldValidator = new org.exolab.castor.xml.FieldValidator();
449 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
450 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
451 fieldValidator.setValidator(typeValidator);
453 desc.setValidator(fieldValidator);
455 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_colourText", "colourText", org.exolab.castor.xml.NodeType.Attribute);
456 handler = new org.exolab.castor.xml.XMLFieldHandler() {
457 public java.lang.Object getValue( java.lang.Object object )
458 throws IllegalStateException
460 JGroup target = (JGroup) object;
461 if (!target.hasColourText()) { return null; }
462 return (target.getColourText() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
464 public void setValue( java.lang.Object object, java.lang.Object value)
465 throws IllegalStateException, IllegalArgumentException
468 JGroup target = (JGroup) object;
469 // if null, use delete method for optional primitives
471 target.deleteColourText();
474 target.setColourText( ((java.lang.Boolean) value).booleanValue());
475 } catch (java.lang.Exception ex) {
476 throw new IllegalStateException(ex.toString());
479 public java.lang.Object newInstance(java.lang.Object parent) {
483 desc.setHandler(handler);
484 desc.setMultivalued(false);
485 addFieldDescriptor(desc);
487 //-- validation code for: _colourText
488 fieldValidator = new org.exolab.castor.xml.FieldValidator();
490 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
491 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
492 fieldValidator.setValidator(typeValidator);
494 desc.setValidator(fieldValidator);
496 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol1", "textCol1", org.exolab.castor.xml.NodeType.Attribute);
497 handler = new org.exolab.castor.xml.XMLFieldHandler() {
498 public java.lang.Object getValue( java.lang.Object object )
499 throws IllegalStateException
501 JGroup target = (JGroup) object;
502 if (!target.hasTextCol1()) { return null; }
503 return new java.lang.Integer(target.getTextCol1());
505 public void setValue( java.lang.Object object, java.lang.Object value)
506 throws IllegalStateException, IllegalArgumentException
509 JGroup target = (JGroup) object;
510 // if null, use delete method for optional primitives
512 target.deleteTextCol1();
515 target.setTextCol1( ((java.lang.Integer) value).intValue());
516 } catch (java.lang.Exception ex) {
517 throw new IllegalStateException(ex.toString());
520 public java.lang.Object newInstance(java.lang.Object parent) {
524 desc.setHandler(handler);
525 desc.setMultivalued(false);
526 addFieldDescriptor(desc);
528 //-- validation code for: _textCol1
529 fieldValidator = new org.exolab.castor.xml.FieldValidator();
531 org.exolab.castor.xml.validators.IntValidator typeValidator;
532 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
533 fieldValidator.setValidator(typeValidator);
534 typeValidator.setMinInclusive(-2147483648);
535 typeValidator.setMaxInclusive(2147483647);
537 desc.setValidator(fieldValidator);
539 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol2", "textCol2", org.exolab.castor.xml.NodeType.Attribute);
540 handler = new org.exolab.castor.xml.XMLFieldHandler() {
541 public java.lang.Object getValue( java.lang.Object object )
542 throws IllegalStateException
544 JGroup target = (JGroup) object;
545 if (!target.hasTextCol2()) { return null; }
546 return new java.lang.Integer(target.getTextCol2());
548 public void setValue( java.lang.Object object, java.lang.Object value)
549 throws IllegalStateException, IllegalArgumentException
552 JGroup target = (JGroup) object;
553 // if null, use delete method for optional primitives
555 target.deleteTextCol2();
558 target.setTextCol2( ((java.lang.Integer) value).intValue());
559 } catch (java.lang.Exception ex) {
560 throw new IllegalStateException(ex.toString());
563 public java.lang.Object newInstance(java.lang.Object parent) {
567 desc.setHandler(handler);
568 desc.setMultivalued(false);
569 addFieldDescriptor(desc);
571 //-- validation code for: _textCol2
572 fieldValidator = new org.exolab.castor.xml.FieldValidator();
574 org.exolab.castor.xml.validators.IntValidator typeValidator;
575 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
576 fieldValidator.setValidator(typeValidator);
577 typeValidator.setMinInclusive(-2147483648);
578 typeValidator.setMaxInclusive(2147483647);
580 desc.setValidator(fieldValidator);
581 //-- _textColThreshold
582 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textColThreshold", "textColThreshold", org.exolab.castor.xml.NodeType.Attribute);
583 handler = new org.exolab.castor.xml.XMLFieldHandler() {
584 public java.lang.Object getValue( java.lang.Object object )
585 throws IllegalStateException
587 JGroup target = (JGroup) object;
588 if (!target.hasTextColThreshold()) { return null; }
589 return new java.lang.Integer(target.getTextColThreshold());
591 public void setValue( java.lang.Object object, java.lang.Object value)
592 throws IllegalStateException, IllegalArgumentException
595 JGroup target = (JGroup) object;
596 // if null, use delete method for optional primitives
598 target.deleteTextColThreshold();
601 target.setTextColThreshold( ((java.lang.Integer) value).intValue());
602 } catch (java.lang.Exception ex) {
603 throw new IllegalStateException(ex.toString());
606 public java.lang.Object newInstance(java.lang.Object parent) {
610 desc.setHandler(handler);
611 desc.setMultivalued(false);
612 addFieldDescriptor(desc);
614 //-- validation code for: _textColThreshold
615 fieldValidator = new org.exolab.castor.xml.FieldValidator();
617 org.exolab.castor.xml.validators.IntValidator typeValidator;
618 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
619 fieldValidator.setValidator(typeValidator);
620 typeValidator.setMinInclusive(-2147483648);
621 typeValidator.setMaxInclusive(2147483647);
623 desc.setValidator(fieldValidator);
624 //-- _showUnconserved
625 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showUnconserved", "showUnconserved", org.exolab.castor.xml.NodeType.Attribute);
626 handler = new org.exolab.castor.xml.XMLFieldHandler() {
627 public java.lang.Object getValue( java.lang.Object object )
628 throws IllegalStateException
630 JGroup target = (JGroup) object;
631 if (!target.hasShowUnconserved()) { return null; }
632 return (target.getShowUnconserved() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
634 public void setValue( java.lang.Object object, java.lang.Object value)
635 throws IllegalStateException, IllegalArgumentException
638 JGroup target = (JGroup) object;
639 // if null, use delete method for optional primitives
641 target.deleteShowUnconserved();
644 target.setShowUnconserved( ((java.lang.Boolean) value).booleanValue());
645 } catch (java.lang.Exception ex) {
646 throw new IllegalStateException(ex.toString());
649 public java.lang.Object newInstance(java.lang.Object parent) {
653 desc.setHandler(handler);
654 desc.setMultivalued(false);
655 addFieldDescriptor(desc);
657 //-- validation code for: _showUnconserved
658 fieldValidator = new org.exolab.castor.xml.FieldValidator();
660 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
661 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
662 fieldValidator.setValidator(typeValidator);
664 desc.setValidator(fieldValidator);
665 //-- _ignoreGapsinConsensus
666 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_ignoreGapsinConsensus", "ignoreGapsinConsensus", org.exolab.castor.xml.NodeType.Attribute);
667 handler = new org.exolab.castor.xml.XMLFieldHandler() {
668 public java.lang.Object getValue( java.lang.Object object )
669 throws IllegalStateException
671 JGroup target = (JGroup) object;
672 if (!target.hasIgnoreGapsinConsensus()) { return null; }
673 return (target.getIgnoreGapsinConsensus() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
675 public void setValue( java.lang.Object object, java.lang.Object value)
676 throws IllegalStateException, IllegalArgumentException
679 JGroup target = (JGroup) object;
680 // if null, use delete method for optional primitives
682 target.deleteIgnoreGapsinConsensus();
685 target.setIgnoreGapsinConsensus( ((java.lang.Boolean) value).booleanValue());
686 } catch (java.lang.Exception ex) {
687 throw new IllegalStateException(ex.toString());
690 public java.lang.Object newInstance(java.lang.Object parent) {
694 desc.setHandler(handler);
695 desc.setMultivalued(false);
696 addFieldDescriptor(desc);
698 //-- validation code for: _ignoreGapsinConsensus
699 fieldValidator = new org.exolab.castor.xml.FieldValidator();
701 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
702 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
703 fieldValidator.setValidator(typeValidator);
705 desc.setValidator(fieldValidator);
706 //-- _showConsensusHistogram
707 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showConsensusHistogram", "showConsensusHistogram", org.exolab.castor.xml.NodeType.Attribute);
708 handler = new org.exolab.castor.xml.XMLFieldHandler() {
709 public java.lang.Object getValue( java.lang.Object object )
710 throws IllegalStateException
712 JGroup target = (JGroup) object;
713 if (!target.hasShowConsensusHistogram()) { return null; }
714 return (target.getShowConsensusHistogram() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
716 public void setValue( java.lang.Object object, java.lang.Object value)
717 throws IllegalStateException, IllegalArgumentException
720 JGroup target = (JGroup) object;
721 // if null, use delete method for optional primitives
723 target.deleteShowConsensusHistogram();
726 target.setShowConsensusHistogram( ((java.lang.Boolean) value).booleanValue());
727 } catch (java.lang.Exception ex) {
728 throw new IllegalStateException(ex.toString());
731 public java.lang.Object newInstance(java.lang.Object parent) {
735 desc.setHandler(handler);
736 desc.setMultivalued(false);
737 addFieldDescriptor(desc);
739 //-- validation code for: _showConsensusHistogram
740 fieldValidator = new org.exolab.castor.xml.FieldValidator();
742 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
743 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
744 fieldValidator.setValidator(typeValidator);
746 desc.setValidator(fieldValidator);
747 //-- _showSequenceLogo
748 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showSequenceLogo", "showSequenceLogo", org.exolab.castor.xml.NodeType.Attribute);
749 handler = new org.exolab.castor.xml.XMLFieldHandler() {
750 public java.lang.Object getValue( java.lang.Object object )
751 throws IllegalStateException
753 JGroup target = (JGroup) object;
754 if (!target.hasShowSequenceLogo()) { return null; }
755 return (target.getShowSequenceLogo() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
757 public void setValue( java.lang.Object object, java.lang.Object value)
758 throws IllegalStateException, IllegalArgumentException
761 JGroup target = (JGroup) object;
762 // if null, use delete method for optional primitives
764 target.deleteShowSequenceLogo();
767 target.setShowSequenceLogo( ((java.lang.Boolean) value).booleanValue());
768 } catch (java.lang.Exception ex) {
769 throw new IllegalStateException(ex.toString());
772 public java.lang.Object newInstance(java.lang.Object parent) {
776 desc.setHandler(handler);
777 desc.setMultivalued(false);
778 addFieldDescriptor(desc);
780 //-- validation code for: _showSequenceLogo
781 fieldValidator = new org.exolab.castor.xml.FieldValidator();
783 org.exolab.castor.xml.validators.BooleanValidator typeValidator;
784 typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
785 fieldValidator.setValidator(typeValidator);
787 desc.setValidator(fieldValidator);
789 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);
790 desc.setImmutable(true);
791 handler = new org.exolab.castor.xml.XMLFieldHandler() {
792 public java.lang.Object getValue( java.lang.Object object )
793 throws IllegalStateException
795 JGroup target = (JGroup) object;
796 return target.getId();
798 public void setValue( java.lang.Object object, java.lang.Object value)
799 throws IllegalStateException, IllegalArgumentException
802 JGroup target = (JGroup) object;
803 target.setId( (java.lang.String) value);
804 } catch (java.lang.Exception ex) {
805 throw new IllegalStateException(ex.toString());
808 public java.lang.Object newInstance(java.lang.Object parent) {
812 desc.setHandler(handler);
813 desc.setMultivalued(false);
814 addFieldDescriptor(desc);
816 //-- validation code for: _id
817 fieldValidator = new org.exolab.castor.xml.FieldValidator();
819 org.exolab.castor.xml.validators.StringValidator typeValidator;
820 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
821 fieldValidator.setValidator(typeValidator);
822 typeValidator.setWhiteSpace("preserve");
824 desc.setValidator(fieldValidator);
825 //-- initialize element descriptors
828 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_seqList", "seq", org.exolab.castor.xml.NodeType.Element);
829 desc.setImmutable(true);
830 handler = new org.exolab.castor.xml.XMLFieldHandler() {
831 public java.lang.Object getValue( java.lang.Object object )
832 throws IllegalStateException
834 JGroup target = (JGroup) object;
835 return target.getSeq();
837 public void setValue( java.lang.Object object, java.lang.Object value)
838 throws IllegalStateException, IllegalArgumentException
841 JGroup target = (JGroup) object;
842 target.addSeq( (java.lang.String) value);
843 } catch (java.lang.Exception ex) {
844 throw new IllegalStateException(ex.toString());
847 public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
849 JGroup target = (JGroup) object;
850 target.removeAllSeq();
851 } catch (java.lang.Exception ex) {
852 throw new IllegalStateException(ex.toString());
855 public java.lang.Object newInstance(java.lang.Object parent) {
859 desc.setHandler(handler);
860 desc.setNameSpaceURI("www.jalview.org");
861 desc.setRequired(true);
862 desc.setMultivalued(true);
863 addFieldDescriptor(desc);
865 //-- validation code for: _seqList
866 fieldValidator = new org.exolab.castor.xml.FieldValidator();
867 fieldValidator.setMinOccurs(1);
869 org.exolab.castor.xml.validators.StringValidator typeValidator;
870 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
871 fieldValidator.setValidator(typeValidator);
872 typeValidator.setWhiteSpace("preserve");
874 desc.setValidator(fieldValidator);
883 * Method getAccessMode.
885 * @return the access mode specified for this class.
887 public org.exolab.castor.mapping.AccessMode getAccessMode(
893 * Method getIdentity.
895 * @return the identity field, null if this class has no
898 public org.exolab.castor.mapping.FieldDescriptor getIdentity(
900 return super.getIdentity();
904 * Method getJavaClass.
906 * @return the Java class represented by this descriptor.
908 public java.lang.Class getJavaClass(
910 return jalview.schemabinding.version2.JGroup.class;
914 * Method getNameSpacePrefix.
916 * @return the namespace prefix to use when marshaling as XML.
918 public java.lang.String getNameSpacePrefix(
924 * Method getNameSpaceURI.
926 * @return the namespace URI used when marshaling and
927 * unmarshaling as XML.
929 public java.lang.String getNameSpaceURI(
935 * Method getValidator.
937 * @return a specific validator for the class described by this
940 public org.exolab.castor.xml.TypeValidator getValidator(
948 * @return the XML Name for the Class being described.
950 public java.lang.String getXMLName(
956 * Method isElementDefinition.
958 * @return true if XML schema definition of this Class is that
960 * element or element with anonymous type definition.
962 public boolean isElementDefinition(
964 return _elementDefinition;