JAL-1503 update version in GPL header
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / OtherDataDescriptor.java
1 /*******************************************************************************
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
3  * Copyright (C) 2014 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10  *  
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  
17  * If not, see <http://www.gnu.org/licenses/>.
18  * The Jalview Authors are detailed in the 'AUTHORS' file.
19  ******************************************************************************/
20 /*
21  * This class was automatically generated with 
22  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
23  * Schema.
24  * $Id$
25  */
26
27 package jalview.schemabinding.version2.descriptors;
28
29 //---------------------------------/
30 //- Imported classes and packages -/
31 //---------------------------------/
32
33 import jalview.schemabinding.version2.OtherData;
34
35 /**
36  * Class OtherDataDescriptor.
37  * 
38  * @version $Revision$ $Date$
39  */
40 public class OtherDataDescriptor extends
41         org.exolab.castor.xml.util.XMLClassDescriptorImpl
42 {
43
44   // --------------------------/
45   // - Class/Member Variables -/
46   // --------------------------/
47
48   /**
49    * Field _elementDefinition.
50    */
51   private boolean _elementDefinition;
52
53   /**
54    * Field _nsPrefix.
55    */
56   private java.lang.String _nsPrefix;
57
58   /**
59    * Field _nsURI.
60    */
61   private java.lang.String _nsURI;
62
63   /**
64    * Field _xmlName.
65    */
66   private java.lang.String _xmlName;
67
68   // ----------------/
69   // - Constructors -/
70   // ----------------/
71
72   public OtherDataDescriptor()
73   {
74     super();
75     _nsURI = "www.jalview.org";
76     _xmlName = "otherData";
77     _elementDefinition = true;
78     org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
79     org.exolab.castor.mapping.FieldHandler handler = null;
80     org.exolab.castor.xml.FieldValidator fieldValidator = null;
81     // -- initialize attribute descriptors
82
83     // -- _key
84     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
85             java.lang.String.class, "_key", "key",
86             org.exolab.castor.xml.NodeType.Attribute);
87     desc.setImmutable(true);
88     handler = new org.exolab.castor.xml.XMLFieldHandler()
89     {
90       public java.lang.Object getValue(java.lang.Object object)
91               throws IllegalStateException
92       {
93         OtherData target = (OtherData) object;
94         return target.getKey();
95       }
96
97       public void setValue(java.lang.Object object, java.lang.Object value)
98               throws IllegalStateException, IllegalArgumentException
99       {
100         try
101         {
102           OtherData target = (OtherData) object;
103           target.setKey((java.lang.String) value);
104         } catch (java.lang.Exception ex)
105         {
106           throw new IllegalStateException(ex.toString());
107         }
108       }
109
110       public java.lang.Object newInstance(java.lang.Object parent)
111       {
112         return null;
113       }
114     };
115     desc.setHandler(handler);
116     desc.setRequired(true);
117     desc.setMultivalued(false);
118     addFieldDescriptor(desc);
119
120     // -- validation code for: _key
121     fieldValidator = new org.exolab.castor.xml.FieldValidator();
122     fieldValidator.setMinOccurs(1);
123     { // -- local scope
124       org.exolab.castor.xml.validators.StringValidator typeValidator;
125       typeValidator = new org.exolab.castor.xml.validators.StringValidator();
126       fieldValidator.setValidator(typeValidator);
127       typeValidator.setWhiteSpace("preserve");
128     }
129     desc.setValidator(fieldValidator);
130     // -- _value
131     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
132             java.lang.String.class, "_value", "value",
133             org.exolab.castor.xml.NodeType.Attribute);
134     desc.setImmutable(true);
135     handler = new org.exolab.castor.xml.XMLFieldHandler()
136     {
137       public java.lang.Object getValue(java.lang.Object object)
138               throws IllegalStateException
139       {
140         OtherData target = (OtherData) object;
141         return target.getValue();
142       }
143
144       public void setValue(java.lang.Object object, java.lang.Object value)
145               throws IllegalStateException, IllegalArgumentException
146       {
147         try
148         {
149           OtherData target = (OtherData) object;
150           target.setValue((java.lang.String) value);
151         } catch (java.lang.Exception ex)
152         {
153           throw new IllegalStateException(ex.toString());
154         }
155       }
156
157       public java.lang.Object newInstance(java.lang.Object parent)
158       {
159         return null;
160       }
161     };
162     desc.setHandler(handler);
163     desc.setRequired(true);
164     desc.setMultivalued(false);
165     addFieldDescriptor(desc);
166
167     // -- validation code for: _value
168     fieldValidator = new org.exolab.castor.xml.FieldValidator();
169     fieldValidator.setMinOccurs(1);
170     { // -- local scope
171       org.exolab.castor.xml.validators.StringValidator typeValidator;
172       typeValidator = new org.exolab.castor.xml.validators.StringValidator();
173       fieldValidator.setValidator(typeValidator);
174       typeValidator.setWhiteSpace("preserve");
175     }
176     desc.setValidator(fieldValidator);
177     // -- initialize element descriptors
178
179   }
180
181   // -----------/
182   // - Methods -/
183   // -----------/
184
185   /**
186    * Method getAccessMode.
187    * 
188    * @return the access mode specified for this class.
189    */
190   public org.exolab.castor.mapping.AccessMode getAccessMode()
191   {
192     return null;
193   }
194
195   /**
196    * Method getIdentity.
197    * 
198    * @return the identity field, null if this class has no identity.
199    */
200   public org.exolab.castor.mapping.FieldDescriptor getIdentity()
201   {
202     return super.getIdentity();
203   }
204
205   /**
206    * Method getJavaClass.
207    * 
208    * @return the Java class represented by this descriptor.
209    */
210   public java.lang.Class getJavaClass()
211   {
212     return jalview.schemabinding.version2.OtherData.class;
213   }
214
215   /**
216    * Method getNameSpacePrefix.
217    * 
218    * @return the namespace prefix to use when marshaling as XML.
219    */
220   public java.lang.String getNameSpacePrefix()
221   {
222     return _nsPrefix;
223   }
224
225   /**
226    * Method getNameSpaceURI.
227    * 
228    * @return the namespace URI used when marshaling and unmarshaling as XML.
229    */
230   public java.lang.String getNameSpaceURI()
231   {
232     return _nsURI;
233   }
234
235   /**
236    * Method getValidator.
237    * 
238    * @return a specific validator for the class described by this
239    *         ClassDescriptor.
240    */
241   public org.exolab.castor.xml.TypeValidator getValidator()
242   {
243     return this;
244   }
245
246   /**
247    * Method getXMLName.
248    * 
249    * @return the XML Name for the Class being described.
250    */
251   public java.lang.String getXMLName()
252   {
253     return _xmlName;
254   }
255
256   /**
257    * Method isElementDefinition.
258    * 
259    * @return true if XML schema definition of this Class is that of a global
260    *         element or element with anonymous type definition.
261    */
262   public boolean isElementDefinition()
263   {
264     return _elementDefinition;
265   }
266
267 }