View Javadoc
1   /*
2    * This class was automatically generated with 
3    * <a href="http://www.castor.org">Castor 1.3.1</a>, using an XML
4    * Schema.
5    * $Id$
6    */
7   
8   package org.exolab.castor.builder.binding.xml.descriptors;
9   
10    //---------------------------------/
11   //- Imported classes and packages -/
12  //---------------------------------/
13  
14  import org.exolab.castor.builder.binding.xml.ComponentBindingType;
15  
16  /**
17   * Class ComponentBindingTypeDescriptor.
18   * 
19   * @version $Revision$ $Date$
20   */
21  public class ComponentBindingTypeDescriptor 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       * Field _identity.
50       */
51      private org.exolab.castor.xml.XMLFieldDescriptor _identity;
52  
53  
54        //----------------/
55       //- Constructors -/
56      //----------------/
57  
58      public ComponentBindingTypeDescriptor() {
59          super();
60          _nsURI = "http://www.castor.org/SourceGenerator/Binding";
61          _xmlName = "componentBindingType";
62          _elementDefinition = false;
63  
64          //-- set grouping compositor
65          setCompositorAsSequence();
66          org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
67          org.exolab.castor.mapping.FieldHandler             handler        = null;
68          org.exolab.castor.xml.FieldValidator               fieldValidator = null;
69          //-- initialize attribute descriptors
70  
71          //-- _name
72          desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute);
73          desc.setImmutable(true);
74          handler = new org.exolab.castor.xml.XMLFieldHandler() {
75              public java.lang.Object getValue( java.lang.Object object ) 
76                  throws IllegalStateException
77              {
78                  ComponentBindingType target = (ComponentBindingType) object;
79                  return target.getName();
80              }
81              public void setValue( java.lang.Object object, java.lang.Object value) 
82                  throws IllegalStateException, IllegalArgumentException
83              {
84                  try {
85                      ComponentBindingType target = (ComponentBindingType) object;
86                      target.setName( (java.lang.String) value);
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.setSchemaType("string");
96          desc.setHandler(handler);
97          desc.setRequired(true);
98          desc.setMultivalued(false);
99          addFieldDescriptor(desc);
100 
101         //-- validation code for: _name
102         fieldValidator = new org.exolab.castor.xml.FieldValidator();
103         fieldValidator.setMinOccurs(1);
104         { //-- local scope
105             org.exolab.castor.xml.validators.StringValidator typeValidator;
106             typeValidator = new org.exolab.castor.xml.validators.StringValidator();
107             fieldValidator.setValidator(typeValidator);
108             typeValidator.setWhiteSpace("preserve");
109         }
110         desc.setValidator(fieldValidator);
111         //-- initialize element descriptors
112 
113         //-- _componentBindingTypeChoice
114         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice.class, "_componentBindingTypeChoice", "-error-if-this-is-used-", org.exolab.castor.xml.NodeType.Element);
115         handler = new org.exolab.castor.xml.XMLFieldHandler() {
116             public java.lang.Object getValue( java.lang.Object object ) 
117                 throws IllegalStateException
118             {
119                 ComponentBindingType target = (ComponentBindingType) object;
120                 return target.getComponentBindingTypeChoice();
121             }
122             public void setValue( java.lang.Object object, java.lang.Object value) 
123                 throws IllegalStateException, IllegalArgumentException
124             {
125                 try {
126                     ComponentBindingType target = (ComponentBindingType) object;
127                     target.setComponentBindingTypeChoice( (org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice) value);
128                 } catch (java.lang.Exception ex) {
129                     throw new IllegalStateException(ex.toString());
130                 }
131             }
132             public java.lang.Object newInstance(java.lang.Object parent) {
133                 return new org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice();
134             }
135         };
136         desc.setSchemaType("org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice");
137         desc.setHandler(handler);
138         desc.setContainer(true);
139         desc.setClassDescriptor(new org.exolab.castor.builder.binding.xml.descriptors.ComponentBindingTypeChoiceDescriptor());
140         desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding");
141         desc.setRequired(true);
142         desc.setMultivalued(false);
143         addFieldDescriptor(desc);
144         addSequenceElement(desc);
145 
146         //-- validation code for: _componentBindingTypeChoice
147         fieldValidator = new org.exolab.castor.xml.FieldValidator();
148         fieldValidator.setMinOccurs(1);
149         { //-- local scope
150         }
151         desc.setValidator(fieldValidator);
152         //-- _componentBindingList
153         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_componentBindingList", "componentBinding", org.exolab.castor.xml.NodeType.Element);
154         handler = new org.exolab.castor.xml.XMLFieldHandler() {
155             public java.lang.Object getValue( java.lang.Object object ) 
156                 throws IllegalStateException
157             {
158                 ComponentBindingType target = (ComponentBindingType) object;
159                 return target.getComponentBinding();
160             }
161             public void setValue( java.lang.Object object, java.lang.Object value) 
162                 throws IllegalStateException, IllegalArgumentException
163             {
164                 try {
165                     ComponentBindingType target = (ComponentBindingType) object;
166                     target.addComponentBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value);
167                 } catch (java.lang.Exception ex) {
168                     throw new IllegalStateException(ex.toString());
169                 }
170             }
171             public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
172                 try {
173                     ComponentBindingType target = (ComponentBindingType) object;
174                     target.removeAllComponentBinding();
175                 } catch (java.lang.Exception ex) {
176                     throw new IllegalStateException(ex.toString());
177                 }
178             }
179             public java.lang.Object newInstance(java.lang.Object parent) {
180                 return new org.exolab.castor.builder.binding.xml.ComponentBindingType();
181             }
182         };
183         desc.setSchemaType("list");
184         desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType");
185         desc.setHandler(handler);
186         desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding");
187         desc.setMultivalued(true);
188         addFieldDescriptor(desc);
189         addSequenceElement(desc);
190 
191         //-- validation code for: _componentBindingList
192         fieldValidator = new org.exolab.castor.xml.FieldValidator();
193         fieldValidator.setMinOccurs(0);
194         { //-- local scope
195         }
196         desc.setValidator(fieldValidator);
197         //-- _elementBindingList
198         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_elementBindingList", "elementBinding", org.exolab.castor.xml.NodeType.Element);
199         handler = new org.exolab.castor.xml.XMLFieldHandler() {
200             public java.lang.Object getValue( java.lang.Object object ) 
201                 throws IllegalStateException
202             {
203                 ComponentBindingType target = (ComponentBindingType) object;
204                 return target.getElementBinding();
205             }
206             public void setValue( java.lang.Object object, java.lang.Object value) 
207                 throws IllegalStateException, IllegalArgumentException
208             {
209                 try {
210                     ComponentBindingType target = (ComponentBindingType) object;
211                     target.addElementBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value);
212                 } catch (java.lang.Exception ex) {
213                     throw new IllegalStateException(ex.toString());
214                 }
215             }
216             public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
217                 try {
218                     ComponentBindingType target = (ComponentBindingType) object;
219                     target.removeAllElementBinding();
220                 } catch (java.lang.Exception ex) {
221                     throw new IllegalStateException(ex.toString());
222                 }
223             }
224             public java.lang.Object newInstance(java.lang.Object parent) {
225                 return new org.exolab.castor.builder.binding.xml.ComponentBindingType();
226             }
227         };
228         desc.setSchemaType("list");
229         desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType");
230         desc.setHandler(handler);
231         desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding");
232         desc.setMultivalued(true);
233         addFieldDescriptor(desc);
234         addSequenceElement(desc);
235 
236         //-- validation code for: _elementBindingList
237         fieldValidator = new org.exolab.castor.xml.FieldValidator();
238         fieldValidator.setMinOccurs(0);
239         { //-- local scope
240         }
241         desc.setValidator(fieldValidator);
242         //-- _attributeBindingList
243         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_attributeBindingList", "attributeBinding", org.exolab.castor.xml.NodeType.Element);
244         handler = new org.exolab.castor.xml.XMLFieldHandler() {
245             public java.lang.Object getValue( java.lang.Object object ) 
246                 throws IllegalStateException
247             {
248                 ComponentBindingType target = (ComponentBindingType) object;
249                 return target.getAttributeBinding();
250             }
251             public void setValue( java.lang.Object object, java.lang.Object value) 
252                 throws IllegalStateException, IllegalArgumentException
253             {
254                 try {
255                     ComponentBindingType target = (ComponentBindingType) object;
256                     target.addAttributeBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value);
257                 } catch (java.lang.Exception ex) {
258                     throw new IllegalStateException(ex.toString());
259                 }
260             }
261             public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
262                 try {
263                     ComponentBindingType target = (ComponentBindingType) object;
264                     target.removeAllAttributeBinding();
265                 } catch (java.lang.Exception ex) {
266                     throw new IllegalStateException(ex.toString());
267                 }
268             }
269             public java.lang.Object newInstance(java.lang.Object parent) {
270                 return new org.exolab.castor.builder.binding.xml.ComponentBindingType();
271             }
272         };
273         desc.setSchemaType("list");
274         desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType");
275         desc.setHandler(handler);
276         desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding");
277         desc.setMultivalued(true);
278         addFieldDescriptor(desc);
279         addSequenceElement(desc);
280 
281         //-- validation code for: _attributeBindingList
282         fieldValidator = new org.exolab.castor.xml.FieldValidator();
283         fieldValidator.setMinOccurs(0);
284         { //-- local scope
285         }
286         desc.setValidator(fieldValidator);
287         //-- _complexTypeBindingList
288         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_complexTypeBindingList", "complexTypeBinding", org.exolab.castor.xml.NodeType.Element);
289         handler = new org.exolab.castor.xml.XMLFieldHandler() {
290             public java.lang.Object getValue( java.lang.Object object ) 
291                 throws IllegalStateException
292             {
293                 ComponentBindingType target = (ComponentBindingType) object;
294                 return target.getComplexTypeBinding();
295             }
296             public void setValue( java.lang.Object object, java.lang.Object value) 
297                 throws IllegalStateException, IllegalArgumentException
298             {
299                 try {
300                     ComponentBindingType target = (ComponentBindingType) object;
301                     target.addComplexTypeBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value);
302                 } catch (java.lang.Exception ex) {
303                     throw new IllegalStateException(ex.toString());
304                 }
305             }
306             public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
307                 try {
308                     ComponentBindingType target = (ComponentBindingType) object;
309                     target.removeAllComplexTypeBinding();
310                 } catch (java.lang.Exception ex) {
311                     throw new IllegalStateException(ex.toString());
312                 }
313             }
314             public java.lang.Object newInstance(java.lang.Object parent) {
315                 return new org.exolab.castor.builder.binding.xml.ComponentBindingType();
316             }
317         };
318         desc.setSchemaType("list");
319         desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType");
320         desc.setHandler(handler);
321         desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding");
322         desc.setMultivalued(true);
323         addFieldDescriptor(desc);
324         addSequenceElement(desc);
325 
326         //-- validation code for: _complexTypeBindingList
327         fieldValidator = new org.exolab.castor.xml.FieldValidator();
328         fieldValidator.setMinOccurs(0);
329         { //-- local scope
330         }
331         desc.setValidator(fieldValidator);
332         //-- _groupBindingList
333         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_groupBindingList", "groupBinding", org.exolab.castor.xml.NodeType.Element);
334         handler = new org.exolab.castor.xml.XMLFieldHandler() {
335             public java.lang.Object getValue( java.lang.Object object ) 
336                 throws IllegalStateException
337             {
338                 ComponentBindingType target = (ComponentBindingType) object;
339                 return target.getGroupBinding();
340             }
341             public void setValue( java.lang.Object object, java.lang.Object value) 
342                 throws IllegalStateException, IllegalArgumentException
343             {
344                 try {
345                     ComponentBindingType target = (ComponentBindingType) object;
346                     target.addGroupBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value);
347                 } catch (java.lang.Exception ex) {
348                     throw new IllegalStateException(ex.toString());
349                 }
350             }
351             public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
352                 try {
353                     ComponentBindingType target = (ComponentBindingType) object;
354                     target.removeAllGroupBinding();
355                 } catch (java.lang.Exception ex) {
356                     throw new IllegalStateException(ex.toString());
357                 }
358             }
359             public java.lang.Object newInstance(java.lang.Object parent) {
360                 return new org.exolab.castor.builder.binding.xml.ComponentBindingType();
361             }
362         };
363         desc.setSchemaType("list");
364         desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType");
365         desc.setHandler(handler);
366         desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding");
367         desc.setMultivalued(true);
368         addFieldDescriptor(desc);
369         addSequenceElement(desc);
370 
371         //-- validation code for: _groupBindingList
372         fieldValidator = new org.exolab.castor.xml.FieldValidator();
373         fieldValidator.setMinOccurs(0);
374         { //-- local scope
375         }
376         desc.setValidator(fieldValidator);
377         //-- _enumBindingList
378         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_enumBindingList", "enumBinding", org.exolab.castor.xml.NodeType.Element);
379         handler = new org.exolab.castor.xml.XMLFieldHandler() {
380             public java.lang.Object getValue( java.lang.Object object ) 
381                 throws IllegalStateException
382             {
383                 ComponentBindingType target = (ComponentBindingType) object;
384                 return target.getEnumBinding();
385             }
386             public void setValue( java.lang.Object object, java.lang.Object value) 
387                 throws IllegalStateException, IllegalArgumentException
388             {
389                 try {
390                     ComponentBindingType target = (ComponentBindingType) object;
391                     target.addEnumBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value);
392                 } catch (java.lang.Exception ex) {
393                     throw new IllegalStateException(ex.toString());
394                 }
395             }
396             public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
397                 try {
398                     ComponentBindingType target = (ComponentBindingType) object;
399                     target.removeAllEnumBinding();
400                 } catch (java.lang.Exception ex) {
401                     throw new IllegalStateException(ex.toString());
402                 }
403             }
404             public java.lang.Object newInstance(java.lang.Object parent) {
405                 return new org.exolab.castor.builder.binding.xml.ComponentBindingType();
406             }
407         };
408         desc.setSchemaType("list");
409         desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType");
410         desc.setHandler(handler);
411         desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding");
412         desc.setMultivalued(true);
413         addFieldDescriptor(desc);
414         addSequenceElement(desc);
415 
416         //-- validation code for: _enumBindingList
417         fieldValidator = new org.exolab.castor.xml.FieldValidator();
418         fieldValidator.setMinOccurs(0);
419         { //-- local scope
420         }
421         desc.setValidator(fieldValidator);
422         //-- _simpleTypeBindingList
423         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_simpleTypeBindingList", "simpleTypeBinding", org.exolab.castor.xml.NodeType.Element);
424         handler = new org.exolab.castor.xml.XMLFieldHandler() {
425             public java.lang.Object getValue( java.lang.Object object ) 
426                 throws IllegalStateException
427             {
428                 ComponentBindingType target = (ComponentBindingType) object;
429                 return target.getSimpleTypeBinding();
430             }
431             public void setValue( java.lang.Object object, java.lang.Object value) 
432                 throws IllegalStateException, IllegalArgumentException
433             {
434                 try {
435                     ComponentBindingType target = (ComponentBindingType) object;
436                     target.addSimpleTypeBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value);
437                 } catch (java.lang.Exception ex) {
438                     throw new IllegalStateException(ex.toString());
439                 }
440             }
441             public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
442                 try {
443                     ComponentBindingType target = (ComponentBindingType) object;
444                     target.removeAllSimpleTypeBinding();
445                 } catch (java.lang.Exception ex) {
446                     throw new IllegalStateException(ex.toString());
447                 }
448             }
449             public java.lang.Object newInstance(java.lang.Object parent) {
450                 return new org.exolab.castor.builder.binding.xml.ComponentBindingType();
451             }
452         };
453         desc.setSchemaType("list");
454         desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType");
455         desc.setHandler(handler);
456         desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding");
457         desc.setMultivalued(true);
458         addFieldDescriptor(desc);
459         addSequenceElement(desc);
460 
461         //-- validation code for: _simpleTypeBindingList
462         fieldValidator = new org.exolab.castor.xml.FieldValidator();
463         fieldValidator.setMinOccurs(0);
464         { //-- local scope
465         }
466         desc.setValidator(fieldValidator);
467     }
468 
469 
470       //-----------/
471      //- Methods -/
472     //-----------/
473 
474     /**
475      * Method getAccessMode.
476      * 
477      * @return the access mode specified for this class.
478      */
479     public org.exolab.castor.mapping.AccessMode getAccessMode(
480     ) {
481         return null;
482     }
483 
484     /**
485      * Method getIdentity.
486      * 
487      * @return the identity field, null if this class has no
488      * identity.
489      */
490     public org.exolab.castor.mapping.FieldDescriptor getIdentity(
491     ) {
492         return _identity;
493     }
494 
495     /**
496      * Method getJavaClass.
497      * 
498      * @return the Java class represented by this descriptor.
499      */
500     public java.lang.Class getJavaClass(
501     ) {
502         return org.exolab.castor.builder.binding.xml.ComponentBindingType.class;
503     }
504 
505     /**
506      * Method getNameSpacePrefix.
507      * 
508      * @return the namespace prefix to use when marshaling as XML.
509      */
510     public java.lang.String getNameSpacePrefix(
511     ) {
512         return _nsPrefix;
513     }
514 
515     /**
516      * Method getNameSpaceURI.
517      * 
518      * @return the namespace URI used when marshaling and
519      * unmarshaling as XML.
520      */
521     public java.lang.String getNameSpaceURI(
522     ) {
523         return _nsURI;
524     }
525 
526     /**
527      * Method getValidator.
528      * 
529      * @return a specific validator for the class described by this
530      * ClassDescriptor.
531      */
532     public org.exolab.castor.xml.TypeValidator getValidator(
533     ) {
534         return this;
535     }
536 
537     /**
538      * Method getXMLName.
539      * 
540      * @return the XML Name for the Class being described.
541      */
542     public java.lang.String getXMLName(
543     ) {
544         return _xmlName;
545     }
546 
547     /**
548      * Method isElementDefinition.
549      * 
550      * @return true if XML schema definition of this Class is that
551      * of a global
552      * element or element with anonymous type definition.
553      */
554     public boolean isElementDefinition(
555     ) {
556         return _elementDefinition;
557     }
558 
559 }