JAL-1767 schema and Castor changes for Save PCA in project
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / SeqPointMinDescriptor.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.SeqPointMin;
15
16 /**
17  * Class SeqPointMinDescriptor.
18  * 
19  * @version $Revision$ $Date$
20  */
21 public class SeqPointMinDescriptor
22         extends 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 SeqPointMinDescriptor()
54   {
55     super();
56     _nsURI = "www.jalview.org";
57     _xmlName = "seqPointMin";
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     // -- _xPos
65     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
66             java.lang.Float.TYPE, "_xPos", "xPos",
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         SeqPointMin target = (SeqPointMin) object;
74         if (!target.hasXPos())
75         {
76           return null;
77         }
78         return new java.lang.Float(target.getXPos());
79       }
80
81       public void setValue(java.lang.Object object, java.lang.Object value)
82               throws IllegalStateException, IllegalArgumentException
83       {
84         try
85         {
86           SeqPointMin target = (SeqPointMin) object;
87           // if null, use delete method for optional primitives
88           if (value == null)
89           {
90             target.deleteXPos();
91             return;
92           }
93           target.setXPos(((java.lang.Float) value).floatValue());
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: _xPos
110     fieldValidator = new org.exolab.castor.xml.FieldValidator();
111     { // -- local scope
112       org.exolab.castor.xml.validators.FloatValidator typeValidator;
113       typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
114       fieldValidator.setValidator(typeValidator);
115       typeValidator.setMinInclusive((float) -3.4028235E38);
116       typeValidator.setMaxInclusive((float) 3.4028235E38);
117     }
118     desc.setValidator(fieldValidator);
119     // -- _yPos
120     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
121             java.lang.Float.TYPE, "_yPos", "yPos",
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         SeqPointMin target = (SeqPointMin) object;
129         if (!target.hasYPos())
130         {
131           return null;
132         }
133         return new java.lang.Float(target.getYPos());
134       }
135
136       public void setValue(java.lang.Object object, java.lang.Object value)
137               throws IllegalStateException, IllegalArgumentException
138       {
139         try
140         {
141           SeqPointMin target = (SeqPointMin) object;
142           // if null, use delete method for optional primitives
143           if (value == null)
144           {
145             target.deleteYPos();
146             return;
147           }
148           target.setYPos(((java.lang.Float) value).floatValue());
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: _yPos
165     fieldValidator = new org.exolab.castor.xml.FieldValidator();
166     { // -- local scope
167       org.exolab.castor.xml.validators.FloatValidator typeValidator;
168       typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
169       fieldValidator.setValidator(typeValidator);
170       typeValidator.setMinInclusive((float) -3.4028235E38);
171       typeValidator.setMaxInclusive((float) 3.4028235E38);
172     }
173     desc.setValidator(fieldValidator);
174     // -- _zPos
175     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
176             java.lang.Float.TYPE, "_zPos", "zPos",
177             org.exolab.castor.xml.NodeType.Attribute);
178     handler = new org.exolab.castor.xml.XMLFieldHandler()
179     {
180       public java.lang.Object getValue(java.lang.Object object)
181               throws IllegalStateException
182       {
183         SeqPointMin target = (SeqPointMin) object;
184         if (!target.hasZPos())
185         {
186           return null;
187         }
188         return new java.lang.Float(target.getZPos());
189       }
190
191       public void setValue(java.lang.Object object, java.lang.Object value)
192               throws IllegalStateException, IllegalArgumentException
193       {
194         try
195         {
196           SeqPointMin target = (SeqPointMin) object;
197           // if null, use delete method for optional primitives
198           if (value == null)
199           {
200             target.deleteZPos();
201             return;
202           }
203           target.setZPos(((java.lang.Float) value).floatValue());
204         } catch (java.lang.Exception ex)
205         {
206           throw new IllegalStateException(ex.toString());
207         }
208       }
209
210       public java.lang.Object newInstance(java.lang.Object parent)
211       {
212         return null;
213       }
214     };
215     desc.setHandler(handler);
216     desc.setMultivalued(false);
217     addFieldDescriptor(desc);
218
219     // -- validation code for: _zPos
220     fieldValidator = new org.exolab.castor.xml.FieldValidator();
221     { // -- local scope
222       org.exolab.castor.xml.validators.FloatValidator typeValidator;
223       typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
224       fieldValidator.setValidator(typeValidator);
225       typeValidator.setMinInclusive((float) -3.4028235E38);
226       typeValidator.setMaxInclusive((float) 3.4028235E38);
227     }
228     desc.setValidator(fieldValidator);
229     // -- initialize element descriptors
230
231   }
232
233   // -----------/
234   // - Methods -/
235   // -----------/
236
237   /**
238    * Method getAccessMode.
239    * 
240    * @return the access mode specified for this class.
241    */
242   public org.exolab.castor.mapping.AccessMode getAccessMode()
243   {
244     return null;
245   }
246
247   /**
248    * Method getIdentity.
249    * 
250    * @return the identity field, null if this class has no identity.
251    */
252   public org.exolab.castor.mapping.FieldDescriptor getIdentity()
253   {
254     return super.getIdentity();
255   }
256
257   /**
258    * Method getJavaClass.
259    * 
260    * @return the Java class represented by this descriptor.
261    */
262   public java.lang.Class getJavaClass()
263   {
264     return jalview.schemabinding.version2.SeqPointMin.class;
265   }
266
267   /**
268    * Method getNameSpacePrefix.
269    * 
270    * @return the namespace prefix to use when marshaling as XML.
271    */
272   public java.lang.String getNameSpacePrefix()
273   {
274     return _nsPrefix;
275   }
276
277   /**
278    * Method getNameSpaceURI.
279    * 
280    * @return the namespace URI used when marshaling and unmarshaling as XML.
281    */
282   public java.lang.String getNameSpaceURI()
283   {
284     return _nsURI;
285   }
286
287   /**
288    * Method getValidator.
289    * 
290    * @return a specific validator for the class described by this
291    *         ClassDescriptor.
292    */
293   public org.exolab.castor.xml.TypeValidator getValidator()
294   {
295     return this;
296   }
297
298   /**
299    * Method getXMLName.
300    * 
301    * @return the XML Name for the Class being described.
302    */
303   public java.lang.String getXMLName()
304   {
305     return _xmlName;
306   }
307
308   /**
309    * Method isElementDefinition.
310    * 
311    * @return true if XML schema definition of this Class is that of a global
312    *         element or element with anonymous type definition.
313    */
314   public boolean isElementDefinition()
315   {
316     return _elementDefinition;
317   }
318
319 }