1d46b62b470142dbb1a61df7c5eeb75ddd988b08
[vamsas.git] / AppDataChoiceDescriptor.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package org.vamsas.objects.core;
9
10   //---------------------------------/
11  //- Imported classes and packages -/
12 //---------------------------------/
13
14 import org.exolab.castor.mapping.AccessMode;
15 import org.exolab.castor.xml.TypeValidator;
16 import org.exolab.castor.xml.XMLFieldDescriptor;
17 import org.exolab.castor.xml.validators.*;
18
19 /**
20  * Class AppDataChoiceDescriptor.
21  * 
22  * @version $Revision$ $Date$
23  */
24 public class AppDataChoiceDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
25
26
27       //--------------------------/
28      //- Class/Member Variables -/
29     //--------------------------/
30
31     /**
32      * Field nsPrefix
33      */
34     private java.lang.String nsPrefix;
35
36     /**
37      * Field nsURI
38      */
39     private java.lang.String nsURI;
40
41     /**
42      * Field xmlName
43      */
44     private java.lang.String xmlName;
45
46     /**
47      * Field identity
48      */
49     private org.exolab.castor.xml.XMLFieldDescriptor identity;
50
51
52       //----------------/
53      //- Constructors -/
54     //----------------/
55
56     public AppDataChoiceDescriptor() 
57      {
58         super();
59         nsURI = "http://www.vamsas.org";
60         
61         //-- set grouping compositor
62         setCompositorAsChoice();
63         org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
64         org.exolab.castor.mapping.FieldHandler             handler        = null;
65         org.exolab.castor.xml.FieldValidator               fieldValidator = null;
66         //-- initialize attribute descriptors
67         
68         //-- initialize element descriptors
69         
70         //-- _data
71         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_data", "data", org.exolab.castor.xml.NodeType.Element);
72         desc.setImmutable(true);
73         handler = new org.exolab.castor.xml.XMLFieldHandler() {
74             public java.lang.Object getValue( java.lang.Object object ) 
75                 throws IllegalStateException
76             {
77                 AppDataChoice target = (AppDataChoice) object;
78                 return target.getData();
79             }
80             public void setValue( java.lang.Object object, java.lang.Object value) 
81                 throws IllegalStateException, IllegalArgumentException
82             {
83                 try {
84                     AppDataChoice target = (AppDataChoice) object;
85                     target.setData( (java.lang.String) value);
86                 }
87                 catch (java.lang.Exception ex) {
88                     throw new IllegalStateException(ex.toString());
89                 }
90             }
91             public java.lang.Object newInstance( java.lang.Object parent ) {
92                 return null;
93             }
94         };
95         desc.setHandler(handler);
96         desc.setNameSpaceURI("http://www.vamsas.org");
97         desc.setRequired(true);
98         desc.setMultivalued(false);
99         addFieldDescriptor(desc);
100         
101         //-- validation code for: _data
102         fieldValidator = new org.exolab.castor.xml.FieldValidator();
103         fieldValidator.setMinOccurs(1);
104         { //-- local scope
105             StringValidator typeValidator = new StringValidator();
106             typeValidator.setWhiteSpace("preserve");
107             fieldValidator.setValidator(typeValidator);
108         }
109         desc.setValidator(fieldValidator);
110         //-- _dataReference
111         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(byte[].class, "_dataReference", "dataReference", org.exolab.castor.xml.NodeType.Element);
112         handler = new org.exolab.castor.xml.XMLFieldHandler() {
113             public java.lang.Object getValue( java.lang.Object object ) 
114                 throws IllegalStateException
115             {
116                 AppDataChoice target = (AppDataChoice) object;
117                 return target.getDataReference();
118             }
119             public void setValue( java.lang.Object object, java.lang.Object value) 
120                 throws IllegalStateException, IllegalArgumentException
121             {
122                 try {
123                     AppDataChoice target = (AppDataChoice) object;
124                     target.setDataReference( (byte[]) value);
125                 }
126                 catch (java.lang.Exception ex) {
127                     throw new IllegalStateException(ex.toString());
128                 }
129             }
130             public java.lang.Object newInstance( java.lang.Object parent ) {
131                 return null;
132             }
133         };
134         desc.setHandler(handler);
135         desc.setNameSpaceURI("http://www.vamsas.org");
136         desc.setRequired(true);
137         desc.setMultivalued(false);
138         addFieldDescriptor(desc);
139         
140         //-- validation code for: _dataReference
141         fieldValidator = new org.exolab.castor.xml.FieldValidator();
142         fieldValidator.setMinOccurs(1);
143         { //-- local scope
144         }
145         desc.setValidator(fieldValidator);
146     } //-- org.vamsas.objects.core.AppDataChoiceDescriptor()
147
148
149       //-----------/
150      //- Methods -/
151     //-----------/
152
153     /**
154      * Method getAccessMode
155      * 
156      * 
157      * 
158      * @return AccessMode
159      */
160     public org.exolab.castor.mapping.AccessMode getAccessMode()
161     {
162         return null;
163     } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 
164
165     /**
166      * Method getExtends
167      * 
168      * 
169      * 
170      * @return ClassDescriptor
171      */
172     public org.exolab.castor.mapping.ClassDescriptor getExtends()
173     {
174         return null;
175     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 
176
177     /**
178      * Method getIdentity
179      * 
180      * 
181      * 
182      * @return FieldDescriptor
183      */
184     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
185     {
186         return identity;
187     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 
188
189     /**
190      * Method getJavaClass
191      * 
192      * 
193      * 
194      * @return Class
195      */
196     public java.lang.Class getJavaClass()
197     {
198         return org.vamsas.objects.core.AppDataChoice.class;
199     } //-- java.lang.Class getJavaClass() 
200
201     /**
202      * Method getNameSpacePrefix
203      * 
204      * 
205      * 
206      * @return String
207      */
208     public java.lang.String getNameSpacePrefix()
209     {
210         return nsPrefix;
211     } //-- java.lang.String getNameSpacePrefix() 
212
213     /**
214      * Method getNameSpaceURI
215      * 
216      * 
217      * 
218      * @return String
219      */
220     public java.lang.String getNameSpaceURI()
221     {
222         return nsURI;
223     } //-- java.lang.String getNameSpaceURI() 
224
225     /**
226      * Method getValidator
227      * 
228      * 
229      * 
230      * @return TypeValidator
231      */
232     public org.exolab.castor.xml.TypeValidator getValidator()
233     {
234         return this;
235     } //-- org.exolab.castor.xml.TypeValidator getValidator() 
236
237     /**
238      * Method getXMLName
239      * 
240      * 
241      * 
242      * @return String
243      */
244     public java.lang.String getXMLName()
245     {
246         return xmlName;
247     } //-- java.lang.String getXMLName() 
248
249 }