From 9adf6bc4eac154c1f96a2be5867ce24d7c6470f1 Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 3 Aug 2011 12:33:21 +0100 Subject: [PATCH] refactor schema to group swing window geometry attributes --- schemas/jalview.xsd | 78 +++--- src/jalview/schemabinding/version2/.castor.cdr | 2 +- .../schemabinding/version2/StructureState.java | 80 +++--- src/jalview/schemabinding/version2/Tree.java | 80 +++--- src/jalview/schemabinding/version2/Viewport.java | 80 +++--- .../descriptors/StructureStateDescriptor.java | 168 ++++++------ .../version2/descriptors/TreeDescriptor.java | 278 +++++++++---------- .../version2/descriptors/ViewportDescriptor.java | 286 ++++++++++---------- 8 files changed, 533 insertions(+), 519 deletions(-) mode change 100755 => 100644 src/jalview/binding/Alignment.java mode change 100755 => 100644 src/jalview/binding/Annotation.java mode change 100755 => 100644 src/jalview/binding/AnnotationElement.java mode change 100755 => 100644 src/jalview/binding/Colour.java mode change 100755 => 100644 src/jalview/binding/Feature.java mode change 100755 => 100644 src/jalview/binding/FeatureSettings.java mode change 100755 => 100644 src/jalview/binding/Features.java mode change 100755 => 100644 src/jalview/binding/JGroup.java mode change 100755 => 100644 src/jalview/binding/JSeq.java mode change 100755 => 100644 src/jalview/binding/JalviewModel.java mode change 100755 => 100644 src/jalview/binding/JalviewModelSequence.java mode change 100755 => 100644 src/jalview/binding/JalviewUserColours.java mode change 100755 => 100644 src/jalview/binding/Pdbentry.java mode change 100755 => 100644 src/jalview/binding/PdbentryItem.java mode change 100755 => 100644 src/jalview/binding/Pdbids.java mode change 100755 => 100644 src/jalview/binding/Property.java mode change 100755 => 100644 src/jalview/binding/Sequence.java mode change 100755 => 100644 src/jalview/binding/SequenceSet.java mode change 100755 => 100644 src/jalview/binding/SequenceType.java mode change 100755 => 100644 src/jalview/binding/Setting.java mode change 100755 => 100644 src/jalview/binding/Tree.java mode change 100755 => 100644 src/jalview/binding/UserColourScheme.java mode change 100755 => 100644 src/jalview/binding/UserColours.java mode change 100755 => 100644 src/jalview/binding/VAMSAS.java mode change 100755 => 100644 src/jalview/binding/VamsasModel.java mode change 100755 => 100644 src/jalview/binding/Viewport.java mode change 100755 => 100644 src/jalview/schemabinding/version2/Annotation.java mode change 100755 => 100644 src/jalview/schemabinding/version2/AnnotationColours.java mode change 100755 => 100644 src/jalview/schemabinding/version2/AnnotationElement.java mode change 100755 => 100644 src/jalview/schemabinding/version2/Colour.java mode change 100755 => 100644 src/jalview/schemabinding/version2/Feature.java mode change 100755 => 100644 src/jalview/schemabinding/version2/FeatureSettings.java mode change 100755 => 100644 src/jalview/schemabinding/version2/Features.java mode change 100755 => 100644 src/jalview/schemabinding/version2/JGroup.java mode change 100755 => 100644 src/jalview/schemabinding/version2/JSeq.java mode change 100755 => 100644 src/jalview/schemabinding/version2/JalviewModel.java mode change 100755 => 100644 src/jalview/schemabinding/version2/JalviewModelSequence.java mode change 100755 => 100644 src/jalview/schemabinding/version2/JalviewUserColours.java mode change 100755 => 100644 src/jalview/schemabinding/version2/Pdbentry.java mode change 100755 => 100644 src/jalview/schemabinding/version2/PdbentryItem.java mode change 100755 => 100644 src/jalview/schemabinding/version2/Pdbids.java mode change 100755 => 100644 src/jalview/schemabinding/version2/Property.java mode change 100755 => 100644 src/jalview/schemabinding/version2/Sequence.java mode change 100755 => 100644 src/jalview/schemabinding/version2/SequenceSet.java mode change 100755 => 100644 src/jalview/schemabinding/version2/SequenceType.java mode change 100755 => 100644 src/jalview/schemabinding/version2/Setting.java mode change 100755 => 100644 src/jalview/schemabinding/version2/ThresholdLine.java mode change 100755 => 100644 src/jalview/schemabinding/version2/Tree.java mode change 100755 => 100644 src/jalview/schemabinding/version2/UserColourScheme.java mode change 100755 => 100644 src/jalview/schemabinding/version2/UserColours.java mode change 100755 => 100644 src/jalview/schemabinding/version2/VAMSAS.java mode change 100755 => 100644 src/jalview/schemabinding/version2/VamsasModel.java mode change 100755 => 100644 src/jalview/schemabinding/version2/Viewport.java diff --git a/schemas/jalview.xsd b/schemas/jalview.xsd index 7780c06..5aae6ae 100755 --- a/schemas/jalview.xsd +++ b/schemas/jalview.xsd @@ -37,12 +37,9 @@ - + + - - - - additional identifier which properly disambiguates @@ -72,7 +69,7 @@ - + @@ -138,6 +135,7 @@ + @@ -165,10 +163,6 @@ - - - - @@ -187,7 +181,7 @@ - + @@ -199,27 +193,24 @@ - - - - - - - - - - - - - - - - - - - Tree ID added for binding tree visualization settings to vamsas document trees in jalview 2.4.1 - - + + + + + + + + + + + + + + + Tree ID added for binding tree visualization settings to vamsas document trees in jalview 2.4.1 + + + @@ -287,4 +278,27 @@ + + + + + base attributes for windows displayed in Jalview desktop. + + + + + + + diff --git a/src/jalview/binding/Alignment.java b/src/jalview/binding/Alignment.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/Annotation.java b/src/jalview/binding/Annotation.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/AnnotationElement.java b/src/jalview/binding/AnnotationElement.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/Colour.java b/src/jalview/binding/Colour.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/Feature.java b/src/jalview/binding/Feature.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/FeatureSettings.java b/src/jalview/binding/FeatureSettings.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/Features.java b/src/jalview/binding/Features.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/JGroup.java b/src/jalview/binding/JGroup.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/JSeq.java b/src/jalview/binding/JSeq.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/JalviewModel.java b/src/jalview/binding/JalviewModel.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/JalviewModelSequence.java b/src/jalview/binding/JalviewModelSequence.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/JalviewUserColours.java b/src/jalview/binding/JalviewUserColours.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/Pdbentry.java b/src/jalview/binding/Pdbentry.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/PdbentryItem.java b/src/jalview/binding/PdbentryItem.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/Pdbids.java b/src/jalview/binding/Pdbids.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/Property.java b/src/jalview/binding/Property.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/Sequence.java b/src/jalview/binding/Sequence.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/SequenceSet.java b/src/jalview/binding/SequenceSet.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/SequenceType.java b/src/jalview/binding/SequenceType.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/Setting.java b/src/jalview/binding/Setting.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/Tree.java b/src/jalview/binding/Tree.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/UserColourScheme.java b/src/jalview/binding/UserColourScheme.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/UserColours.java b/src/jalview/binding/UserColours.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/VAMSAS.java b/src/jalview/binding/VAMSAS.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/VamsasModel.java b/src/jalview/binding/VamsasModel.java old mode 100755 new mode 100644 diff --git a/src/jalview/binding/Viewport.java b/src/jalview/binding/Viewport.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/.castor.cdr b/src/jalview/schemabinding/version2/.castor.cdr index 49d113a..cd0b1e7 100644 --- a/src/jalview/schemabinding/version2/.castor.cdr +++ b/src/jalview/schemabinding/version2/.castor.cdr @@ -1,4 +1,4 @@ -#Mon Apr 25 14:07:25 BST 2011 +#Wed Aug 03 09:15:24 BST 2011 jalview.schemabinding.version2.ThresholdLine=jalview.schemabinding.version2.descriptors.ThresholdLineDescriptor jalview.schemabinding.version2.SequenceSetProperties=jalview.schemabinding.version2.descriptors.SequenceSetPropertiesDescriptor jalview.schemabinding.version2.StructureState=jalview.schemabinding.version2.descriptors.StructureStateDescriptor diff --git a/src/jalview/schemabinding/version2/Annotation.java b/src/jalview/schemabinding/version2/Annotation.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/AnnotationColours.java b/src/jalview/schemabinding/version2/AnnotationColours.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/AnnotationElement.java b/src/jalview/schemabinding/version2/AnnotationElement.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/Colour.java b/src/jalview/schemabinding/version2/Colour.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/Feature.java b/src/jalview/schemabinding/version2/Feature.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/FeatureSettings.java b/src/jalview/schemabinding/version2/FeatureSettings.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/Features.java b/src/jalview/schemabinding/version2/Features.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/JGroup.java b/src/jalview/schemabinding/version2/JGroup.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/JSeq.java b/src/jalview/schemabinding/version2/JSeq.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/JalviewModel.java b/src/jalview/schemabinding/version2/JalviewModel.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/JalviewModelSequence.java b/src/jalview/schemabinding/version2/JalviewModelSequence.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/JalviewUserColours.java b/src/jalview/schemabinding/version2/JalviewUserColours.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/Pdbentry.java b/src/jalview/schemabinding/version2/Pdbentry.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/PdbentryItem.java b/src/jalview/schemabinding/version2/PdbentryItem.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/Pdbids.java b/src/jalview/schemabinding/version2/Pdbids.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/Property.java b/src/jalview/schemabinding/version2/Property.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/Sequence.java b/src/jalview/schemabinding/version2/Sequence.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/SequenceSet.java b/src/jalview/schemabinding/version2/SequenceSet.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/SequenceType.java b/src/jalview/schemabinding/version2/SequenceType.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/Setting.java b/src/jalview/schemabinding/version2/Setting.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/StructureState.java b/src/jalview/schemabinding/version2/StructureState.java index c269dce..46e20b9 100644 --- a/src/jalview/schemabinding/version2/StructureState.java +++ b/src/jalview/schemabinding/version2/StructureState.java @@ -42,46 +42,6 @@ public class StructureState implements java.io.Serializable { private boolean _has_visible; /** - * Field _xpos. - */ - private int _xpos; - - /** - * keeps track of state for field: _xpos - */ - private boolean _has_xpos; - - /** - * Field _ypos. - */ - private int _ypos; - - /** - * keeps track of state for field: _ypos - */ - private boolean _has_ypos; - - /** - * Field _width. - */ - private int _width; - - /** - * keeps track of state for field: _width - */ - private boolean _has_width; - - /** - * Field _height. - */ - private int _height; - - /** - * keeps track of state for field: _height - */ - private boolean _has_height; - - /** * additional identifier which properly disambiguates * the structure view from any other view with the same * attributes. This is not an ID, @@ -131,6 +91,46 @@ public class StructureState implements java.io.Serializable { */ private boolean _has_colourByJmol; + /** + * Field _width. + */ + private int _width; + + /** + * keeps track of state for field: _width + */ + private boolean _has_width; + + /** + * Field _height. + */ + private int _height; + + /** + * keeps track of state for field: _height + */ + private boolean _has_height; + + /** + * Field _xpos. + */ + private int _xpos; + + /** + * keeps track of state for field: _xpos + */ + private boolean _has_xpos; + + /** + * Field _ypos. + */ + private int _ypos; + + /** + * keeps track of state for field: _ypos + */ + private boolean _has_ypos; + //----------------/ //- Constructors -/ diff --git a/src/jalview/schemabinding/version2/ThresholdLine.java b/src/jalview/schemabinding/version2/ThresholdLine.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/Tree.java b/src/jalview/schemabinding/version2/Tree.java old mode 100755 new mode 100644 index 14814cc..4fd5e7d --- a/src/jalview/schemabinding/version2/Tree.java +++ b/src/jalview/schemabinding/version2/Tree.java @@ -27,46 +27,6 @@ public class Tree implements java.io.Serializable { //--------------------------/ /** - * Field _width. - */ - private int _width; - - /** - * keeps track of state for field: _width - */ - private boolean _has_width; - - /** - * Field _height. - */ - private int _height; - - /** - * keeps track of state for field: _height - */ - private boolean _has_height; - - /** - * Field _xpos. - */ - private int _xpos; - - /** - * keeps track of state for field: _xpos - */ - private boolean _has_xpos; - - /** - * Field _ypos. - */ - private int _ypos; - - /** - * keeps track of state for field: _ypos - */ - private boolean _has_ypos; - - /** * Field _fontName. */ private java.lang.String _fontName; @@ -158,6 +118,46 @@ public class Tree implements java.io.Serializable { private java.lang.String _id; /** + * Field _width. + */ + private int _width; + + /** + * keeps track of state for field: _width + */ + private boolean _has_width; + + /** + * Field _height. + */ + private int _height; + + /** + * keeps track of state for field: _height + */ + private boolean _has_height; + + /** + * Field _xpos. + */ + private int _xpos; + + /** + * keeps track of state for field: _xpos + */ + private boolean _has_xpos; + + /** + * Field _ypos. + */ + private int _ypos; + + /** + * keeps track of state for field: _ypos + */ + private boolean _has_ypos; + + /** * Field _title. */ private java.lang.String _title; diff --git a/src/jalview/schemabinding/version2/UserColourScheme.java b/src/jalview/schemabinding/version2/UserColourScheme.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/UserColours.java b/src/jalview/schemabinding/version2/UserColours.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/VAMSAS.java b/src/jalview/schemabinding/version2/VAMSAS.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/VamsasModel.java b/src/jalview/schemabinding/version2/VamsasModel.java old mode 100755 new mode 100644 diff --git a/src/jalview/schemabinding/version2/Viewport.java b/src/jalview/schemabinding/version2/Viewport.java old mode 100755 new mode 100644 index 9d554e6..55604ab --- a/src/jalview/schemabinding/version2/Viewport.java +++ b/src/jalview/schemabinding/version2/Viewport.java @@ -277,46 +277,6 @@ public class Viewport implements java.io.Serializable { private boolean _has_ignoreGapsinConsensus; /** - * Field _xpos. - */ - private int _xpos; - - /** - * keeps track of state for field: _xpos - */ - private boolean _has_xpos; - - /** - * Field _ypos. - */ - private int _ypos; - - /** - * keeps track of state for field: _ypos - */ - private boolean _has_ypos; - - /** - * Field _width. - */ - private int _width; - - /** - * keeps track of state for field: _width - */ - private boolean _has_width; - - /** - * Field _height. - */ - private int _height; - - /** - * keeps track of state for field: _height - */ - private boolean _has_height; - - /** * Field _startRes. */ private int _startRes; @@ -419,6 +379,46 @@ public class Viewport implements java.io.Serializable { private java.lang.String _id; /** + * Field _width. + */ + private int _width; + + /** + * keeps track of state for field: _width + */ + private boolean _has_width; + + /** + * Field _height. + */ + private int _height; + + /** + * keeps track of state for field: _height + */ + private boolean _has_height; + + /** + * Field _xpos. + */ + private int _xpos; + + /** + * keeps track of state for field: _xpos + */ + private boolean _has_xpos; + + /** + * Field _ypos. + */ + private int _ypos; + + /** + * keeps track of state for field: _ypos + */ + private boolean _has_ypos; + + /** * Field _annotationColours. */ private jalview.schemabinding.version2.AnnotationColours _annotationColours; diff --git a/src/jalview/schemabinding/version2/descriptors/StructureStateDescriptor.java b/src/jalview/schemabinding/version2/descriptors/StructureStateDescriptor.java index 4729515..ddf9b1e 100644 --- a/src/jalview/schemabinding/version2/descriptors/StructureStateDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/StructureStateDescriptor.java @@ -137,27 +137,22 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); - //-- _xpos - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute); + //-- _viewId + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_viewId", "viewId", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { StructureState target = (StructureState) object; - if (!target.hasXpos()) { return null; } - return new java.lang.Integer(target.getXpos()); + return target.getViewId(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { StructureState target = (StructureState) object; - // if null, use delete method for optional primitives - if (value == null) { - target.deleteXpos(); - return; - } - target.setXpos( ((java.lang.Integer) value).intValue()); + target.setViewId( (java.lang.String) value); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -170,25 +165,24 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _xpos + //-- validation code for: _viewId fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.IntValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive(-2147483648); - typeValidator.setMaxInclusive(2147483647); + typeValidator.setWhiteSpace("preserve"); } desc.setValidator(fieldValidator); - //-- _ypos - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute); + //-- _alignwithAlignPanel + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_alignwithAlignPanel", "alignwithAlignPanel", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { StructureState target = (StructureState) object; - if (!target.hasYpos()) { return null; } - return new java.lang.Integer(target.getYpos()); + if (!target.hasAlignwithAlignPanel()) { return null; } + return (target.getAlignwithAlignPanel() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -197,10 +191,10 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas StructureState target = (StructureState) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteYpos(); + target.deleteAlignwithAlignPanel(); return; } - target.setYpos( ((java.lang.Integer) value).intValue()); + target.setAlignwithAlignPanel( ((java.lang.Boolean) value).booleanValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -213,25 +207,23 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _ypos + //-- validation code for: _alignwithAlignPanel fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.IntValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive(-2147483648); - typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _width - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute); + //-- _colourwithAlignPanel + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_colourwithAlignPanel", "colourwithAlignPanel", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { StructureState target = (StructureState) object; - if (!target.hasWidth()) { return null; } - return new java.lang.Integer(target.getWidth()); + if (!target.hasColourwithAlignPanel()) { return null; } + return (target.getColourwithAlignPanel() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -240,10 +232,10 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas StructureState target = (StructureState) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteWidth(); + target.deleteColourwithAlignPanel(); return; } - target.setWidth( ((java.lang.Integer) value).intValue()); + target.setColourwithAlignPanel( ((java.lang.Boolean) value).booleanValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -256,25 +248,23 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _width + //-- validation code for: _colourwithAlignPanel fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.IntValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive(-2147483648); - typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _height - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute); + //-- _colourByJmol + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_colourByJmol", "colourByJmol", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { StructureState target = (StructureState) object; - if (!target.hasHeight()) { return null; } - return new java.lang.Integer(target.getHeight()); + if (!target.hasColourByJmol()) { return null; } + return (target.getColourByJmol() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -283,10 +273,10 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas StructureState target = (StructureState) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteHeight(); + target.deleteColourByJmol(); return; } - target.setHeight( ((java.lang.Integer) value).intValue()); + target.setColourByJmol( ((java.lang.Boolean) value).booleanValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -299,32 +289,35 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _height + //-- validation code for: _colourByJmol fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.IntValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive(-2147483648); - typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _viewId - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_viewId", "viewId", org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); + //-- _width + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { StructureState target = (StructureState) object; - return target.getViewId(); + if (!target.hasWidth()) { return null; } + return new java.lang.Integer(target.getWidth()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { StructureState target = (StructureState) object; - target.setViewId( (java.lang.String) value); + // if null, use delete method for optional primitives + if (value == null) { + target.deleteWidth(); + return; + } + target.setWidth( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -337,24 +330,25 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _viewId + //-- validation code for: _width fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.StringValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); fieldValidator.setValidator(typeValidator); - typeValidator.setWhiteSpace("preserve"); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _alignwithAlignPanel - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_alignwithAlignPanel", "alignwithAlignPanel", org.exolab.castor.xml.NodeType.Attribute); + //-- _height + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { StructureState target = (StructureState) object; - if (!target.hasAlignwithAlignPanel()) { return null; } - return (target.getAlignwithAlignPanel() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + if (!target.hasHeight()) { return null; } + return new java.lang.Integer(target.getHeight()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -363,10 +357,10 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas StructureState target = (StructureState) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteAlignwithAlignPanel(); + target.deleteHeight(); return; } - target.setAlignwithAlignPanel( ((java.lang.Boolean) value).booleanValue()); + target.setHeight( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -379,23 +373,25 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _alignwithAlignPanel + //-- validation code for: _height fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.BooleanValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _colourwithAlignPanel - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_colourwithAlignPanel", "colourwithAlignPanel", org.exolab.castor.xml.NodeType.Attribute); + //-- _xpos + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { StructureState target = (StructureState) object; - if (!target.hasColourwithAlignPanel()) { return null; } - return (target.getColourwithAlignPanel() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + if (!target.hasXpos()) { return null; } + return new java.lang.Integer(target.getXpos()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -404,10 +400,10 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas StructureState target = (StructureState) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteColourwithAlignPanel(); + target.deleteXpos(); return; } - target.setColourwithAlignPanel( ((java.lang.Boolean) value).booleanValue()); + target.setXpos( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -420,23 +416,25 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _colourwithAlignPanel + //-- validation code for: _xpos fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.BooleanValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _colourByJmol - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_colourByJmol", "colourByJmol", org.exolab.castor.xml.NodeType.Attribute); + //-- _ypos + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { StructureState target = (StructureState) object; - if (!target.hasColourByJmol()) { return null; } - return (target.getColourByJmol() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + if (!target.hasYpos()) { return null; } + return new java.lang.Integer(target.getYpos()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -445,10 +443,10 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas StructureState target = (StructureState) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteColourByJmol(); + target.deleteYpos(); return; } - target.setColourByJmol( ((java.lang.Boolean) value).booleanValue()); + target.setYpos( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -461,12 +459,14 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _colourByJmol + //-- validation code for: _ypos fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.BooleanValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); //-- initialize element descriptors diff --git a/src/jalview/schemabinding/version2/descriptors/TreeDescriptor.java b/src/jalview/schemabinding/version2/descriptors/TreeDescriptor.java index ed9952e..5beffc1 100644 --- a/src/jalview/schemabinding/version2/descriptors/TreeDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/TreeDescriptor.java @@ -63,27 +63,22 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto org.exolab.castor.xml.FieldValidator fieldValidator = null; //-- initialize attribute descriptors - //-- _width - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute); + //-- _fontName + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_fontName", "fontName", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Tree target = (Tree) object; - if (!target.hasWidth()) { return null; } - return new java.lang.Integer(target.getWidth()); + return target.getFontName(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { Tree target = (Tree) object; - // if null, use delete method for optional primitives - if (value == null) { - target.deleteWidth(); - return; - } - target.setWidth( ((java.lang.Integer) value).intValue()); + target.setFontName( (java.lang.String) value); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -96,25 +91,24 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _width + //-- validation code for: _fontName fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.IntValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive(-2147483648); - typeValidator.setMaxInclusive(2147483647); + typeValidator.setWhiteSpace("preserve"); } desc.setValidator(fieldValidator); - //-- _height - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute); + //-- _fontSize + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontSize", "fontSize", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Tree target = (Tree) object; - if (!target.hasHeight()) { return null; } - return new java.lang.Integer(target.getHeight()); + if (!target.hasFontSize()) { return null; } + return new java.lang.Integer(target.getFontSize()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -123,10 +117,10 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto Tree target = (Tree) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteHeight(); + target.deleteFontSize(); return; } - target.setHeight( ((java.lang.Integer) value).intValue()); + target.setFontSize( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -139,7 +133,7 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _height + //-- validation code for: _fontSize fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope org.exolab.castor.xml.validators.IntValidator typeValidator; @@ -149,15 +143,15 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _xpos - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute); + //-- _fontStyle + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontStyle", "fontStyle", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Tree target = (Tree) object; - if (!target.hasXpos()) { return null; } - return new java.lang.Integer(target.getXpos()); + if (!target.hasFontStyle()) { return null; } + return new java.lang.Integer(target.getFontStyle()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -166,10 +160,10 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto Tree target = (Tree) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteXpos(); + target.deleteFontStyle(); return; } - target.setXpos( ((java.lang.Integer) value).intValue()); + target.setFontStyle( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -182,7 +176,7 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _xpos + //-- validation code for: _fontStyle fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope org.exolab.castor.xml.validators.IntValidator typeValidator; @@ -192,15 +186,15 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _ypos - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute); + //-- _threshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Float.TYPE, "_threshold", "threshold", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Tree target = (Tree) object; - if (!target.hasYpos()) { return null; } - return new java.lang.Integer(target.getYpos()); + if (!target.hasThreshold()) { return null; } + return new java.lang.Float(target.getThreshold()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -209,10 +203,10 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto Tree target = (Tree) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteYpos(); + target.deleteThreshold(); return; } - target.setYpos( ((java.lang.Integer) value).intValue()); + target.setThreshold( ((java.lang.Float) value).floatValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -225,32 +219,37 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _ypos + //-- validation code for: _threshold fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.IntValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + org.exolab.castor.xml.validators.FloatValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.FloatValidator(); fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive(-2147483648); - typeValidator.setMaxInclusive(2147483647); + typeValidator.setMinInclusive((float) -3.4028235E38); + typeValidator.setMaxInclusive((float) 3.4028235E38); } desc.setValidator(fieldValidator); - //-- _fontName - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_fontName", "fontName", org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); + //-- _showBootstrap + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showBootstrap", "showBootstrap", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Tree target = (Tree) object; - return target.getFontName(); + if (!target.hasShowBootstrap()) { return null; } + return (target.getShowBootstrap() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { Tree target = (Tree) object; - target.setFontName( (java.lang.String) value); + // if null, use delete method for optional primitives + if (value == null) { + target.deleteShowBootstrap(); + return; + } + target.setShowBootstrap( ((java.lang.Boolean) value).booleanValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -263,24 +262,23 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _fontName + //-- validation code for: _showBootstrap fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.StringValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); fieldValidator.setValidator(typeValidator); - typeValidator.setWhiteSpace("preserve"); } desc.setValidator(fieldValidator); - //-- _fontSize - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontSize", "fontSize", org.exolab.castor.xml.NodeType.Attribute); + //-- _showDistances + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showDistances", "showDistances", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Tree target = (Tree) object; - if (!target.hasFontSize()) { return null; } - return new java.lang.Integer(target.getFontSize()); + if (!target.hasShowDistances()) { return null; } + return (target.getShowDistances() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -289,10 +287,10 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto Tree target = (Tree) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteFontSize(); + target.deleteShowDistances(); return; } - target.setFontSize( ((java.lang.Integer) value).intValue()); + target.setShowDistances( ((java.lang.Boolean) value).booleanValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -305,25 +303,23 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _fontSize + //-- validation code for: _showDistances fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.IntValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive(-2147483648); - typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _fontStyle - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontStyle", "fontStyle", org.exolab.castor.xml.NodeType.Attribute); + //-- _markUnlinked + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_markUnlinked", "markUnlinked", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Tree target = (Tree) object; - if (!target.hasFontStyle()) { return null; } - return new java.lang.Integer(target.getFontStyle()); + if (!target.hasMarkUnlinked()) { return null; } + return (target.getMarkUnlinked() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -332,10 +328,10 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto Tree target = (Tree) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteFontStyle(); + target.deleteMarkUnlinked(); return; } - target.setFontStyle( ((java.lang.Integer) value).intValue()); + target.setMarkUnlinked( ((java.lang.Boolean) value).booleanValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -348,25 +344,23 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _fontStyle + //-- validation code for: _markUnlinked fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.IntValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive(-2147483648); - typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _threshold - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Float.TYPE, "_threshold", "threshold", org.exolab.castor.xml.NodeType.Attribute); + //-- _fitToWindow + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_fitToWindow", "fitToWindow", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Tree target = (Tree) object; - if (!target.hasThreshold()) { return null; } - return new java.lang.Float(target.getThreshold()); + if (!target.hasFitToWindow()) { return null; } + return (target.getFitToWindow() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -375,10 +369,10 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto Tree target = (Tree) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteThreshold(); + target.deleteFitToWindow(); return; } - target.setThreshold( ((java.lang.Float) value).floatValue()); + target.setFitToWindow( ((java.lang.Boolean) value).booleanValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -391,25 +385,23 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _threshold + //-- validation code for: _fitToWindow fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.FloatValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.FloatValidator(); + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive((float) -3.4028235E38); - typeValidator.setMaxInclusive((float) 3.4028235E38); } desc.setValidator(fieldValidator); - //-- _showBootstrap - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showBootstrap", "showBootstrap", org.exolab.castor.xml.NodeType.Attribute); + //-- _currentTree + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_currentTree", "currentTree", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Tree target = (Tree) object; - if (!target.hasShowBootstrap()) { return null; } - return (target.getShowBootstrap() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + if (!target.hasCurrentTree()) { return null; } + return (target.getCurrentTree() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -418,10 +410,10 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto Tree target = (Tree) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteShowBootstrap(); + target.deleteCurrentTree(); return; } - target.setShowBootstrap( ((java.lang.Boolean) value).booleanValue()); + target.setCurrentTree( ((java.lang.Boolean) value).booleanValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -434,7 +426,7 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _showBootstrap + //-- validation code for: _currentTree fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope org.exolab.castor.xml.validators.BooleanValidator typeValidator; @@ -442,56 +434,51 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); - //-- _showDistances - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showDistances", "showDistances", org.exolab.castor.xml.NodeType.Attribute); + //-- _id + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); + super.setIdentity(desc); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Tree target = (Tree) object; - if (!target.hasShowDistances()) { return null; } - return (target.getShowDistances() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + return target.getId(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { Tree target = (Tree) object; - // if null, use delete method for optional primitives - if (value == null) { - target.deleteShowDistances(); - return; - } - target.setShowDistances( ((java.lang.Boolean) value).booleanValue()); + target.setId( (java.lang.String) value); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } } public java.lang.Object newInstance(java.lang.Object parent) { - return null; + return new java.lang.String(); } }; desc.setHandler(handler); desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _showDistances + //-- validation code for: _id fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.BooleanValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + org.exolab.castor.xml.validators.IdValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IdValidator(); fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); - //-- _markUnlinked - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_markUnlinked", "markUnlinked", org.exolab.castor.xml.NodeType.Attribute); + //-- _width + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Tree target = (Tree) object; - if (!target.hasMarkUnlinked()) { return null; } - return (target.getMarkUnlinked() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + if (!target.hasWidth()) { return null; } + return new java.lang.Integer(target.getWidth()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -500,10 +487,10 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto Tree target = (Tree) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteMarkUnlinked(); + target.deleteWidth(); return; } - target.setMarkUnlinked( ((java.lang.Boolean) value).booleanValue()); + target.setWidth( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -516,23 +503,25 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _markUnlinked + //-- validation code for: _width fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.BooleanValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _fitToWindow - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_fitToWindow", "fitToWindow", org.exolab.castor.xml.NodeType.Attribute); + //-- _height + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Tree target = (Tree) object; - if (!target.hasFitToWindow()) { return null; } - return (target.getFitToWindow() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + if (!target.hasHeight()) { return null; } + return new java.lang.Integer(target.getHeight()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -541,10 +530,10 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto Tree target = (Tree) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteFitToWindow(); + target.deleteHeight(); return; } - target.setFitToWindow( ((java.lang.Boolean) value).booleanValue()); + target.setHeight( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -557,23 +546,25 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _fitToWindow + //-- validation code for: _height fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.BooleanValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _currentTree - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_currentTree", "currentTree", org.exolab.castor.xml.NodeType.Attribute); + //-- _xpos + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Tree target = (Tree) object; - if (!target.hasCurrentTree()) { return null; } - return (target.getCurrentTree() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + if (!target.hasXpos()) { return null; } + return new java.lang.Integer(target.getXpos()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -582,10 +573,10 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto Tree target = (Tree) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteCurrentTree(); + target.deleteXpos(); return; } - target.setCurrentTree( ((java.lang.Boolean) value).booleanValue()); + target.setXpos( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -598,48 +589,57 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _currentTree + //-- validation code for: _xpos fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.BooleanValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _id - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); - super.setIdentity(desc); + //-- _ypos + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Tree target = (Tree) object; - return target.getId(); + if (!target.hasYpos()) { return null; } + return new java.lang.Integer(target.getYpos()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { Tree target = (Tree) object; - target.setId( (java.lang.String) value); + // if null, use delete method for optional primitives + if (value == null) { + target.deleteYpos(); + return; + } + target.setYpos( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } } public java.lang.Object newInstance(java.lang.Object parent) { - return new java.lang.String(); + return null; } }; desc.setHandler(handler); desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _id + //-- validation code for: _ypos fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.IdValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.IdValidator(); + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); //-- initialize element descriptors diff --git a/src/jalview/schemabinding/version2/descriptors/ViewportDescriptor.java b/src/jalview/schemabinding/version2/descriptors/ViewportDescriptor.java index ed50a68..4872d24 100644 --- a/src/jalview/schemabinding/version2/descriptors/ViewportDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/ViewportDescriptor.java @@ -1125,15 +1125,15 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); - //-- _xpos - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute); + //-- _startRes + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_startRes", "startRes", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Viewport target = (Viewport) object; - if (!target.hasXpos()) { return null; } - return new java.lang.Integer(target.getXpos()); + if (!target.hasStartRes()) { return null; } + return new java.lang.Integer(target.getStartRes()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -1142,10 +1142,10 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr Viewport target = (Viewport) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteXpos(); + target.deleteStartRes(); return; } - target.setXpos( ((java.lang.Integer) value).intValue()); + target.setStartRes( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -1158,7 +1158,7 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _xpos + //-- validation code for: _startRes fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope org.exolab.castor.xml.validators.IntValidator typeValidator; @@ -1168,15 +1168,15 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _ypos - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute); + //-- _startSeq + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_startSeq", "startSeq", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Viewport target = (Viewport) object; - if (!target.hasYpos()) { return null; } - return new java.lang.Integer(target.getYpos()); + if (!target.hasStartSeq()) { return null; } + return new java.lang.Integer(target.getStartSeq()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -1185,10 +1185,10 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr Viewport target = (Viewport) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteYpos(); + target.deleteStartSeq(); return; } - target.setYpos( ((java.lang.Integer) value).intValue()); + target.setStartSeq( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -1201,7 +1201,7 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _ypos + //-- validation code for: _startSeq fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope org.exolab.castor.xml.validators.IntValidator typeValidator; @@ -1211,27 +1211,22 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _width - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute); + //-- _fontName + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_fontName", "fontName", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Viewport target = (Viewport) object; - if (!target.hasWidth()) { return null; } - return new java.lang.Integer(target.getWidth()); + return target.getFontName(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) { - target.deleteWidth(); - return; - } - target.setWidth( ((java.lang.Integer) value).intValue()); + target.setFontName( (java.lang.String) value); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -1244,25 +1239,24 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _width + //-- validation code for: _fontName fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.IntValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive(-2147483648); - typeValidator.setMaxInclusive(2147483647); + typeValidator.setWhiteSpace("preserve"); } desc.setValidator(fieldValidator); - //-- _height - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute); + //-- _fontSize + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontSize", "fontSize", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Viewport target = (Viewport) object; - if (!target.hasHeight()) { return null; } - return new java.lang.Integer(target.getHeight()); + if (!target.hasFontSize()) { return null; } + return new java.lang.Integer(target.getFontSize()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -1271,10 +1265,10 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr Viewport target = (Viewport) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteHeight(); + target.deleteFontSize(); return; } - target.setHeight( ((java.lang.Integer) value).intValue()); + target.setFontSize( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -1287,7 +1281,7 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _height + //-- validation code for: _fontSize fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope org.exolab.castor.xml.validators.IntValidator typeValidator; @@ -1297,15 +1291,15 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _startRes - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_startRes", "startRes", org.exolab.castor.xml.NodeType.Attribute); + //-- _fontStyle + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontStyle", "fontStyle", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Viewport target = (Viewport) object; - if (!target.hasStartRes()) { return null; } - return new java.lang.Integer(target.getStartRes()); + if (!target.hasFontStyle()) { return null; } + return new java.lang.Integer(target.getFontStyle()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -1314,10 +1308,10 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr Viewport target = (Viewport) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteStartRes(); + target.deleteFontStyle(); return; } - target.setStartRes( ((java.lang.Integer) value).intValue()); + target.setFontStyle( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -1330,7 +1324,7 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _startRes + //-- validation code for: _fontStyle fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope org.exolab.castor.xml.validators.IntValidator typeValidator; @@ -1340,27 +1334,22 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _startSeq - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_startSeq", "startSeq", org.exolab.castor.xml.NodeType.Attribute); + //-- _viewName + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_viewName", "viewName", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Viewport target = (Viewport) object; - if (!target.hasStartSeq()) { return null; } - return new java.lang.Integer(target.getStartSeq()); + return target.getViewName(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) { - target.deleteStartSeq(); - return; - } - target.setStartSeq( ((java.lang.Integer) value).intValue()); + target.setViewName( (java.lang.String) value); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -1373,32 +1362,31 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _startSeq + //-- validation code for: _viewName fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.IntValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive(-2147483648); - typeValidator.setMaxInclusive(2147483647); + typeValidator.setWhiteSpace("preserve"); } desc.setValidator(fieldValidator); - //-- _fontName - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_fontName", "fontName", org.exolab.castor.xml.NodeType.Attribute); + //-- _sequenceSetId + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_sequenceSetId", "sequenceSetId", org.exolab.castor.xml.NodeType.Attribute); desc.setImmutable(true); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Viewport target = (Viewport) object; - return target.getFontName(); + return target.getSequenceSetId(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { Viewport target = (Viewport) object; - target.setFontName( (java.lang.String) value); + target.setSequenceSetId( (java.lang.String) value); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -1411,7 +1399,7 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _fontName + //-- validation code for: _sequenceSetId fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope org.exolab.castor.xml.validators.StringValidator typeValidator; @@ -1420,15 +1408,15 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr typeValidator.setWhiteSpace("preserve"); } desc.setValidator(fieldValidator); - //-- _fontSize - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontSize", "fontSize", org.exolab.castor.xml.NodeType.Attribute); + //-- _gatheredViews + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_gatheredViews", "gatheredViews", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Viewport target = (Viewport) object; - if (!target.hasFontSize()) { return null; } - return new java.lang.Integer(target.getFontSize()); + if (!target.hasGatheredViews()) { return null; } + return (target.getGatheredViews() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -1437,10 +1425,10 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr Viewport target = (Viewport) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteFontSize(); + target.deleteGatheredViews(); return; } - target.setFontSize( ((java.lang.Integer) value).intValue()); + target.setGatheredViews( ((java.lang.Boolean) value).booleanValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -1453,25 +1441,23 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _fontSize + //-- validation code for: _gatheredViews fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.IntValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive(-2147483648); - typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _fontStyle - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontStyle", "fontStyle", org.exolab.castor.xml.NodeType.Attribute); + //-- _textCol1 + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol1", "textCol1", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Viewport target = (Viewport) object; - if (!target.hasFontStyle()) { return null; } - return new java.lang.Integer(target.getFontStyle()); + if (!target.hasTextCol1()) { return null; } + return new java.lang.Integer(target.getTextCol1()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -1480,10 +1466,10 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr Viewport target = (Viewport) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteFontStyle(); + target.deleteTextCol1(); return; } - target.setFontStyle( ((java.lang.Integer) value).intValue()); + target.setTextCol1( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -1496,7 +1482,7 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _fontStyle + //-- validation code for: _textCol1 fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope org.exolab.castor.xml.validators.IntValidator typeValidator; @@ -1506,22 +1492,27 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _viewName - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_viewName", "viewName", org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); + //-- _textCol2 + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol2", "textCol2", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Viewport target = (Viewport) object; - return target.getViewName(); + if (!target.hasTextCol2()) { return null; } + return new java.lang.Integer(target.getTextCol2()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { Viewport target = (Viewport) object; - target.setViewName( (java.lang.String) value); + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTextCol2(); + return; + } + target.setTextCol2( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -1534,31 +1525,37 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _viewName + //-- validation code for: _textCol2 fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.StringValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); fieldValidator.setValidator(typeValidator); - typeValidator.setWhiteSpace("preserve"); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _sequenceSetId - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_sequenceSetId", "sequenceSetId", org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); + //-- _textColThreshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textColThreshold", "textColThreshold", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Viewport target = (Viewport) object; - return target.getSequenceSetId(); + if (!target.hasTextColThreshold()) { return null; } + return new java.lang.Integer(target.getTextColThreshold()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { Viewport target = (Viewport) object; - target.setSequenceSetId( (java.lang.String) value); + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTextColThreshold(); + return; + } + target.setTextColThreshold( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -1571,65 +1568,61 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _sequenceSetId + //-- validation code for: _textColThreshold fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.StringValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); fieldValidator.setValidator(typeValidator); - typeValidator.setWhiteSpace("preserve"); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _gatheredViews - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_gatheredViews", "gatheredViews", org.exolab.castor.xml.NodeType.Attribute); + //-- _id + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); + super.setIdentity(desc); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Viewport target = (Viewport) object; - if (!target.hasGatheredViews()) { return null; } - return (target.getGatheredViews() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + return target.getId(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) { - target.deleteGatheredViews(); - return; - } - target.setGatheredViews( ((java.lang.Boolean) value).booleanValue()); + target.setId( (java.lang.String) value); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } } public java.lang.Object newInstance(java.lang.Object parent) { - return null; + return new java.lang.String(); } }; desc.setHandler(handler); desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _gatheredViews + //-- validation code for: _id fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.BooleanValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + org.exolab.castor.xml.validators.IdValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IdValidator(); fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); - //-- _textCol1 - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol1", "textCol1", org.exolab.castor.xml.NodeType.Attribute); + //-- _width + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Viewport target = (Viewport) object; - if (!target.hasTextCol1()) { return null; } - return new java.lang.Integer(target.getTextCol1()); + if (!target.hasWidth()) { return null; } + return new java.lang.Integer(target.getWidth()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -1638,10 +1631,10 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr Viewport target = (Viewport) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteTextCol1(); + target.deleteWidth(); return; } - target.setTextCol1( ((java.lang.Integer) value).intValue()); + target.setWidth( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -1654,7 +1647,7 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _textCol1 + //-- validation code for: _width fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope org.exolab.castor.xml.validators.IntValidator typeValidator; @@ -1664,15 +1657,15 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _textCol2 - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol2", "textCol2", org.exolab.castor.xml.NodeType.Attribute); + //-- _height + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Viewport target = (Viewport) object; - if (!target.hasTextCol2()) { return null; } - return new java.lang.Integer(target.getTextCol2()); + if (!target.hasHeight()) { return null; } + return new java.lang.Integer(target.getHeight()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -1681,10 +1674,10 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr Viewport target = (Viewport) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteTextCol2(); + target.deleteHeight(); return; } - target.setTextCol2( ((java.lang.Integer) value).intValue()); + target.setHeight( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -1697,7 +1690,7 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _textCol2 + //-- validation code for: _height fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope org.exolab.castor.xml.validators.IntValidator typeValidator; @@ -1707,15 +1700,15 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _textColThreshold - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textColThreshold", "textColThreshold", org.exolab.castor.xml.NodeType.Attribute); + //-- _xpos + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Viewport target = (Viewport) object; - if (!target.hasTextColThreshold()) { return null; } - return new java.lang.Integer(target.getTextColThreshold()); + if (!target.hasXpos()) { return null; } + return new java.lang.Integer(target.getXpos()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -1724,10 +1717,10 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr Viewport target = (Viewport) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteTextColThreshold(); + target.deleteXpos(); return; } - target.setTextColThreshold( ((java.lang.Integer) value).intValue()); + target.setXpos( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -1740,7 +1733,7 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _textColThreshold + //-- validation code for: _xpos fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope org.exolab.castor.xml.validators.IntValidator typeValidator; @@ -1750,40 +1743,47 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); - //-- _id - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); - super.setIdentity(desc); + //-- _ypos + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Viewport target = (Viewport) object; - return target.getId(); + if (!target.hasYpos()) { return null; } + return new java.lang.Integer(target.getYpos()); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { Viewport target = (Viewport) object; - target.setId( (java.lang.String) value); + // if null, use delete method for optional primitives + if (value == null) { + target.deleteYpos(); + return; + } + target.setYpos( ((java.lang.Integer) value).intValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } } public java.lang.Object newInstance(java.lang.Object parent) { - return new java.lang.String(); + return null; } }; desc.setHandler(handler); desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _id + //-- validation code for: _ypos fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope - org.exolab.castor.xml.validators.IdValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.IdValidator(); + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); } desc.setValidator(fieldValidator); //-- initialize element descriptors -- 1.7.10.2