Merge branch 'features/pca_jaxb_datasetrefs_JAL-3171_JAL-3063_JAL-1767' into develop
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / SequencePointDescriptor.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.SequencePoint;
15
16 /**
17  * Class SequencePointDescriptor.
18  * 
19  * @version $Revision$ $Date$
20  */
21 public class SequencePointDescriptor
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 SequencePointDescriptor()
54   {
55     super();
56     _nsURI = "www.jalview.org";
57     _xmlName = "sequencePoint";
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     // -- _sequenceRef
65     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
66             java.lang.String.class, "_sequenceRef", "sequenceRef",
67             org.exolab.castor.xml.NodeType.Attribute);
68     desc.setImmutable(true);
69     handler = new org.exolab.castor.xml.XMLFieldHandler()
70     {
71       public java.lang.Object getValue(java.lang.Object object)
72               throws IllegalStateException
73       {
74         SequencePoint target = (SequencePoint) object;
75         return target.getSequenceRef();
76       }
77
78       public void setValue(java.lang.Object object, java.lang.Object value)
79               throws IllegalStateException, IllegalArgumentException
80       {
81         try
82         {
83           SequencePoint target = (SequencePoint) object;
84           target.setSequenceRef((java.lang.String) value);
85         } catch (java.lang.Exception ex)
86         {
87           throw new IllegalStateException(ex.toString());
88         }
89       }
90
91       public java.lang.Object newInstance(java.lang.Object parent)
92       {
93         return null;
94       }
95     };
96     desc.setHandler(handler);
97     desc.setMultivalued(false);
98     addFieldDescriptor(desc);
99
100     // -- validation code for: _sequenceRef
101     fieldValidator = new org.exolab.castor.xml.FieldValidator();
102     { // -- local scope
103       org.exolab.castor.xml.validators.StringValidator typeValidator;
104       typeValidator = new org.exolab.castor.xml.validators.StringValidator();
105       fieldValidator.setValidator(typeValidator);
106       typeValidator.setWhiteSpace("preserve");
107     }
108     desc.setValidator(fieldValidator);
109     // -- _xPos
110     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
111             java.lang.Float.TYPE, "_xPos", "xPos",
112             org.exolab.castor.xml.NodeType.Attribute);
113     handler = new org.exolab.castor.xml.XMLFieldHandler()
114     {
115       public java.lang.Object getValue(java.lang.Object object)
116               throws IllegalStateException
117       {
118         SequencePoint target = (SequencePoint) object;
119         if (!target.hasXPos())
120         {
121           return null;
122         }
123         return new java.lang.Float(target.getXPos());
124       }
125
126       public void setValue(java.lang.Object object, java.lang.Object value)
127               throws IllegalStateException, IllegalArgumentException
128       {
129         try
130         {
131           SequencePoint target = (SequencePoint) object;
132           // if null, use delete method for optional primitives
133           if (value == null)
134           {
135             target.deleteXPos();
136             return;
137           }
138           target.setXPos(((java.lang.Float) value).floatValue());
139         } catch (java.lang.Exception ex)
140         {
141           throw new IllegalStateException(ex.toString());
142         }
143       }
144
145       public java.lang.Object newInstance(java.lang.Object parent)
146       {
147         return null;
148       }
149     };
150     desc.setHandler(handler);
151     desc.setMultivalued(false);
152     addFieldDescriptor(desc);
153
154     // -- validation code for: _xPos
155     fieldValidator = new org.exolab.castor.xml.FieldValidator();
156     { // -- local scope
157       org.exolab.castor.xml.validators.FloatValidator typeValidator;
158       typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
159       fieldValidator.setValidator(typeValidator);
160       typeValidator.setMinInclusive((float) -3.4028235E38);
161       typeValidator.setMaxInclusive((float) 3.4028235E38);
162     }
163     desc.setValidator(fieldValidator);
164     // -- _yPos
165     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
166             java.lang.Float.TYPE, "_yPos", "yPos",
167             org.exolab.castor.xml.NodeType.Attribute);
168     handler = new org.exolab.castor.xml.XMLFieldHandler()
169     {
170       public java.lang.Object getValue(java.lang.Object object)
171               throws IllegalStateException
172       {
173         SequencePoint target = (SequencePoint) object;
174         if (!target.hasYPos())
175         {
176           return null;
177         }
178         return new java.lang.Float(target.getYPos());
179       }
180
181       public void setValue(java.lang.Object object, java.lang.Object value)
182               throws IllegalStateException, IllegalArgumentException
183       {
184         try
185         {
186           SequencePoint target = (SequencePoint) object;
187           // if null, use delete method for optional primitives
188           if (value == null)
189           {
190             target.deleteYPos();
191             return;
192           }
193           target.setYPos(((java.lang.Float) value).floatValue());
194         } catch (java.lang.Exception ex)
195         {
196           throw new IllegalStateException(ex.toString());
197         }
198       }
199
200       public java.lang.Object newInstance(java.lang.Object parent)
201       {
202         return null;
203       }
204     };
205     desc.setHandler(handler);
206     desc.setMultivalued(false);
207     addFieldDescriptor(desc);
208
209     // -- validation code for: _yPos
210     fieldValidator = new org.exolab.castor.xml.FieldValidator();
211     { // -- local scope
212       org.exolab.castor.xml.validators.FloatValidator typeValidator;
213       typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
214       fieldValidator.setValidator(typeValidator);
215       typeValidator.setMinInclusive((float) -3.4028235E38);
216       typeValidator.setMaxInclusive((float) 3.4028235E38);
217     }
218     desc.setValidator(fieldValidator);
219     // -- _zPos
220     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
221             java.lang.Float.TYPE, "_zPos", "zPos",
222             org.exolab.castor.xml.NodeType.Attribute);
223     handler = new org.exolab.castor.xml.XMLFieldHandler()
224     {
225       public java.lang.Object getValue(java.lang.Object object)
226               throws IllegalStateException
227       {
228         SequencePoint target = (SequencePoint) object;
229         if (!target.hasZPos())
230         {
231           return null;
232         }
233         return new java.lang.Float(target.getZPos());
234       }
235
236       public void setValue(java.lang.Object object, java.lang.Object value)
237               throws IllegalStateException, IllegalArgumentException
238       {
239         try
240         {
241           SequencePoint target = (SequencePoint) object;
242           // if null, use delete method for optional primitives
243           if (value == null)
244           {
245             target.deleteZPos();
246             return;
247           }
248           target.setZPos(((java.lang.Float) value).floatValue());
249         } catch (java.lang.Exception ex)
250         {
251           throw new IllegalStateException(ex.toString());
252         }
253       }
254
255       public java.lang.Object newInstance(java.lang.Object parent)
256       {
257         return null;
258       }
259     };
260     desc.setHandler(handler);
261     desc.setMultivalued(false);
262     addFieldDescriptor(desc);
263
264     // -- validation code for: _zPos
265     fieldValidator = new org.exolab.castor.xml.FieldValidator();
266     { // -- local scope
267       org.exolab.castor.xml.validators.FloatValidator typeValidator;
268       typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
269       fieldValidator.setValidator(typeValidator);
270       typeValidator.setMinInclusive((float) -3.4028235E38);
271       typeValidator.setMaxInclusive((float) 3.4028235E38);
272     }
273     desc.setValidator(fieldValidator);
274     // -- initialize element descriptors
275
276   }
277
278   // -----------/
279   // - Methods -/
280   // -----------/
281
282   /**
283    * Method getAccessMode.
284    * 
285    * @return the access mode specified for this class.
286    */
287   public org.exolab.castor.mapping.AccessMode getAccessMode()
288   {
289     return null;
290   }
291
292   /**
293    * Method getIdentity.
294    * 
295    * @return the identity field, null if this class has no identity.
296    */
297   public org.exolab.castor.mapping.FieldDescriptor getIdentity()
298   {
299     return super.getIdentity();
300   }
301
302   /**
303    * Method getJavaClass.
304    * 
305    * @return the Java class represented by this descriptor.
306    */
307   public java.lang.Class getJavaClass()
308   {
309     return jalview.schemabinding.version2.SequencePoint.class;
310   }
311
312   /**
313    * Method getNameSpacePrefix.
314    * 
315    * @return the namespace prefix to use when marshaling as XML.
316    */
317   public java.lang.String getNameSpacePrefix()
318   {
319     return _nsPrefix;
320   }
321
322   /**
323    * Method getNameSpaceURI.
324    * 
325    * @return the namespace URI used when marshaling and unmarshaling as XML.
326    */
327   public java.lang.String getNameSpaceURI()
328   {
329     return _nsURI;
330   }
331
332   /**
333    * Method getValidator.
334    * 
335    * @return a specific validator for the class described by this
336    *         ClassDescriptor.
337    */
338   public org.exolab.castor.xml.TypeValidator getValidator()
339   {
340     return this;
341   }
342
343   /**
344    * Method getXMLName.
345    * 
346    * @return the XML Name for the Class being described.
347    */
348   public java.lang.String getXMLName()
349   {
350     return _xmlName;
351   }
352
353   /**
354    * Method isElementDefinition.
355    * 
356    * @return true if XML schema definition of this Class is that of a global
357    *         element or element with anonymous type definition.
358    */
359   public boolean isElementDefinition()
360   {
361     return _elementDefinition;
362   }
363
364 }