2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package jalview.schemabinding.version2.descriptors;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import jalview.schemabinding.version2.HiddenColumns;
17 * Class HiddenColumnsDescriptor.
19 * @version $Revision$ $Date$
21 public class HiddenColumnsDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
24 //--------------------------/
25 //- Class/Member Variables -/
26 //--------------------------/
29 * Field _elementDefinition.
31 private boolean _elementDefinition;
36 private java.lang.String _nsPrefix;
41 private java.lang.String _nsURI;
46 private java.lang.String _xmlName;
53 public HiddenColumnsDescriptor() {
55 _nsURI = "www.jalview.org";
56 _xmlName = "hiddenColumns";
57 _elementDefinition = true;
58 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
59 org.exolab.castor.mapping.FieldHandler handler = null;
60 org.exolab.castor.xml.FieldValidator fieldValidator = null;
61 //-- initialize attribute descriptors
64 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_start", "start", org.exolab.castor.xml.NodeType.Attribute);
65 handler = new org.exolab.castor.xml.XMLFieldHandler() {
66 public java.lang.Object getValue( java.lang.Object object )
67 throws IllegalStateException
69 HiddenColumns target = (HiddenColumns) object;
70 if (!target.hasStart()) { return null; }
71 return new java.lang.Integer(target.getStart());
73 public void setValue( java.lang.Object object, java.lang.Object value)
74 throws IllegalStateException, IllegalArgumentException
77 HiddenColumns target = (HiddenColumns) object;
78 // if null, use delete method for optional primitives
83 target.setStart( ((java.lang.Integer) value).intValue());
84 } catch (java.lang.Exception ex) {
85 throw new IllegalStateException(ex.toString());
88 public java.lang.Object newInstance(java.lang.Object parent) {
92 desc.setHandler(handler);
93 desc.setMultivalued(false);
94 addFieldDescriptor(desc);
96 //-- validation code for: _start
97 fieldValidator = new org.exolab.castor.xml.FieldValidator();
99 org.exolab.castor.xml.validators.IntValidator typeValidator;
100 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
101 fieldValidator.setValidator(typeValidator);
102 typeValidator.setMinInclusive(-2147483648);
103 typeValidator.setMaxInclusive(2147483647);
105 desc.setValidator(fieldValidator);
107 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute);
108 handler = new org.exolab.castor.xml.XMLFieldHandler() {
109 public java.lang.Object getValue( java.lang.Object object )
110 throws IllegalStateException
112 HiddenColumns target = (HiddenColumns) object;
113 if (!target.hasEnd()) { return null; }
114 return new java.lang.Integer(target.getEnd());
116 public void setValue( java.lang.Object object, java.lang.Object value)
117 throws IllegalStateException, IllegalArgumentException
120 HiddenColumns target = (HiddenColumns) object;
121 // if null, use delete method for optional primitives
126 target.setEnd( ((java.lang.Integer) value).intValue());
127 } catch (java.lang.Exception ex) {
128 throw new IllegalStateException(ex.toString());
131 public java.lang.Object newInstance(java.lang.Object parent) {
135 desc.setHandler(handler);
136 desc.setMultivalued(false);
137 addFieldDescriptor(desc);
139 //-- validation code for: _end
140 fieldValidator = new org.exolab.castor.xml.FieldValidator();
142 org.exolab.castor.xml.validators.IntValidator typeValidator;
143 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
144 fieldValidator.setValidator(typeValidator);
145 typeValidator.setMinInclusive(-2147483648);
146 typeValidator.setMaxInclusive(2147483647);
148 desc.setValidator(fieldValidator);
149 //-- initialize element descriptors
159 * Method getAccessMode.
161 * @return the access mode specified for this class.
163 public org.exolab.castor.mapping.AccessMode getAccessMode(
169 * Method getIdentity.
171 * @return the identity field, null if this class has no
174 public org.exolab.castor.mapping.FieldDescriptor getIdentity(
176 return super.getIdentity();
180 * Method getJavaClass.
182 * @return the Java class represented by this descriptor.
184 public java.lang.Class getJavaClass(
186 return jalview.schemabinding.version2.HiddenColumns.class;
190 * Method getNameSpacePrefix.
192 * @return the namespace prefix to use when marshaling as XML.
194 public java.lang.String getNameSpacePrefix(
200 * Method getNameSpaceURI.
202 * @return the namespace URI used when marshaling and
203 * unmarshaling as XML.
205 public java.lang.String getNameSpaceURI(
211 * Method getValidator.
213 * @return a specific validator for the class described by this
216 public org.exolab.castor.xml.TypeValidator getValidator(
224 * @return the XML Name for the Class being described.
226 public java.lang.String getXMLName(
232 * Method isElementDefinition.
234 * @return true if XML schema definition of this Class is that
236 * element or element with anonymous type definition.
238 public boolean isElementDefinition(
240 return _elementDefinition;