7adf1d022acc2d9fb75057bd878ea501b619f81a
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / AlcodMapDescriptor.java
1 /*******************************************************************************
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
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.AlcodMap;
34
35 /**
36  * Class AlcodMapDescriptor.
37  * 
38  * @version $Revision$ $Date$
39  */
40 public class AlcodMapDescriptor 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 AlcodMapDescriptor()
73   {
74     super();
75     _nsURI = "www.vamsas.ac.uk/jalview/version2";
76     _xmlName = "alcodMap";
77     _elementDefinition = true;
78
79     // -- set grouping compositor
80     setCompositorAsSequence();
81     org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
82     org.exolab.castor.mapping.FieldHandler handler = null;
83     org.exolab.castor.xml.FieldValidator fieldValidator = null;
84     // -- initialize attribute descriptors
85
86     // -- _dnasq
87     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
88             java.lang.String.class, "_dnasq", "dnasq",
89             org.exolab.castor.xml.NodeType.Attribute);
90     desc.setImmutable(true);
91     handler = new org.exolab.castor.xml.XMLFieldHandler()
92     {
93       public java.lang.Object getValue(java.lang.Object object)
94               throws IllegalStateException
95       {
96         AlcodMap target = (AlcodMap) object;
97         return target.getDnasq();
98       }
99
100       public void setValue(java.lang.Object object, java.lang.Object value)
101               throws IllegalStateException, IllegalArgumentException
102       {
103         try
104         {
105           AlcodMap target = (AlcodMap) object;
106           target.setDnasq((java.lang.String) value);
107         } catch (java.lang.Exception ex)
108         {
109           throw new IllegalStateException(ex.toString());
110         }
111       }
112
113       public java.lang.Object newInstance(java.lang.Object parent)
114       {
115         return null;
116       }
117     };
118     desc.setHandler(handler);
119     desc.setRequired(true);
120     desc.setMultivalued(false);
121     addFieldDescriptor(desc);
122
123     // -- validation code for: _dnasq
124     fieldValidator = new org.exolab.castor.xml.FieldValidator();
125     fieldValidator.setMinOccurs(1);
126     { // -- local scope
127       org.exolab.castor.xml.validators.StringValidator typeValidator;
128       typeValidator = new org.exolab.castor.xml.validators.StringValidator();
129       fieldValidator.setValidator(typeValidator);
130       typeValidator.setWhiteSpace("preserve");
131     }
132     desc.setValidator(fieldValidator);
133     // -- initialize element descriptors
134
135     // -- _mapping
136     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
137             jalview.schemabinding.version2.Mapping.class, "_mapping",
138             "Mapping", org.exolab.castor.xml.NodeType.Element);
139     handler = new org.exolab.castor.xml.XMLFieldHandler()
140     {
141       public java.lang.Object getValue(java.lang.Object object)
142               throws IllegalStateException
143       {
144         AlcodMap target = (AlcodMap) object;
145         return target.getMapping();
146       }
147
148       public void setValue(java.lang.Object object, java.lang.Object value)
149               throws IllegalStateException, IllegalArgumentException
150       {
151         try
152         {
153           AlcodMap target = (AlcodMap) object;
154           target.setMapping((jalview.schemabinding.version2.Mapping) value);
155         } catch (java.lang.Exception ex)
156         {
157           throw new IllegalStateException(ex.toString());
158         }
159       }
160
161       public java.lang.Object newInstance(java.lang.Object parent)
162       {
163         return new jalview.schemabinding.version2.Mapping();
164       }
165     };
166     desc.setHandler(handler);
167     desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
168     desc.setRequired(true);
169     desc.setMultivalued(false);
170     addFieldDescriptor(desc);
171
172     // -- validation code for: _mapping
173     fieldValidator = new org.exolab.castor.xml.FieldValidator();
174     fieldValidator.setMinOccurs(1);
175     { // -- local scope
176     }
177     desc.setValidator(fieldValidator);
178   }
179
180   // -----------/
181   // - Methods -/
182   // -----------/
183
184   /**
185    * Method getAccessMode.
186    * 
187    * @return the access mode specified for this class.
188    */
189   public org.exolab.castor.mapping.AccessMode getAccessMode()
190   {
191     return null;
192   }
193
194   /**
195    * Method getIdentity.
196    * 
197    * @return the identity field, null if this class has no identity.
198    */
199   public org.exolab.castor.mapping.FieldDescriptor getIdentity()
200   {
201     return super.getIdentity();
202   }
203
204   /**
205    * Method getJavaClass.
206    * 
207    * @return the Java class represented by this descriptor.
208    */
209   public java.lang.Class getJavaClass()
210   {
211     return jalview.schemabinding.version2.AlcodMap.class;
212   }
213
214   /**
215    * Method getNameSpacePrefix.
216    * 
217    * @return the namespace prefix to use when marshaling as XML.
218    */
219   public java.lang.String getNameSpacePrefix()
220   {
221     return _nsPrefix;
222   }
223
224   /**
225    * Method getNameSpaceURI.
226    * 
227    * @return the namespace URI used when marshaling and unmarshaling as XML.
228    */
229   public java.lang.String getNameSpaceURI()
230   {
231     return _nsURI;
232   }
233
234   /**
235    * Method getValidator.
236    * 
237    * @return a specific validator for the class described by this
238    *         ClassDescriptor.
239    */
240   public org.exolab.castor.xml.TypeValidator getValidator()
241   {
242     return this;
243   }
244
245   /**
246    * Method getXMLName.
247    * 
248    * @return the XML Name for the Class being described.
249    */
250   public java.lang.String getXMLName()
251   {
252     return _xmlName;
253   }
254
255   /**
256    * Method isElementDefinition.
257    * 
258    * @return true if XML schema definition of this Class is that of a global
259    *         element or element with anonymous type definition.
260    */
261   public boolean isElementDefinition()
262   {
263     return _elementDefinition;
264   }
265
266 }