JAL-3130 de-multi-release-jar.sh Script to make multi-release jar file single release.
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / MapListTypeDescriptor.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.MapListType;
15
16 /**
17  * Class MapListTypeDescriptor.
18  * 
19  * @version $Revision$ $Date$
20  */
21 public class MapListTypeDescriptor 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 MapListTypeDescriptor()
54   {
55     super();
56     _nsURI = "www.vamsas.ac.uk/jalview/version2";
57     _xmlName = "mapListType";
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     // -- _mapFromUnit
68     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
69             java.lang.Long.TYPE, "_mapFromUnit", "mapFromUnit",
70             org.exolab.castor.xml.NodeType.Attribute);
71     handler = new org.exolab.castor.xml.XMLFieldHandler()
72     {
73       public java.lang.Object getValue(java.lang.Object object)
74               throws IllegalStateException
75       {
76         MapListType target = (MapListType) object;
77         if (!target.hasMapFromUnit())
78         {
79           return null;
80         }
81         return new java.lang.Long(target.getMapFromUnit());
82       }
83
84       public void setValue(java.lang.Object object, java.lang.Object value)
85               throws IllegalStateException, IllegalArgumentException
86       {
87         try
88         {
89           MapListType target = (MapListType) object;
90           // ignore null values for non optional primitives
91           if (value == null)
92           {
93             return;
94           }
95
96           target.setMapFromUnit(((java.lang.Long) value).longValue());
97         } catch (java.lang.Exception ex)
98         {
99           throw new IllegalStateException(ex.toString());
100         }
101       }
102
103       public java.lang.Object newInstance(java.lang.Object parent)
104       {
105         return null;
106       }
107     };
108     desc.setHandler(handler);
109     desc.setRequired(true);
110     desc.setMultivalued(false);
111     addFieldDescriptor(desc);
112
113     // -- validation code for: _mapFromUnit
114     fieldValidator = new org.exolab.castor.xml.FieldValidator();
115     fieldValidator.setMinOccurs(1);
116     { // -- local scope
117       org.exolab.castor.xml.validators.LongValidator typeValidator;
118       typeValidator = new org.exolab.castor.xml.validators.LongValidator();
119       fieldValidator.setValidator(typeValidator);
120       typeValidator.setMinInclusive(1L);
121     }
122     desc.setValidator(fieldValidator);
123     // -- _mapToUnit
124     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
125             java.lang.Long.TYPE, "_mapToUnit", "mapToUnit",
126             org.exolab.castor.xml.NodeType.Attribute);
127     handler = new org.exolab.castor.xml.XMLFieldHandler()
128     {
129       public java.lang.Object getValue(java.lang.Object object)
130               throws IllegalStateException
131       {
132         MapListType target = (MapListType) object;
133         if (!target.hasMapToUnit())
134         {
135           return null;
136         }
137         return new java.lang.Long(target.getMapToUnit());
138       }
139
140       public void setValue(java.lang.Object object, java.lang.Object value)
141               throws IllegalStateException, IllegalArgumentException
142       {
143         try
144         {
145           MapListType target = (MapListType) object;
146           // ignore null values for non optional primitives
147           if (value == null)
148           {
149             return;
150           }
151
152           target.setMapToUnit(((java.lang.Long) value).longValue());
153         } catch (java.lang.Exception ex)
154         {
155           throw new IllegalStateException(ex.toString());
156         }
157       }
158
159       public java.lang.Object newInstance(java.lang.Object parent)
160       {
161         return null;
162       }
163     };
164     desc.setHandler(handler);
165     desc.setRequired(true);
166     desc.setMultivalued(false);
167     addFieldDescriptor(desc);
168
169     // -- validation code for: _mapToUnit
170     fieldValidator = new org.exolab.castor.xml.FieldValidator();
171     fieldValidator.setMinOccurs(1);
172     { // -- local scope
173       org.exolab.castor.xml.validators.LongValidator typeValidator;
174       typeValidator = new org.exolab.castor.xml.validators.LongValidator();
175       fieldValidator.setValidator(typeValidator);
176       typeValidator.setMinInclusive(1L);
177     }
178     desc.setValidator(fieldValidator);
179     // -- initialize element descriptors
180
181     // -- _mapListFromList
182     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
183             jalview.schemabinding.version2.MapListFrom.class,
184             "_mapListFromList", "mapListFrom",
185             org.exolab.castor.xml.NodeType.Element);
186     handler = new org.exolab.castor.xml.XMLFieldHandler()
187     {
188       public java.lang.Object getValue(java.lang.Object object)
189               throws IllegalStateException
190       {
191         MapListType target = (MapListType) object;
192         return target.getMapListFrom();
193       }
194
195       public void setValue(java.lang.Object object, java.lang.Object value)
196               throws IllegalStateException, IllegalArgumentException
197       {
198         try
199         {
200           MapListType target = (MapListType) object;
201           target.addMapListFrom((jalview.schemabinding.version2.MapListFrom) value);
202         } catch (java.lang.Exception ex)
203         {
204           throw new IllegalStateException(ex.toString());
205         }
206       }
207
208       public void resetValue(Object object) throws IllegalStateException,
209               IllegalArgumentException
210       {
211         try
212         {
213           MapListType target = (MapListType) object;
214           target.removeAllMapListFrom();
215         } catch (java.lang.Exception ex)
216         {
217           throw new IllegalStateException(ex.toString());
218         }
219       }
220
221       public java.lang.Object newInstance(java.lang.Object parent)
222       {
223         return new jalview.schemabinding.version2.MapListFrom();
224       }
225     };
226     desc.setHandler(handler);
227     desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
228     desc.setMultivalued(true);
229     addFieldDescriptor(desc);
230
231     // -- validation code for: _mapListFromList
232     fieldValidator = new org.exolab.castor.xml.FieldValidator();
233     fieldValidator.setMinOccurs(0);
234     { // -- local scope
235     }
236     desc.setValidator(fieldValidator);
237     // -- _mapListToList
238     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
239             jalview.schemabinding.version2.MapListTo.class,
240             "_mapListToList", "mapListTo",
241             org.exolab.castor.xml.NodeType.Element);
242     handler = new org.exolab.castor.xml.XMLFieldHandler()
243     {
244       public java.lang.Object getValue(java.lang.Object object)
245               throws IllegalStateException
246       {
247         MapListType target = (MapListType) object;
248         return target.getMapListTo();
249       }
250
251       public void setValue(java.lang.Object object, java.lang.Object value)
252               throws IllegalStateException, IllegalArgumentException
253       {
254         try
255         {
256           MapListType target = (MapListType) object;
257           target.addMapListTo((jalview.schemabinding.version2.MapListTo) value);
258         } catch (java.lang.Exception ex)
259         {
260           throw new IllegalStateException(ex.toString());
261         }
262       }
263
264       public void resetValue(Object object) throws IllegalStateException,
265               IllegalArgumentException
266       {
267         try
268         {
269           MapListType target = (MapListType) object;
270           target.removeAllMapListTo();
271         } catch (java.lang.Exception ex)
272         {
273           throw new IllegalStateException(ex.toString());
274         }
275       }
276
277       public java.lang.Object newInstance(java.lang.Object parent)
278       {
279         return new jalview.schemabinding.version2.MapListTo();
280       }
281     };
282     desc.setHandler(handler);
283     desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
284     desc.setMultivalued(true);
285     addFieldDescriptor(desc);
286
287     // -- validation code for: _mapListToList
288     fieldValidator = new org.exolab.castor.xml.FieldValidator();
289     fieldValidator.setMinOccurs(0);
290     { // -- local scope
291     }
292     desc.setValidator(fieldValidator);
293   }
294
295   // -----------/
296   // - Methods -/
297   // -----------/
298
299   /**
300    * Method getAccessMode.
301    * 
302    * @return the access mode specified for this class.
303    */
304   public org.exolab.castor.mapping.AccessMode getAccessMode()
305   {
306     return null;
307   }
308
309   /**
310    * Method getIdentity.
311    * 
312    * @return the identity field, null if this class has no identity.
313    */
314   public org.exolab.castor.mapping.FieldDescriptor getIdentity()
315   {
316     return super.getIdentity();
317   }
318
319   /**
320    * Method getJavaClass.
321    * 
322    * @return the Java class represented by this descriptor.
323    */
324   public java.lang.Class getJavaClass()
325   {
326     return jalview.schemabinding.version2.MapListType.class;
327   }
328
329   /**
330    * Method getNameSpacePrefix.
331    * 
332    * @return the namespace prefix to use when marshaling as XML.
333    */
334   public java.lang.String getNameSpacePrefix()
335   {
336     return _nsPrefix;
337   }
338
339   /**
340    * Method getNameSpaceURI.
341    * 
342    * @return the namespace URI used when marshaling and unmarshaling as XML.
343    */
344   public java.lang.String getNameSpaceURI()
345   {
346     return _nsURI;
347   }
348
349   /**
350    * Method getValidator.
351    * 
352    * @return a specific validator for the class described by this
353    *         ClassDescriptor.
354    */
355   public org.exolab.castor.xml.TypeValidator getValidator()
356   {
357     return this;
358   }
359
360   /**
361    * Method getXMLName.
362    * 
363    * @return the XML Name for the Class being described.
364    */
365   public java.lang.String getXMLName()
366   {
367     return _xmlName;
368   }
369
370   /**
371    * Method isElementDefinition.
372    * 
373    * @return true if XML schema definition of this Class is that of a global
374    *         element or element with anonymous type definition.
375    */
376   public boolean isElementDefinition()
377   {
378     return _elementDefinition;
379   }
380
381 }