0d955928490fb887afb9beaaab8c4082f8acb097
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / AlcodMapDescriptor.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package jalview.schemabinding.version2.descriptors;
9
10   //---------------------------------/
11  //- Imported classes and packages -/
12 //---------------------------------/
13
14 import jalview.schemabinding.version2.AlcodMap;
15
16 /**
17  * Class AlcodMapDescriptor.
18  * 
19  * @version $Revision$ $Date$
20  */
21 public class AlcodMapDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
22
23
24       //--------------------------/
25      //- Class/Member Variables -/
26     //--------------------------/
27
28     /**
29      * Field _elementDefinition.
30      */
31     private boolean _elementDefinition;
32
33     /**
34      * Field _nsPrefix.
35      */
36     private java.lang.String _nsPrefix;
37
38     /**
39      * Field _nsURI.
40      */
41     private java.lang.String _nsURI;
42
43     /**
44      * Field _xmlName.
45      */
46     private java.lang.String _xmlName;
47
48
49       //----------------/
50      //- Constructors -/
51     //----------------/
52
53     public AlcodMapDescriptor() {
54         super();
55         _nsURI = "www.vamsas.ac.uk/jalview/version2";
56         _xmlName = "alcodMap";
57         _elementDefinition = true;
58         
59         //-- set grouping compositor
60         setCompositorAsSequence();
61         org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
62         org.exolab.castor.mapping.FieldHandler             handler        = null;
63         org.exolab.castor.xml.FieldValidator               fieldValidator = null;
64         //-- initialize attribute descriptors
65         
66         //-- _dnasq
67         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_dnasq", "dnasq", org.exolab.castor.xml.NodeType.Attribute);
68         desc.setImmutable(true);
69         handler = new org.exolab.castor.xml.XMLFieldHandler() {
70             public java.lang.Object getValue( java.lang.Object object ) 
71                 throws IllegalStateException
72             {
73                 AlcodMap target = (AlcodMap) object;
74                 return target.getDnasq();
75             }
76             public void setValue( java.lang.Object object, java.lang.Object value) 
77                 throws IllegalStateException, IllegalArgumentException
78             {
79                 try {
80                     AlcodMap target = (AlcodMap) object;
81                     target.setDnasq( (java.lang.String) value);
82                 } catch (java.lang.Exception ex) {
83                     throw new IllegalStateException(ex.toString());
84                 }
85             }
86             public java.lang.Object newInstance(java.lang.Object parent) {
87                 return null;
88             }
89         };
90         desc.setHandler(handler);
91         desc.setRequired(true);
92         desc.setMultivalued(false);
93         addFieldDescriptor(desc);
94         
95         //-- validation code for: _dnasq
96         fieldValidator = new org.exolab.castor.xml.FieldValidator();
97         fieldValidator.setMinOccurs(1);
98         { //-- local scope
99             org.exolab.castor.xml.validators.StringValidator typeValidator;
100             typeValidator = new org.exolab.castor.xml.validators.StringValidator();
101             fieldValidator.setValidator(typeValidator);
102             typeValidator.setWhiteSpace("preserve");
103         }
104         desc.setValidator(fieldValidator);
105         //-- initialize element descriptors
106         
107         //-- _mapping
108         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Mapping.class, "_mapping", "Mapping", org.exolab.castor.xml.NodeType.Element);
109         handler = new org.exolab.castor.xml.XMLFieldHandler() {
110             public java.lang.Object getValue( java.lang.Object object ) 
111                 throws IllegalStateException
112             {
113                 AlcodMap target = (AlcodMap) object;
114                 return target.getMapping();
115             }
116             public void setValue( java.lang.Object object, java.lang.Object value) 
117                 throws IllegalStateException, IllegalArgumentException
118             {
119                 try {
120                     AlcodMap target = (AlcodMap) object;
121                     target.setMapping( (jalview.schemabinding.version2.Mapping) value);
122                 } catch (java.lang.Exception ex) {
123                     throw new IllegalStateException(ex.toString());
124                 }
125             }
126             public java.lang.Object newInstance(java.lang.Object parent) {
127                 return new jalview.schemabinding.version2.Mapping();
128             }
129         };
130         desc.setHandler(handler);
131         desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
132         desc.setRequired(true);
133         desc.setMultivalued(false);
134         addFieldDescriptor(desc);
135         
136         //-- validation code for: _mapping
137         fieldValidator = new org.exolab.castor.xml.FieldValidator();
138         fieldValidator.setMinOccurs(1);
139         { //-- local scope
140         }
141         desc.setValidator(fieldValidator);
142     }
143
144
145       //-----------/
146      //- Methods -/
147     //-----------/
148
149     /**
150      * Method getAccessMode.
151      * 
152      * @return the access mode specified for this class.
153      */
154     public org.exolab.castor.mapping.AccessMode getAccessMode(
155     ) {
156         return null;
157     }
158
159     /**
160      * Method getIdentity.
161      * 
162      * @return the identity field, null if this class has no
163      * identity.
164      */
165     public org.exolab.castor.mapping.FieldDescriptor getIdentity(
166     ) {
167         return super.getIdentity();
168     }
169
170     /**
171      * Method getJavaClass.
172      * 
173      * @return the Java class represented by this descriptor.
174      */
175     public java.lang.Class getJavaClass(
176     ) {
177         return jalview.schemabinding.version2.AlcodMap.class;
178     }
179
180     /**
181      * Method getNameSpacePrefix.
182      * 
183      * @return the namespace prefix to use when marshaling as XML.
184      */
185     public java.lang.String getNameSpacePrefix(
186     ) {
187         return _nsPrefix;
188     }
189
190     /**
191      * Method getNameSpaceURI.
192      * 
193      * @return the namespace URI used when marshaling and
194      * unmarshaling as XML.
195      */
196     public java.lang.String getNameSpaceURI(
197     ) {
198         return _nsURI;
199     }
200
201     /**
202      * Method getValidator.
203      * 
204      * @return a specific validator for the class described by this
205      * ClassDescriptor.
206      */
207     public org.exolab.castor.xml.TypeValidator getValidator(
208     ) {
209         return this;
210     }
211
212     /**
213      * Method getXMLName.
214      * 
215      * @return the XML Name for the Class being described.
216      */
217     public java.lang.String getXMLName(
218     ) {
219         return _xmlName;
220     }
221
222     /**
223      * Method isElementDefinition.
224      * 
225      * @return true if XML schema definition of this Class is that
226      * of a global
227      * element or element with anonymous type definition.
228      */
229     public boolean isElementDefinition(
230     ) {
231         return _elementDefinition;
232     }
233
234 }