1
2
3
4
5
6
7
8 package org.apache.jetspeed.xml.api.jcm;
9
10
11
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 * @version $Revision$ $Date$
28 **/
29 public class ChannelDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
30
31
32
33
34
35
36 private java.lang.String nsPrefix;
37
38 private java.lang.String nsURI;
39
40 private java.lang.String xmlName;
41
42 private org.exolab.castor.xml.XMLFieldDescriptor identity;
43
44
45
46
47
48
49 public ChannelDescriptor() {
50 super();
51 nsURI = "http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content";
52 xmlName = "channel";
53 XMLFieldDescriptorImpl desc = null;
54 XMLFieldHandler handler = null;
55 FieldValidator fieldValidator = null;
56
57
58
59
60
61 desc = new XMLFieldDescriptorImpl(Topics.class, "_topics", "topics", NodeType.Element);
62 handler = (new XMLFieldHandler() {
63 public Object getValue( Object object )
64 throws IllegalStateException
65 {
66 Channel target = (Channel) object;
67 return target.getTopics();
68 }
69 public void setValue( Object object, Object value)
70 throws IllegalStateException, IllegalArgumentException
71 {
72 try {
73 Channel target = (Channel) object;
74 target.setTopics( (Topics) value);
75 }
76 catch (Exception ex) {
77 throw new IllegalStateException(ex.toString());
78 }
79 }
80 public Object newInstance( Object parent ) {
81 return new Topics();
82 }
83 } );
84 desc.setHandler(handler);
85 desc.setNameSpaceURI("http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content");
86 desc.setMultivalued(false);
87 addFieldDescriptor(desc);
88
89
90 fieldValidator = new FieldValidator();
91 desc.setValidator(fieldValidator);
92
93
94 desc = new XMLFieldDescriptorImpl(Item.class, "_itemList", "item", NodeType.Element);
95 handler = (new XMLFieldHandler() {
96 public Object getValue( Object object )
97 throws IllegalStateException
98 {
99 Channel target = (Channel) object;
100 return target.getItem();
101 }
102 public void setValue( Object object, Object value)
103 throws IllegalStateException, IllegalArgumentException
104 {
105 try {
106 Channel target = (Channel) object;
107 target.addItem( (Item) value);
108 }
109 catch (Exception ex) {
110 throw new IllegalStateException(ex.toString());
111 }
112 }
113 public Object newInstance( Object parent ) {
114 return new Item();
115 }
116 } );
117 desc.setHandler(handler);
118 desc.setNameSpaceURI("http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content");
119 desc.setMultivalued(true);
120 addFieldDescriptor(desc);
121
122
123 fieldValidator = new FieldValidator();
124 fieldValidator.setMinOccurs(0);
125 desc.setValidator(fieldValidator);
126
127
128 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_title", "title", NodeType.Element);
129 desc.setImmutable(true);
130 handler = (new XMLFieldHandler() {
131 public Object getValue( Object object )
132 throws IllegalStateException
133 {
134 Channel target = (Channel) object;
135 return target.getTitle();
136 }
137 public void setValue( Object object, Object value)
138 throws IllegalStateException, IllegalArgumentException
139 {
140 try {
141 Channel target = (Channel) object;
142 target.setTitle( (java.lang.String) value);
143 }
144 catch (Exception ex) {
145 throw new IllegalStateException(ex.toString());
146 }
147 }
148 public Object newInstance( Object parent ) {
149 return null;
150 }
151 } );
152 desc.setHandler(handler);
153 desc.setNameSpaceURI("http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content");
154 desc.setRequired(true);
155 desc.setMultivalued(false);
156 addFieldDescriptor(desc);
157
158
159 fieldValidator = new FieldValidator();
160 fieldValidator.setMinOccurs(1);
161 {
162 StringValidator sv = new StringValidator();
163 sv.setWhiteSpace("preserve");
164 fieldValidator.setValidator(sv);
165 }
166 desc.setValidator(fieldValidator);
167
168
169 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_link", "link", NodeType.Element);
170 desc.setImmutable(true);
171 handler = (new XMLFieldHandler() {
172 public Object getValue( Object object )
173 throws IllegalStateException
174 {
175 Channel target = (Channel) object;
176 return target.getLink();
177 }
178 public void setValue( Object object, Object value)
179 throws IllegalStateException, IllegalArgumentException
180 {
181 try {
182 Channel target = (Channel) object;
183 target.setLink( (java.lang.String) value);
184 }
185 catch (Exception ex) {
186 throw new IllegalStateException(ex.toString());
187 }
188 }
189 public Object newInstance( Object parent ) {
190 return null;
191 }
192 } );
193 desc.setHandler(handler);
194 desc.setNameSpaceURI("http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content");
195 desc.setRequired(true);
196 desc.setMultivalued(false);
197 addFieldDescriptor(desc);
198
199
200 fieldValidator = new FieldValidator();
201 fieldValidator.setMinOccurs(1);
202 {
203 StringValidator sv = new StringValidator();
204 sv.setWhiteSpace("preserve");
205 fieldValidator.setValidator(sv);
206 }
207 desc.setValidator(fieldValidator);
208
209
210 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", NodeType.Element);
211 desc.setImmutable(true);
212 handler = (new XMLFieldHandler() {
213 public Object getValue( Object object )
214 throws IllegalStateException
215 {
216 Channel target = (Channel) object;
217 return target.getDescription();
218 }
219 public void setValue( Object object, Object value)
220 throws IllegalStateException, IllegalArgumentException
221 {
222 try {
223 Channel target = (Channel) object;
224 target.setDescription( (java.lang.String) value);
225 }
226 catch (Exception ex) {
227 throw new IllegalStateException(ex.toString());
228 }
229 }
230 public Object newInstance( Object parent ) {
231 return null;
232 }
233 } );
234 desc.setHandler(handler);
235 desc.setNameSpaceURI("http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content");
236 desc.setRequired(true);
237 desc.setMultivalued(false);
238 addFieldDescriptor(desc);
239
240
241 fieldValidator = new FieldValidator();
242 fieldValidator.setMinOccurs(1);
243 {
244 StringValidator sv = new StringValidator();
245 sv.setWhiteSpace("preserve");
246 fieldValidator.setValidator(sv);
247 }
248 desc.setValidator(fieldValidator);
249
250
251 desc = new XMLFieldDescriptorImpl(Image.class, "_image", "image", NodeType.Element);
252 handler = (new XMLFieldHandler() {
253 public Object getValue( Object object )
254 throws IllegalStateException
255 {
256 Channel target = (Channel) object;
257 return target.getImage();
258 }
259 public void setValue( Object object, Object value)
260 throws IllegalStateException, IllegalArgumentException
261 {
262 try {
263 Channel target = (Channel) object;
264 target.setImage( (Image) value);
265 }
266 catch (Exception ex) {
267 throw new IllegalStateException(ex.toString());
268 }
269 }
270 public Object newInstance( Object parent ) {
271 return new Image();
272 }
273 } );
274 desc.setHandler(handler);
275 desc.setNameSpaceURI("http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content");
276 desc.setMultivalued(false);
277 addFieldDescriptor(desc);
278
279
280 fieldValidator = new FieldValidator();
281 desc.setValidator(fieldValidator);
282
283
284 desc = new XMLFieldDescriptorImpl(Textinput.class, "_textinput", "textinput", NodeType.Element);
285 handler = (new XMLFieldHandler() {
286 public Object getValue( Object object )
287 throws IllegalStateException
288 {
289 Channel target = (Channel) object;
290 return target.getTextinput();
291 }
292 public void setValue( Object object, Object value)
293 throws IllegalStateException, IllegalArgumentException
294 {
295 try {
296 Channel target = (Channel) object;
297 target.setTextinput( (Textinput) value);
298 }
299 catch (Exception ex) {
300 throw new IllegalStateException(ex.toString());
301 }
302 }
303 public Object newInstance( Object parent ) {
304 return new Textinput();
305 }
306 } );
307 desc.setHandler(handler);
308 desc.setNameSpaceURI("http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content");
309 desc.setMultivalued(false);
310 addFieldDescriptor(desc);
311
312
313 fieldValidator = new FieldValidator();
314 desc.setValidator(fieldValidator);
315
316
317 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_rating", "rating", NodeType.Element);
318 desc.setImmutable(true);
319 handler = (new XMLFieldHandler() {
320 public Object getValue( Object object )
321 throws IllegalStateException
322 {
323 Channel target = (Channel) object;
324 return target.getRating();
325 }
326 public void setValue( Object object, Object value)
327 throws IllegalStateException, IllegalArgumentException
328 {
329 try {
330 Channel target = (Channel) object;
331 target.setRating( (java.lang.String) value);
332 }
333 catch (Exception ex) {
334 throw new IllegalStateException(ex.toString());
335 }
336 }
337 public Object newInstance( Object parent ) {
338 return null;
339 }
340 } );
341 desc.setHandler(handler);
342 desc.setNameSpaceURI("http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content");
343 desc.setMultivalued(false);
344 addFieldDescriptor(desc);
345
346
347 fieldValidator = new FieldValidator();
348 {
349 StringValidator sv = new StringValidator();
350 sv.setWhiteSpace("preserve");
351 fieldValidator.setValidator(sv);
352 }
353 desc.setValidator(fieldValidator);
354
355
356 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_copyright", "copyright", NodeType.Element);
357 desc.setImmutable(true);
358 handler = (new XMLFieldHandler() {
359 public Object getValue( Object object )
360 throws IllegalStateException
361 {
362 Channel target = (Channel) object;
363 return target.getCopyright();
364 }
365 public void setValue( Object object, Object value)
366 throws IllegalStateException, IllegalArgumentException
367 {
368 try {
369 Channel target = (Channel) object;
370 target.setCopyright( (java.lang.String) value);
371 }
372 catch (Exception ex) {
373 throw new IllegalStateException(ex.toString());
374 }
375 }
376 public Object newInstance( Object parent ) {
377 return null;
378 }
379 } );
380 desc.setHandler(handler);
381 desc.setNameSpaceURI("http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content");
382 desc.setMultivalued(false);
383 addFieldDescriptor(desc);
384
385
386 fieldValidator = new FieldValidator();
387 {
388 StringValidator sv = new StringValidator();
389 sv.setWhiteSpace("preserve");
390 fieldValidator.setValidator(sv);
391 }
392 desc.setValidator(fieldValidator);
393
394
395 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_pubDate", "pubDate", NodeType.Element);
396 desc.setImmutable(true);
397 handler = (new XMLFieldHandler() {
398 public Object getValue( Object object )
399 throws IllegalStateException
400 {
401 Channel target = (Channel) object;
402 return target.getPubDate();
403 }
404 public void setValue( Object object, Object value)
405 throws IllegalStateException, IllegalArgumentException
406 {
407 try {
408 Channel target = (Channel) object;
409 target.setPubDate( (java.lang.String) value);
410 }
411 catch (Exception ex) {
412 throw new IllegalStateException(ex.toString());
413 }
414 }
415 public Object newInstance( Object parent ) {
416 return null;
417 }
418 } );
419 desc.setHandler(handler);
420 desc.setNameSpaceURI("http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content");
421 desc.setMultivalued(false);
422 addFieldDescriptor(desc);
423
424
425 fieldValidator = new FieldValidator();
426 {
427 StringValidator sv = new StringValidator();
428 sv.setWhiteSpace("preserve");
429 fieldValidator.setValidator(sv);
430 }
431 desc.setValidator(fieldValidator);
432
433
434 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_lastBuildDate", "lastBuildDate", NodeType.Element);
435 desc.setImmutable(true);
436 handler = (new XMLFieldHandler() {
437 public Object getValue( Object object )
438 throws IllegalStateException
439 {
440 Channel target = (Channel) object;
441 return target.getLastBuildDate();
442 }
443 public void setValue( Object object, Object value)
444 throws IllegalStateException, IllegalArgumentException
445 {
446 try {
447 Channel target = (Channel) object;
448 target.setLastBuildDate( (java.lang.String) value);
449 }
450 catch (Exception ex) {
451 throw new IllegalStateException(ex.toString());
452 }
453 }
454 public Object newInstance( Object parent ) {
455 return null;
456 }
457 } );
458 desc.setHandler(handler);
459 desc.setNameSpaceURI("http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content");
460 desc.setMultivalued(false);
461 addFieldDescriptor(desc);
462
463
464 fieldValidator = new FieldValidator();
465 {
466 StringValidator sv = new StringValidator();
467 sv.setWhiteSpace("preserve");
468 fieldValidator.setValidator(sv);
469 }
470 desc.setValidator(fieldValidator);
471
472
473 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_docs", "docs", NodeType.Element);
474 desc.setImmutable(true);
475 handler = (new XMLFieldHandler() {
476 public Object getValue( Object object )
477 throws IllegalStateException
478 {
479 Channel target = (Channel) object;
480 return target.getDocs();
481 }
482 public void setValue( Object object, Object value)
483 throws IllegalStateException, IllegalArgumentException
484 {
485 try {
486 Channel target = (Channel) object;
487 target.setDocs( (java.lang.String) value);
488 }
489 catch (Exception ex) {
490 throw new IllegalStateException(ex.toString());
491 }
492 }
493 public Object newInstance( Object parent ) {
494 return null;
495 }
496 } );
497 desc.setHandler(handler);
498 desc.setNameSpaceURI("http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content");
499 desc.setMultivalued(false);
500 addFieldDescriptor(desc);
501
502
503 fieldValidator = new FieldValidator();
504 {
505 StringValidator sv = new StringValidator();
506 sv.setWhiteSpace("preserve");
507 fieldValidator.setValidator(sv);
508 }
509 desc.setValidator(fieldValidator);
510
511
512 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_managingEditor", "managingEditor", NodeType.Element);
513 desc.setImmutable(true);
514 handler = (new XMLFieldHandler() {
515 public Object getValue( Object object )
516 throws IllegalStateException
517 {
518 Channel target = (Channel) object;
519 return target.getManagingEditor();
520 }
521 public void setValue( Object object, Object value)
522 throws IllegalStateException, IllegalArgumentException
523 {
524 try {
525 Channel target = (Channel) object;
526 target.setManagingEditor( (java.lang.String) value);
527 }
528 catch (Exception ex) {
529 throw new IllegalStateException(ex.toString());
530 }
531 }
532 public Object newInstance( Object parent ) {
533 return null;
534 }
535 } );
536 desc.setHandler(handler);
537 desc.setNameSpaceURI("http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content");
538 desc.setMultivalued(false);
539 addFieldDescriptor(desc);
540
541
542 fieldValidator = new FieldValidator();
543 {
544 StringValidator sv = new StringValidator();
545 sv.setWhiteSpace("preserve");
546 fieldValidator.setValidator(sv);
547 }
548 desc.setValidator(fieldValidator);
549
550
551 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_webMaster", "webMaster", NodeType.Element);
552 desc.setImmutable(true);
553 handler = (new XMLFieldHandler() {
554 public Object getValue( Object object )
555 throws IllegalStateException
556 {
557 Channel target = (Channel) object;
558 return target.getWebMaster();
559 }
560 public void setValue( Object object, Object value)
561 throws IllegalStateException, IllegalArgumentException
562 {
563 try {
564 Channel target = (Channel) object;
565 target.setWebMaster( (java.lang.String) value);
566 }
567 catch (Exception ex) {
568 throw new IllegalStateException(ex.toString());
569 }
570 }
571 public Object newInstance( Object parent ) {
572 return null;
573 }
574 } );
575 desc.setHandler(handler);
576 desc.setNameSpaceURI("http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content");
577 desc.setMultivalued(false);
578 addFieldDescriptor(desc);
579
580
581 fieldValidator = new FieldValidator();
582 {
583 StringValidator sv = new StringValidator();
584 sv.setWhiteSpace("preserve");
585 fieldValidator.setValidator(sv);
586 }
587 desc.setValidator(fieldValidator);
588
589
590 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_language", "language", NodeType.Element);
591 desc.setImmutable(true);
592 handler = (new XMLFieldHandler() {
593 public Object getValue( Object object )
594 throws IllegalStateException
595 {
596 Channel target = (Channel) object;
597 return target.getLanguage();
598 }
599 public void setValue( Object object, Object value)
600 throws IllegalStateException, IllegalArgumentException
601 {
602 try {
603 Channel target = (Channel) object;
604 target.setLanguage( (java.lang.String) value);
605 }
606 catch (Exception ex) {
607 throw new IllegalStateException(ex.toString());
608 }
609 }
610 public Object newInstance( Object parent ) {
611 return null;
612 }
613 } );
614 desc.setHandler(handler);
615 desc.setNameSpaceURI("http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content");
616 desc.setMultivalued(false);
617 addFieldDescriptor(desc);
618
619
620 fieldValidator = new FieldValidator();
621 {
622 StringValidator sv = new StringValidator();
623 sv.setWhiteSpace("preserve");
624 fieldValidator.setValidator(sv);
625 }
626 desc.setValidator(fieldValidator);
627
628 }
629
630
631
632
633
634
635 /***
636 **/
637 public org.exolab.castor.mapping.AccessMode getAccessMode()
638 {
639 return null;
640 }
641
642 /***
643 **/
644 public org.exolab.castor.mapping.ClassDescriptor getExtends()
645 {
646 return null;
647 }
648
649 /***
650 **/
651 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
652 {
653 return identity;
654 }
655
656 /***
657 **/
658 public java.lang.Class getJavaClass()
659 {
660 return org.apache.jetspeed.xml.api.jcm.Channel.class;
661 }
662
663 /***
664 **/
665 public java.lang.String getNameSpacePrefix()
666 {
667 return nsPrefix;
668 }
669
670 /***
671 **/
672 public java.lang.String getNameSpaceURI()
673 {
674 return nsURI;
675 }
676
677 /***
678 **/
679 public org.exolab.castor.xml.TypeValidator getValidator()
680 {
681 return this;
682 }
683
684 /***
685 **/
686 public java.lang.String getXMLName()
687 {
688 return xmlName;
689 }
690
691 }