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