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