Merge branch 'features/pca_jaxb_datasetrefs_JAL-3171_JAL-3063_JAL-1767' into develop
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / DoubleVectorDescriptor.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.DoubleVector;
15
16 /**
17  * Class DoubleVectorDescriptor.
18  * 
19  * @version $Revision$ $Date$
20  */
21 public class DoubleVectorDescriptor
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 DoubleVectorDescriptor()
54   {
55     super();
56     _nsURI = "www.jalview.org";
57     _xmlName = "DoubleVector";
58     _elementDefinition = false;
59
60     // -- set grouping compositor
61     setCompositorAsSequence();
62     org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
63     org.exolab.castor.mapping.FieldHandler handler = null;
64     org.exolab.castor.xml.FieldValidator fieldValidator = null;
65     // -- initialize attribute descriptors
66
67     // -- initialize element descriptors
68
69     // -- _vList
70     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
71             java.lang.Double.TYPE, "_vList", "v",
72             org.exolab.castor.xml.NodeType.Element);
73     handler = new org.exolab.castor.xml.XMLFieldHandler()
74     {
75       public java.lang.Object getValue(java.lang.Object object)
76               throws IllegalStateException
77       {
78         DoubleVector target = (DoubleVector) object;
79         return target.getV();
80       }
81
82       public void setValue(java.lang.Object object, java.lang.Object value)
83               throws IllegalStateException, IllegalArgumentException
84       {
85         try
86         {
87           DoubleVector target = (DoubleVector) object;
88           // ignore null values for non optional primitives
89           if (value == null)
90           {
91             return;
92           }
93
94           target.addV(((java.lang.Double) value).doubleValue());
95         } catch (java.lang.Exception ex)
96         {
97           throw new IllegalStateException(ex.toString());
98         }
99       }
100
101       public void resetValue(Object object)
102               throws IllegalStateException, IllegalArgumentException
103       {
104         try
105         {
106           DoubleVector target = (DoubleVector) object;
107           target.removeAllV();
108         } catch (java.lang.Exception ex)
109         {
110           throw new IllegalStateException(ex.toString());
111         }
112       }
113
114       public java.lang.Object newInstance(java.lang.Object parent)
115       {
116         return null;
117       }
118     };
119     desc.setHandler(handler);
120     desc.setNameSpaceURI("www.jalview.org");
121     desc.setMultivalued(true);
122     addFieldDescriptor(desc);
123
124     // -- validation code for: _vList
125     fieldValidator = new org.exolab.castor.xml.FieldValidator();
126     fieldValidator.setMinOccurs(0);
127     { // -- local scope
128       org.exolab.castor.xml.validators.DoubleValidator typeValidator;
129       typeValidator = new org.exolab.castor.xml.validators.DoubleValidator();
130       fieldValidator.setValidator(typeValidator);
131       typeValidator.setMinInclusive(-1.7976931348623157E308);
132       typeValidator.setMaxInclusive(1.7976931348623157E308);
133     }
134     desc.setValidator(fieldValidator);
135   }
136
137   // -----------/
138   // - Methods -/
139   // -----------/
140
141   /**
142    * Method getAccessMode.
143    * 
144    * @return the access mode specified for this class.
145    */
146   public org.exolab.castor.mapping.AccessMode getAccessMode()
147   {
148     return null;
149   }
150
151   /**
152    * Method getIdentity.
153    * 
154    * @return the identity field, null if this class has no identity.
155    */
156   public org.exolab.castor.mapping.FieldDescriptor getIdentity()
157   {
158     return super.getIdentity();
159   }
160
161   /**
162    * Method getJavaClass.
163    * 
164    * @return the Java class represented by this descriptor.
165    */
166   public java.lang.Class getJavaClass()
167   {
168     return jalview.schemabinding.version2.DoubleVector.class;
169   }
170
171   /**
172    * Method getNameSpacePrefix.
173    * 
174    * @return the namespace prefix to use when marshaling as XML.
175    */
176   public java.lang.String getNameSpacePrefix()
177   {
178     return _nsPrefix;
179   }
180
181   /**
182    * Method getNameSpaceURI.
183    * 
184    * @return the namespace URI used when marshaling and unmarshaling as XML.
185    */
186   public java.lang.String getNameSpaceURI()
187   {
188     return _nsURI;
189   }
190
191   /**
192    * Method getValidator.
193    * 
194    * @return a specific validator for the class described by this
195    *         ClassDescriptor.
196    */
197   public org.exolab.castor.xml.TypeValidator getValidator()
198   {
199     return this;
200   }
201
202   /**
203    * Method getXMLName.
204    * 
205    * @return the XML Name for the Class being described.
206    */
207   public java.lang.String getXMLName()
208   {
209     return _xmlName;
210   }
211
212   /**
213    * Method isElementDefinition.
214    * 
215    * @return true if XML schema definition of this Class is that of a global
216    *         element or element with anonymous type definition.
217    */
218   public boolean isElementDefinition()
219   {
220     return _elementDefinition;
221   }
222
223 }