JAL-3139 check group visibility when removing 'redundant' features
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / AlcodonDescriptor.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.Alcodon;
15
16 /**
17  * Class AlcodonDescriptor.
18  * 
19  * @version $Revision$ $Date$
20  */
21 public class AlcodonDescriptor 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 AlcodonDescriptor()
54   {
55     super();
56     _nsURI = "www.vamsas.ac.uk/jalview/version2";
57     _xmlName = "alcodon";
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     // -- _pos1
65     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
66             java.lang.Long.TYPE, "_pos1", "pos1",
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         Alcodon target = (Alcodon) object;
74         if (!target.hasPos1())
75         {
76           return null;
77         }
78         return new java.lang.Long(target.getPos1());
79       }
80
81       public void setValue(java.lang.Object object, java.lang.Object value)
82               throws IllegalStateException, IllegalArgumentException
83       {
84         try
85         {
86           Alcodon target = (Alcodon) object;
87           // if null, use delete method for optional primitives
88           if (value == null)
89           {
90             target.deletePos1();
91             return;
92           }
93           target.setPos1(((java.lang.Long) value).longValue());
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: _pos1
110     fieldValidator = new org.exolab.castor.xml.FieldValidator();
111     { // -- local scope
112       org.exolab.castor.xml.validators.LongValidator typeValidator;
113       typeValidator = new org.exolab.castor.xml.validators.LongValidator();
114       fieldValidator.setValidator(typeValidator);
115     }
116     desc.setValidator(fieldValidator);
117     // -- _pos2
118     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
119             java.lang.Long.TYPE, "_pos2", "pos2",
120             org.exolab.castor.xml.NodeType.Attribute);
121     handler = new org.exolab.castor.xml.XMLFieldHandler()
122     {
123       public java.lang.Object getValue(java.lang.Object object)
124               throws IllegalStateException
125       {
126         Alcodon target = (Alcodon) object;
127         if (!target.hasPos2())
128         {
129           return null;
130         }
131         return new java.lang.Long(target.getPos2());
132       }
133
134       public void setValue(java.lang.Object object, java.lang.Object value)
135               throws IllegalStateException, IllegalArgumentException
136       {
137         try
138         {
139           Alcodon target = (Alcodon) object;
140           // if null, use delete method for optional primitives
141           if (value == null)
142           {
143             target.deletePos2();
144             return;
145           }
146           target.setPos2(((java.lang.Long) value).longValue());
147         } catch (java.lang.Exception ex)
148         {
149           throw new IllegalStateException(ex.toString());
150         }
151       }
152
153       public java.lang.Object newInstance(java.lang.Object parent)
154       {
155         return null;
156       }
157     };
158     desc.setHandler(handler);
159     desc.setMultivalued(false);
160     addFieldDescriptor(desc);
161
162     // -- validation code for: _pos2
163     fieldValidator = new org.exolab.castor.xml.FieldValidator();
164     { // -- local scope
165       org.exolab.castor.xml.validators.LongValidator typeValidator;
166       typeValidator = new org.exolab.castor.xml.validators.LongValidator();
167       fieldValidator.setValidator(typeValidator);
168     }
169     desc.setValidator(fieldValidator);
170     // -- _pos3
171     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
172             java.lang.Long.TYPE, "_pos3", "pos3",
173             org.exolab.castor.xml.NodeType.Attribute);
174     handler = new org.exolab.castor.xml.XMLFieldHandler()
175     {
176       public java.lang.Object getValue(java.lang.Object object)
177               throws IllegalStateException
178       {
179         Alcodon target = (Alcodon) object;
180         if (!target.hasPos3())
181         {
182           return null;
183         }
184         return new java.lang.Long(target.getPos3());
185       }
186
187       public void setValue(java.lang.Object object, java.lang.Object value)
188               throws IllegalStateException, IllegalArgumentException
189       {
190         try
191         {
192           Alcodon target = (Alcodon) object;
193           // if null, use delete method for optional primitives
194           if (value == null)
195           {
196             target.deletePos3();
197             return;
198           }
199           target.setPos3(((java.lang.Long) value).longValue());
200         } catch (java.lang.Exception ex)
201         {
202           throw new IllegalStateException(ex.toString());
203         }
204       }
205
206       public java.lang.Object newInstance(java.lang.Object parent)
207       {
208         return null;
209       }
210     };
211     desc.setHandler(handler);
212     desc.setMultivalued(false);
213     addFieldDescriptor(desc);
214
215     // -- validation code for: _pos3
216     fieldValidator = new org.exolab.castor.xml.FieldValidator();
217     { // -- local scope
218       org.exolab.castor.xml.validators.LongValidator typeValidator;
219       typeValidator = new org.exolab.castor.xml.validators.LongValidator();
220       fieldValidator.setValidator(typeValidator);
221     }
222     desc.setValidator(fieldValidator);
223     // -- initialize element descriptors
224
225   }
226
227   // -----------/
228   // - Methods -/
229   // -----------/
230
231   /**
232    * Method getAccessMode.
233    * 
234    * @return the access mode specified for this class.
235    */
236   public org.exolab.castor.mapping.AccessMode getAccessMode()
237   {
238     return null;
239   }
240
241   /**
242    * Method getIdentity.
243    * 
244    * @return the identity field, null if this class has no identity.
245    */
246   public org.exolab.castor.mapping.FieldDescriptor getIdentity()
247   {
248     return super.getIdentity();
249   }
250
251   /**
252    * Method getJavaClass.
253    * 
254    * @return the Java class represented by this descriptor.
255    */
256   public java.lang.Class getJavaClass()
257   {
258     return jalview.schemabinding.version2.Alcodon.class;
259   }
260
261   /**
262    * Method getNameSpacePrefix.
263    * 
264    * @return the namespace prefix to use when marshaling as XML.
265    */
266   public java.lang.String getNameSpacePrefix()
267   {
268     return _nsPrefix;
269   }
270
271   /**
272    * Method getNameSpaceURI.
273    * 
274    * @return the namespace URI used when marshaling and unmarshaling as XML.
275    */
276   public java.lang.String getNameSpaceURI()
277   {
278     return _nsURI;
279   }
280
281   /**
282    * Method getValidator.
283    * 
284    * @return a specific validator for the class described by this
285    *         ClassDescriptor.
286    */
287   public org.exolab.castor.xml.TypeValidator getValidator()
288   {
289     return this;
290   }
291
292   /**
293    * Method getXMLName.
294    * 
295    * @return the XML Name for the Class being described.
296    */
297   public java.lang.String getXMLName()
298   {
299     return _xmlName;
300   }
301
302   /**
303    * Method isElementDefinition.
304    * 
305    * @return true if XML schema definition of this Class is that of a global
306    *         element or element with anonymous type definition.
307    */
308   public boolean isElementDefinition()
309   {
310     return _elementDefinition;
311   }
312
313 }