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