X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemabinding%2Fversion2%2Fdescriptors%2FStructureStateDescriptor.java;h=44eb9d3d56a92cd1ea14020055482b3df4304274;hb=0233fbee0ff0d7fad302aa2da743c51fd64be101;hp=31f2389a62e0b9a32a791e0a73eb5d5da7bac438;hpb=09ee1649c4427f534331aa2017a890529f0932f5;p=jalview.git diff --git a/src/jalview/schemabinding/version2/descriptors/StructureStateDescriptor.java b/src/jalview/schemabinding/version2/descriptors/StructureStateDescriptor.java index 31f2389..44eb9d3 100644 --- a/src/jalview/schemabinding/version2/descriptors/StructureStateDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/StructureStateDescriptor.java @@ -1,10 +1,21 @@ /* - * This class was automatically generated with - * Castor 1.1, using an XML - * Schema. - * $Id$ + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) + * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ - package jalview.schemabinding.version2.descriptors; //---------------------------------/ @@ -45,11 +56,6 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas */ private java.lang.String _xmlName; - /** - * Field _identity. - */ - private org.exolab.castor.xml.XMLFieldDescriptor _identity; - //----------------/ //- Constructors -/ @@ -314,6 +320,43 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas 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); + 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(); + } + 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); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _viewId + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); //-- initialize element descriptors } @@ -341,7 +384,7 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas */ public org.exolab.castor.mapping.FieldDescriptor getIdentity( ) { - return _identity; + return super.getIdentity(); } /**