update author list in license for (JAL-826)
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / VAMSASDescriptor.java
1 /*******************************************************************************
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3  * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
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.  If not, see <http://www.gnu.org/licenses/>.
17  *******************************************************************************/
18 /*
19  * This class was automatically generated with 
20  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
21  * Schema.
22  * $Id$
23  */
24
25 package jalview.schemabinding.version2.descriptors;
26
27   //---------------------------------/
28  //- Imported classes and packages -/
29 //---------------------------------/
30
31 import jalview.schemabinding.version2.VAMSAS;
32
33 /**
34  * Class VAMSASDescriptor.
35  * 
36  * @version $Revision$ $Date$
37  */
38 public class VAMSASDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
39
40
41       //--------------------------/
42      //- Class/Member Variables -/
43     //--------------------------/
44
45     /**
46      * Field _elementDefinition.
47      */
48     private boolean _elementDefinition;
49
50     /**
51      * Field _nsPrefix.
52      */
53     private java.lang.String _nsPrefix;
54
55     /**
56      * Field _nsURI.
57      */
58     private java.lang.String _nsURI;
59
60     /**
61      * Field _xmlName.
62      */
63     private java.lang.String _xmlName;
64
65
66       //----------------/
67      //- Constructors -/
68     //----------------/
69
70     public VAMSASDescriptor() {
71         super();
72         _nsURI = "www.vamsas.ac.uk/jalview/version2";
73         _xmlName = "VAMSAS";
74         _elementDefinition = false;
75         
76         //-- set grouping compositor
77         setCompositorAsSequence();
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         //-- initialize element descriptors
84         
85         //-- _treeList
86         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_treeList", "Tree", org.exolab.castor.xml.NodeType.Element);
87         desc.setImmutable(true);
88         handler = new org.exolab.castor.xml.XMLFieldHandler() {
89             public java.lang.Object getValue( java.lang.Object object ) 
90                 throws IllegalStateException
91             {
92                 VAMSAS target = (VAMSAS) object;
93                 return target.getTree();
94             }
95             public void setValue( java.lang.Object object, java.lang.Object value) 
96                 throws IllegalStateException, IllegalArgumentException
97             {
98                 try {
99                     VAMSAS target = (VAMSAS) object;
100                     target.addTree( (java.lang.String) value);
101                 } catch (java.lang.Exception ex) {
102                     throw new IllegalStateException(ex.toString());
103                 }
104             }
105             public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
106                 try {
107                     VAMSAS target = (VAMSAS) object;
108                     target.removeAllTree();
109                 } catch (java.lang.Exception ex) {
110                     throw new IllegalStateException(ex.toString());
111                 }
112             }
113             public java.lang.Object newInstance(java.lang.Object parent) {
114                 return null;
115             }
116         };
117         desc.setHandler(handler);
118         desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
119         desc.setMultivalued(true);
120         addFieldDescriptor(desc);
121         
122         //-- validation code for: _treeList
123         fieldValidator = new org.exolab.castor.xml.FieldValidator();
124         fieldValidator.setMinOccurs(0);
125         { //-- local scope
126             org.exolab.castor.xml.validators.StringValidator typeValidator;
127             typeValidator = new org.exolab.castor.xml.validators.StringValidator();
128             fieldValidator.setValidator(typeValidator);
129             typeValidator.setWhiteSpace("preserve");
130         }
131         desc.setValidator(fieldValidator);
132         //-- _sequenceSetList
133         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.SequenceSet.class, "_sequenceSetList", "SequenceSet", org.exolab.castor.xml.NodeType.Element);
134         handler = new org.exolab.castor.xml.XMLFieldHandler() {
135             public java.lang.Object getValue( java.lang.Object object ) 
136                 throws IllegalStateException
137             {
138                 VAMSAS target = (VAMSAS) object;
139                 return target.getSequenceSet();
140             }
141             public void setValue( java.lang.Object object, java.lang.Object value) 
142                 throws IllegalStateException, IllegalArgumentException
143             {
144                 try {
145                     VAMSAS target = (VAMSAS) object;
146                     target.addSequenceSet( (jalview.schemabinding.version2.SequenceSet) value);
147                 } catch (java.lang.Exception ex) {
148                     throw new IllegalStateException(ex.toString());
149                 }
150             }
151             public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
152                 try {
153                     VAMSAS target = (VAMSAS) object;
154                     target.removeAllSequenceSet();
155                 } catch (java.lang.Exception ex) {
156                     throw new IllegalStateException(ex.toString());
157                 }
158             }
159             public java.lang.Object newInstance(java.lang.Object parent) {
160                 return new jalview.schemabinding.version2.SequenceSet();
161             }
162         };
163         desc.setHandler(handler);
164         desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
165         desc.setMultivalued(true);
166         addFieldDescriptor(desc);
167         
168         //-- validation code for: _sequenceSetList
169         fieldValidator = new org.exolab.castor.xml.FieldValidator();
170         fieldValidator.setMinOccurs(0);
171         { //-- local scope
172         }
173         desc.setValidator(fieldValidator);
174     }
175
176
177       //-----------/
178      //- Methods -/
179     //-----------/
180
181     /**
182      * Method getAccessMode.
183      * 
184      * @return the access mode specified for this class.
185      */
186     public org.exolab.castor.mapping.AccessMode getAccessMode(
187     ) {
188         return null;
189     }
190
191     /**
192      * Method getIdentity.
193      * 
194      * @return the identity field, null if this class has no
195      * identity.
196      */
197     public org.exolab.castor.mapping.FieldDescriptor getIdentity(
198     ) {
199         return super.getIdentity();
200     }
201
202     /**
203      * Method getJavaClass.
204      * 
205      * @return the Java class represented by this descriptor.
206      */
207     public java.lang.Class getJavaClass(
208     ) {
209         return jalview.schemabinding.version2.VAMSAS.class;
210     }
211
212     /**
213      * Method getNameSpacePrefix.
214      * 
215      * @return the namespace prefix to use when marshaling as XML.
216      */
217     public java.lang.String getNameSpacePrefix(
218     ) {
219         return _nsPrefix;
220     }
221
222     /**
223      * Method getNameSpaceURI.
224      * 
225      * @return the namespace URI used when marshaling and
226      * unmarshaling as XML.
227      */
228     public java.lang.String getNameSpaceURI(
229     ) {
230         return _nsURI;
231     }
232
233     /**
234      * Method getValidator.
235      * 
236      * @return a specific validator for the class described by this
237      * ClassDescriptor.
238      */
239     public org.exolab.castor.xml.TypeValidator getValidator(
240     ) {
241         return this;
242     }
243
244     /**
245      * Method getXMLName.
246      * 
247      * @return the XML Name for the Class being described.
248      */
249     public java.lang.String getXMLName(
250     ) {
251         return _xmlName;
252     }
253
254     /**
255      * Method isElementDefinition.
256      * 
257      * @return true if XML schema definition of this Class is that
258      * of a global
259      * element or element with anonymous type definition.
260      */
261     public boolean isElementDefinition(
262     ) {
263         return _elementDefinition;
264     }
265
266 }