1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
3 * Copyright (C) 2014 The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview.
17 * If not, see <http://www.gnu.org/licenses/>.
18 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 ******************************************************************************/
21 * This class was automatically generated with
22 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
27 package jalview.schemabinding.version2.descriptors;
29 //---------------------------------/
30 //- Imported classes and packages -/
31 //---------------------------------/
33 import jalview.schemabinding.version2.HiddenColumns;
36 * Class HiddenColumnsDescriptor.
38 * @version $Revision$ $Date$
40 public class HiddenColumnsDescriptor extends
41 org.exolab.castor.xml.util.XMLClassDescriptorImpl
44 // --------------------------/
45 // - Class/Member Variables -/
46 // --------------------------/
49 * Field _elementDefinition.
51 private boolean _elementDefinition;
56 private java.lang.String _nsPrefix;
61 private java.lang.String _nsURI;
66 private java.lang.String _xmlName;
72 public HiddenColumnsDescriptor()
75 _nsURI = "www.jalview.org";
76 _xmlName = "hiddenColumns";
77 _elementDefinition = true;
78 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
79 org.exolab.castor.mapping.FieldHandler handler = null;
80 org.exolab.castor.xml.FieldValidator fieldValidator = null;
81 // -- initialize attribute descriptors
84 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
85 java.lang.Integer.TYPE, "_start", "start",
86 org.exolab.castor.xml.NodeType.Attribute);
87 handler = new org.exolab.castor.xml.XMLFieldHandler()
89 public java.lang.Object getValue(java.lang.Object object)
90 throws IllegalStateException
92 HiddenColumns target = (HiddenColumns) object;
93 if (!target.hasStart())
97 return new java.lang.Integer(target.getStart());
100 public void setValue(java.lang.Object object, java.lang.Object value)
101 throws IllegalStateException, IllegalArgumentException
105 HiddenColumns target = (HiddenColumns) object;
106 // if null, use delete method for optional primitives
109 target.deleteStart();
112 target.setStart(((java.lang.Integer) value).intValue());
113 } catch (java.lang.Exception ex)
115 throw new IllegalStateException(ex.toString());
119 public java.lang.Object newInstance(java.lang.Object parent)
124 desc.setHandler(handler);
125 desc.setMultivalued(false);
126 addFieldDescriptor(desc);
128 // -- validation code for: _start
129 fieldValidator = new org.exolab.castor.xml.FieldValidator();
131 org.exolab.castor.xml.validators.IntValidator typeValidator;
132 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
133 fieldValidator.setValidator(typeValidator);
134 typeValidator.setMinInclusive(-2147483648);
135 typeValidator.setMaxInclusive(2147483647);
137 desc.setValidator(fieldValidator);
139 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
140 java.lang.Integer.TYPE, "_end", "end",
141 org.exolab.castor.xml.NodeType.Attribute);
142 handler = new org.exolab.castor.xml.XMLFieldHandler()
144 public java.lang.Object getValue(java.lang.Object object)
145 throws IllegalStateException
147 HiddenColumns target = (HiddenColumns) object;
148 if (!target.hasEnd())
152 return new java.lang.Integer(target.getEnd());
155 public void setValue(java.lang.Object object, java.lang.Object value)
156 throws IllegalStateException, IllegalArgumentException
160 HiddenColumns target = (HiddenColumns) object;
161 // if null, use delete method for optional primitives
167 target.setEnd(((java.lang.Integer) value).intValue());
168 } catch (java.lang.Exception ex)
170 throw new IllegalStateException(ex.toString());
174 public java.lang.Object newInstance(java.lang.Object parent)
179 desc.setHandler(handler);
180 desc.setMultivalued(false);
181 addFieldDescriptor(desc);
183 // -- validation code for: _end
184 fieldValidator = new org.exolab.castor.xml.FieldValidator();
186 org.exolab.castor.xml.validators.IntValidator typeValidator;
187 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
188 fieldValidator.setValidator(typeValidator);
189 typeValidator.setMinInclusive(-2147483648);
190 typeValidator.setMaxInclusive(2147483647);
192 desc.setValidator(fieldValidator);
193 // -- initialize element descriptors
202 * Method getAccessMode.
204 * @return the access mode specified for this class.
206 public org.exolab.castor.mapping.AccessMode getAccessMode()
212 * Method getIdentity.
214 * @return the identity field, null if this class has no identity.
216 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
218 return super.getIdentity();
222 * Method getJavaClass.
224 * @return the Java class represented by this descriptor.
226 public java.lang.Class getJavaClass()
228 return jalview.schemabinding.version2.HiddenColumns.class;
232 * Method getNameSpacePrefix.
234 * @return the namespace prefix to use when marshaling as XML.
236 public java.lang.String getNameSpacePrefix()
242 * Method getNameSpaceURI.
244 * @return the namespace URI used when marshaling and unmarshaling as XML.
246 public java.lang.String getNameSpaceURI()
252 * Method getValidator.
254 * @return a specific validator for the class described by this
257 public org.exolab.castor.xml.TypeValidator getValidator()
265 * @return the XML Name for the Class being described.
267 public java.lang.String getXMLName()
273 * Method isElementDefinition.
275 * @return true if XML schema definition of this Class is that of a global
276 * element or element with anonymous type definition.
278 public boolean isElementDefinition()
280 return _elementDefinition;