e7b075dd064d5a4006a1df87eeba526731266661
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / SequenceSetPropertiesDescriptor.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.SequenceSetProperties;
34
35 /**
36  * Class SequenceSetPropertiesDescriptor.
37  * 
38  * @version $Revision$ $Date$
39  */
40 public class SequenceSetPropertiesDescriptor 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 SequenceSetPropertiesDescriptor()
73   {
74     super();
75     _nsURI = "www.vamsas.ac.uk/jalview/version2";
76     _xmlName = "sequenceSetProperties";
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         SequenceSetProperties target = (SequenceSetProperties) 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           SequenceSetProperties target = (SequenceSetProperties) 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.setMultivalued(false);
117     addFieldDescriptor(desc);
118
119     // -- validation code for: _key
120     fieldValidator = new org.exolab.castor.xml.FieldValidator();
121     { // -- local scope
122       org.exolab.castor.xml.validators.StringValidator typeValidator;
123       typeValidator = new org.exolab.castor.xml.validators.StringValidator();
124       fieldValidator.setValidator(typeValidator);
125       typeValidator.setWhiteSpace("preserve");
126     }
127     desc.setValidator(fieldValidator);
128     // -- _value
129     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
130             java.lang.String.class, "_value", "value",
131             org.exolab.castor.xml.NodeType.Attribute);
132     desc.setImmutable(true);
133     handler = new org.exolab.castor.xml.XMLFieldHandler()
134     {
135       public java.lang.Object getValue(java.lang.Object object)
136               throws IllegalStateException
137       {
138         SequenceSetProperties target = (SequenceSetProperties) object;
139         return target.getValue();
140       }
141
142       public void setValue(java.lang.Object object, java.lang.Object value)
143               throws IllegalStateException, IllegalArgumentException
144       {
145         try
146         {
147           SequenceSetProperties target = (SequenceSetProperties) object;
148           target.setValue((java.lang.String) value);
149         } catch (java.lang.Exception ex)
150         {
151           throw new IllegalStateException(ex.toString());
152         }
153       }
154
155       public java.lang.Object newInstance(java.lang.Object parent)
156       {
157         return null;
158       }
159     };
160     desc.setHandler(handler);
161     desc.setMultivalued(false);
162     addFieldDescriptor(desc);
163
164     // -- validation code for: _value
165     fieldValidator = new org.exolab.castor.xml.FieldValidator();
166     { // -- local scope
167       org.exolab.castor.xml.validators.StringValidator typeValidator;
168       typeValidator = new org.exolab.castor.xml.validators.StringValidator();
169       fieldValidator.setValidator(typeValidator);
170       typeValidator.setWhiteSpace("preserve");
171     }
172     desc.setValidator(fieldValidator);
173     // -- initialize element descriptors
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 identity.
195    */
196   public org.exolab.castor.mapping.FieldDescriptor getIdentity()
197   {
198     return super.getIdentity();
199   }
200
201   /**
202    * Method getJavaClass.
203    * 
204    * @return the Java class represented by this descriptor.
205    */
206   public java.lang.Class getJavaClass()
207   {
208     return jalview.schemabinding.version2.SequenceSetProperties.class;
209   }
210
211   /**
212    * Method getNameSpacePrefix.
213    * 
214    * @return the namespace prefix to use when marshaling as XML.
215    */
216   public java.lang.String getNameSpacePrefix()
217   {
218     return _nsPrefix;
219   }
220
221   /**
222    * Method getNameSpaceURI.
223    * 
224    * @return the namespace URI used when marshaling and unmarshaling as XML.
225    */
226   public java.lang.String getNameSpaceURI()
227   {
228     return _nsURI;
229   }
230
231   /**
232    * Method getValidator.
233    * 
234    * @return a specific validator for the class described by this
235    *         ClassDescriptor.
236    */
237   public org.exolab.castor.xml.TypeValidator getValidator()
238   {
239     return this;
240   }
241
242   /**
243    * Method getXMLName.
244    * 
245    * @return the XML Name for the Class being described.
246    */
247   public java.lang.String getXMLName()
248   {
249     return _xmlName;
250   }
251
252   /**
253    * Method isElementDefinition.
254    * 
255    * @return true if XML schema definition of this Class is that of a global
256    *         element or element with anonymous type definition.
257    */
258   public boolean isElementDefinition()
259   {
260     return _elementDefinition;
261   }
262
263 }