3bd5e227eb452bd0ee09b6ae235e9d7e92f68f3c
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / SequenceSetPropertiesDescriptor.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.SequenceSetProperties;
35
36 /**
37  * Class SequenceSetPropertiesDescriptor.
38  * 
39  * @version $Revision$ $Date$
40  */
41 public class SequenceSetPropertiesDescriptor 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 SequenceSetPropertiesDescriptor()
74   {
75     super();
76     _nsURI = "www.vamsas.ac.uk/jalview/version2";
77     _xmlName = "sequenceSetProperties";
78     _elementDefinition = true;
79     org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
80     org.exolab.castor.mapping.FieldHandler handler = null;
81     org.exolab.castor.xml.FieldValidator fieldValidator = null;
82     // -- initialize attribute descriptors
83
84     // -- _key
85     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
86             java.lang.String.class, "_key", "key",
87             org.exolab.castor.xml.NodeType.Attribute);
88     desc.setImmutable(true);
89     handler = new org.exolab.castor.xml.XMLFieldHandler()
90     {
91       public java.lang.Object getValue(java.lang.Object object)
92               throws IllegalStateException
93       {
94         SequenceSetProperties target = (SequenceSetProperties) object;
95         return target.getKey();
96       }
97
98       public void setValue(java.lang.Object object, java.lang.Object value)
99               throws IllegalStateException, IllegalArgumentException
100       {
101         try
102         {
103           SequenceSetProperties target = (SequenceSetProperties) object;
104           target.setKey((java.lang.String) value);
105         } catch (java.lang.Exception ex)
106         {
107           throw new IllegalStateException(ex.toString());
108         }
109       }
110
111       public java.lang.Object newInstance(java.lang.Object parent)
112       {
113         return null;
114       }
115     };
116     desc.setHandler(handler);
117     desc.setMultivalued(false);
118     addFieldDescriptor(desc);
119
120     // -- validation code for: _key
121     fieldValidator = new org.exolab.castor.xml.FieldValidator();
122     { // -- local scope
123       org.exolab.castor.xml.validators.StringValidator typeValidator;
124       typeValidator = new org.exolab.castor.xml.validators.StringValidator();
125       fieldValidator.setValidator(typeValidator);
126       typeValidator.setWhiteSpace("preserve");
127     }
128     desc.setValidator(fieldValidator);
129     // -- _value
130     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
131             java.lang.String.class, "_value", "value",
132             org.exolab.castor.xml.NodeType.Attribute);
133     desc.setImmutable(true);
134     handler = new org.exolab.castor.xml.XMLFieldHandler()
135     {
136       public java.lang.Object getValue(java.lang.Object object)
137               throws IllegalStateException
138       {
139         SequenceSetProperties target = (SequenceSetProperties) object;
140         return target.getValue();
141       }
142
143       public void setValue(java.lang.Object object, java.lang.Object value)
144               throws IllegalStateException, IllegalArgumentException
145       {
146         try
147         {
148           SequenceSetProperties target = (SequenceSetProperties) object;
149           target.setValue((java.lang.String) value);
150         } catch (java.lang.Exception ex)
151         {
152           throw new IllegalStateException(ex.toString());
153         }
154       }
155
156       public java.lang.Object newInstance(java.lang.Object parent)
157       {
158         return null;
159       }
160     };
161     desc.setHandler(handler);
162     desc.setMultivalued(false);
163     addFieldDescriptor(desc);
164
165     // -- validation code for: _value
166     fieldValidator = new org.exolab.castor.xml.FieldValidator();
167     { // -- local scope
168       org.exolab.castor.xml.validators.StringValidator typeValidator;
169       typeValidator = new org.exolab.castor.xml.validators.StringValidator();
170       fieldValidator.setValidator(typeValidator);
171       typeValidator.setWhiteSpace("preserve");
172     }
173     desc.setValidator(fieldValidator);
174     // -- initialize element descriptors
175
176   }
177
178   // -----------/
179   // - Methods -/
180   // -----------/
181
182   /**
183    * Method getAccessMode.
184    * 
185    * @return the access mode specified for this class.
186    */
187   public org.exolab.castor.mapping.AccessMode getAccessMode()
188   {
189     return null;
190   }
191
192   /**
193    * Method getIdentity.
194    * 
195    * @return the identity field, null if this class has no 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.SequenceSetProperties.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 unmarshaling as XML.
226    */
227   public java.lang.String getNameSpaceURI()
228   {
229     return _nsURI;
230   }
231
232   /**
233    * Method getValidator.
234    * 
235    * @return a specific validator for the class described by this
236    *         ClassDescriptor.
237    */
238   public org.exolab.castor.xml.TypeValidator getValidator()
239   {
240     return this;
241   }
242
243   /**
244    * Method getXMLName.
245    * 
246    * @return the XML Name for the Class being described.
247    */
248   public java.lang.String getXMLName()
249   {
250     return _xmlName;
251   }
252
253   /**
254    * Method isElementDefinition.
255    * 
256    * @return true if XML schema definition of this Class is that of a global
257    *         element or element with anonymous type definition.
258    */
259   public boolean isElementDefinition()
260   {
261     return _elementDefinition;
262   }
263
264 }