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