JAL-1645 source formatting and organise imports
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / HiddenColumnsDescriptor.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package jalview.schemabinding.version2.descriptors;
9
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
13
14 import jalview.schemabinding.version2.HiddenColumns;
15
16 /**
17  * Class HiddenColumnsDescriptor.
18  * 
19  * @version $Revision$ $Date$
20  */
21 public class HiddenColumnsDescriptor extends
22         org.exolab.castor.xml.util.XMLClassDescriptorImpl
23 {
24
25   // --------------------------/
26   // - Class/Member Variables -/
27   // --------------------------/
28
29   /**
30    * Field _elementDefinition.
31    */
32   private boolean _elementDefinition;
33
34   /**
35    * Field _nsPrefix.
36    */
37   private java.lang.String _nsPrefix;
38
39   /**
40    * Field _nsURI.
41    */
42   private java.lang.String _nsURI;
43
44   /**
45    * Field _xmlName.
46    */
47   private java.lang.String _xmlName;
48
49   // ----------------/
50   // - Constructors -/
51   // ----------------/
52
53   public HiddenColumnsDescriptor()
54   {
55     super();
56     _nsURI = "www.jalview.org";
57     _xmlName = "hiddenColumns";
58     _elementDefinition = true;
59     org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
60     org.exolab.castor.mapping.FieldHandler handler = null;
61     org.exolab.castor.xml.FieldValidator fieldValidator = null;
62     // -- initialize attribute descriptors
63
64     // -- _start
65     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
66             java.lang.Integer.TYPE, "_start", "start",
67             org.exolab.castor.xml.NodeType.Attribute);
68     handler = new org.exolab.castor.xml.XMLFieldHandler()
69     {
70       public java.lang.Object getValue(java.lang.Object object)
71               throws IllegalStateException
72       {
73         HiddenColumns target = (HiddenColumns) object;
74         if (!target.hasStart())
75         {
76           return null;
77         }
78         return new java.lang.Integer(target.getStart());
79       }
80
81       public void setValue(java.lang.Object object, java.lang.Object value)
82               throws IllegalStateException, IllegalArgumentException
83       {
84         try
85         {
86           HiddenColumns target = (HiddenColumns) object;
87           // if null, use delete method for optional primitives
88           if (value == null)
89           {
90             target.deleteStart();
91             return;
92           }
93           target.setStart(((java.lang.Integer) value).intValue());
94         } catch (java.lang.Exception ex)
95         {
96           throw new IllegalStateException(ex.toString());
97         }
98       }
99
100       public java.lang.Object newInstance(java.lang.Object parent)
101       {
102         return null;
103       }
104     };
105     desc.setHandler(handler);
106     desc.setMultivalued(false);
107     addFieldDescriptor(desc);
108
109     // -- validation code for: _start
110     fieldValidator = new org.exolab.castor.xml.FieldValidator();
111     { // -- local scope
112       org.exolab.castor.xml.validators.IntValidator typeValidator;
113       typeValidator = new org.exolab.castor.xml.validators.IntValidator();
114       fieldValidator.setValidator(typeValidator);
115       typeValidator.setMinInclusive(-2147483648);
116       typeValidator.setMaxInclusive(2147483647);
117     }
118     desc.setValidator(fieldValidator);
119     // -- _end
120     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
121             java.lang.Integer.TYPE, "_end", "end",
122             org.exolab.castor.xml.NodeType.Attribute);
123     handler = new org.exolab.castor.xml.XMLFieldHandler()
124     {
125       public java.lang.Object getValue(java.lang.Object object)
126               throws IllegalStateException
127       {
128         HiddenColumns target = (HiddenColumns) object;
129         if (!target.hasEnd())
130         {
131           return null;
132         }
133         return new java.lang.Integer(target.getEnd());
134       }
135
136       public void setValue(java.lang.Object object, java.lang.Object value)
137               throws IllegalStateException, IllegalArgumentException
138       {
139         try
140         {
141           HiddenColumns target = (HiddenColumns) object;
142           // if null, use delete method for optional primitives
143           if (value == null)
144           {
145             target.deleteEnd();
146             return;
147           }
148           target.setEnd(((java.lang.Integer) value).intValue());
149         } catch (java.lang.Exception ex)
150         {
151           throw new IllegalStateException(ex.toString());
152         }
153       }
154
155       public java.lang.Object newInstance(java.lang.Object parent)
156       {
157         return null;
158       }
159     };
160     desc.setHandler(handler);
161     desc.setMultivalued(false);
162     addFieldDescriptor(desc);
163
164     // -- validation code for: _end
165     fieldValidator = new org.exolab.castor.xml.FieldValidator();
166     { // -- local scope
167       org.exolab.castor.xml.validators.IntValidator typeValidator;
168       typeValidator = new org.exolab.castor.xml.validators.IntValidator();
169       fieldValidator.setValidator(typeValidator);
170       typeValidator.setMinInclusive(-2147483648);
171       typeValidator.setMaxInclusive(2147483647);
172     }
173     desc.setValidator(fieldValidator);
174     // -- initialize element descriptors
175
176   }
177
178   // -----------/
179   // - Methods -/
180   // -----------/
181
182   /**
183    * Method getAccessMode.
184    * 
185    * @return the access mode specified for this class.
186    */
187   public org.exolab.castor.mapping.AccessMode getAccessMode()
188   {
189     return null;
190   }
191
192   /**
193    * Method getIdentity.
194    * 
195    * @return the identity field, null if this class has no identity.
196    */
197   public org.exolab.castor.mapping.FieldDescriptor getIdentity()
198   {
199     return super.getIdentity();
200   }
201
202   /**
203    * Method getJavaClass.
204    * 
205    * @return the Java class represented by this descriptor.
206    */
207   public java.lang.Class getJavaClass()
208   {
209     return jalview.schemabinding.version2.HiddenColumns.class;
210   }
211
212   /**
213    * Method getNameSpacePrefix.
214    * 
215    * @return the namespace prefix to use when marshaling as XML.
216    */
217   public java.lang.String getNameSpacePrefix()
218   {
219     return _nsPrefix;
220   }
221
222   /**
223    * Method getNameSpaceURI.
224    * 
225    * @return the namespace URI used when marshaling and unmarshaling as XML.
226    */
227   public java.lang.String getNameSpaceURI()
228   {
229     return _nsURI;
230   }
231
232   /**
233    * Method getValidator.
234    * 
235    * @return a specific validator for the class described by this
236    *         ClassDescriptor.
237    */
238   public org.exolab.castor.xml.TypeValidator getValidator()
239   {
240     return this;
241   }
242
243   /**
244    * Method getXMLName.
245    * 
246    * @return the XML Name for the Class being described.
247    */
248   public java.lang.String getXMLName()
249   {
250     return _xmlName;
251   }
252
253   /**
254    * Method isElementDefinition.
255    * 
256    * @return true if XML schema definition of this Class is that of a global
257    *         element or element with anonymous type definition.
258    */
259   public boolean isElementDefinition()
260   {
261     return _elementDefinition;
262   }
263
264 }