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