autogenerated java classes for current schema
[vamsas.git] / src / org / vamsas / objects / core / PropertyDescriptor.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 PropertyDescriptor.
21  * 
22  * @version $Revision$ $Date$
23  */
24 public class PropertyDescriptor 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 PropertyDescriptor() 
57      {
58         super();
59         nsURI = "http://www.vamsas.org";
60         xmlName = "property";
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         //-- _content
65         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text);
66         desc.setImmutable(true);
67         handler = new org.exolab.castor.xml.XMLFieldHandler() {
68             public java.lang.Object getValue( java.lang.Object object ) 
69                 throws IllegalStateException
70             {
71                 Property target = (Property) object;
72                 return target.getContent();
73             }
74             public void setValue( java.lang.Object object, java.lang.Object value) 
75                 throws IllegalStateException, IllegalArgumentException
76             {
77                 try {
78                     Property target = (Property) object;
79                     target.setContent( (java.lang.String) value);
80                 }
81                 catch (java.lang.Exception ex) {
82                     throw new IllegalStateException(ex.toString());
83                 }
84             }
85             public java.lang.Object newInstance( java.lang.Object parent ) {
86                 return null;
87             }
88         };
89         desc.setHandler(handler);
90         addFieldDescriptor(desc);
91         
92         //-- validation code for: _content
93         fieldValidator = new org.exolab.castor.xml.FieldValidator();
94         { //-- local scope
95             StringValidator typeValidator = new StringValidator();
96             typeValidator.setWhiteSpace("preserve");
97             fieldValidator.setValidator(typeValidator);
98         }
99         desc.setValidator(fieldValidator);
100         //-- initialize attribute descriptors
101         
102         //-- _name
103         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute);
104         desc.setImmutable(true);
105         handler = new org.exolab.castor.xml.XMLFieldHandler() {
106             public java.lang.Object getValue( java.lang.Object object ) 
107                 throws IllegalStateException
108             {
109                 Property target = (Property) object;
110                 return target.getName();
111             }
112             public void setValue( java.lang.Object object, java.lang.Object value) 
113                 throws IllegalStateException, IllegalArgumentException
114             {
115                 try {
116                     Property target = (Property) object;
117                     target.setName( (java.lang.String) value);
118                 }
119                 catch (java.lang.Exception ex) {
120                     throw new IllegalStateException(ex.toString());
121                 }
122             }
123             public java.lang.Object newInstance( java.lang.Object parent ) {
124                 return null;
125             }
126         };
127         desc.setHandler(handler);
128         desc.setRequired(true);
129         desc.setMultivalued(false);
130         addFieldDescriptor(desc);
131         
132         //-- validation code for: _name
133         fieldValidator = new org.exolab.castor.xml.FieldValidator();
134         fieldValidator.setMinOccurs(1);
135         { //-- local scope
136             StringValidator typeValidator = new StringValidator();
137             typeValidator.setWhiteSpace("preserve");
138             fieldValidator.setValidator(typeValidator);
139         }
140         desc.setValidator(fieldValidator);
141         //-- _type
142         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", org.exolab.castor.xml.NodeType.Attribute);
143         desc.setImmutable(true);
144         handler = new org.exolab.castor.xml.XMLFieldHandler() {
145             public java.lang.Object getValue( java.lang.Object object ) 
146                 throws IllegalStateException
147             {
148                 Property target = (Property) object;
149                 return target.getType();
150             }
151             public void setValue( java.lang.Object object, java.lang.Object value) 
152                 throws IllegalStateException, IllegalArgumentException
153             {
154                 try {
155                     Property target = (Property) object;
156                     target.setType( (java.lang.String) value);
157                 }
158                 catch (java.lang.Exception ex) {
159                     throw new IllegalStateException(ex.toString());
160                 }
161             }
162             public java.lang.Object newInstance( java.lang.Object parent ) {
163                 return null;
164             }
165         };
166         desc.setHandler(handler);
167         desc.setRequired(true);
168         desc.setMultivalued(false);
169         addFieldDescriptor(desc);
170         
171         //-- validation code for: _type
172         fieldValidator = new org.exolab.castor.xml.FieldValidator();
173         fieldValidator.setMinOccurs(1);
174         { //-- local scope
175             StringValidator typeValidator = new StringValidator();
176             typeValidator.setWhiteSpace("preserve");
177             fieldValidator.setValidator(typeValidator);
178         }
179         desc.setValidator(fieldValidator);
180         //-- initialize element descriptors
181         
182     } //-- org.vamsas.objects.core.PropertyDescriptor()
183
184
185       //-----------/
186      //- Methods -/
187     //-----------/
188
189     /**
190      * Method getAccessMode
191      * 
192      * 
193      * 
194      * @return AccessMode
195      */
196     public org.exolab.castor.mapping.AccessMode getAccessMode()
197     {
198         return null;
199     } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 
200
201     /**
202      * Method getExtends
203      * 
204      * 
205      * 
206      * @return ClassDescriptor
207      */
208     public org.exolab.castor.mapping.ClassDescriptor getExtends()
209     {
210         return null;
211     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 
212
213     /**
214      * Method getIdentity
215      * 
216      * 
217      * 
218      * @return FieldDescriptor
219      */
220     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
221     {
222         return identity;
223     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 
224
225     /**
226      * Method getJavaClass
227      * 
228      * 
229      * 
230      * @return Class
231      */
232     public java.lang.Class getJavaClass()
233     {
234         return org.vamsas.objects.core.Property.class;
235     } //-- java.lang.Class getJavaClass() 
236
237     /**
238      * Method getNameSpacePrefix
239      * 
240      * 
241      * 
242      * @return String
243      */
244     public java.lang.String getNameSpacePrefix()
245     {
246         return nsPrefix;
247     } //-- java.lang.String getNameSpacePrefix() 
248
249     /**
250      * Method getNameSpaceURI
251      * 
252      * 
253      * 
254      * @return String
255      */
256     public java.lang.String getNameSpaceURI()
257     {
258         return nsURI;
259     } //-- java.lang.String getNameSpaceURI() 
260
261     /**
262      * Method getValidator
263      * 
264      * 
265      * 
266      * @return TypeValidator
267      */
268     public org.exolab.castor.xml.TypeValidator getValidator()
269     {
270         return this;
271     } //-- org.exolab.castor.xml.TypeValidator getValidator() 
272
273     /**
274      * Method getXMLName
275      * 
276      * 
277      * 
278      * @return String
279      */
280     public java.lang.String getXMLName()
281     {
282         return xmlName;
283     } //-- java.lang.String getXMLName() 
284
285 }