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.NamingXMLType;
15  
16  /**
17   * Class NamingXMLTypeDescriptor.
18   * 
19   * @version $Revision$ $Date$
20   */
21  public class NamingXMLTypeDescriptor 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 NamingXMLTypeDescriptor() {
59          super();
60          _nsURI = "http://www.castor.org/SourceGenerator/Binding";
61          _xmlName = "namingXMLType";
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          //-- initialize element descriptors
72  
73          //-- _elementName
74          desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.NamingType.class, "_elementName", "elementName", org.exolab.castor.xml.NodeType.Element);
75          handler = new org.exolab.castor.xml.XMLFieldHandler() {
76              public java.lang.Object getValue( java.lang.Object object ) 
77                  throws IllegalStateException
78              {
79                  NamingXMLType target = (NamingXMLType) object;
80                  return target.getElementName();
81              }
82              public void setValue( java.lang.Object object, java.lang.Object value) 
83                  throws IllegalStateException, IllegalArgumentException
84              {
85                  try {
86                      NamingXMLType target = (NamingXMLType) object;
87                      target.setElementName( (org.exolab.castor.builder.binding.xml.NamingType) value);
88                  } catch (java.lang.Exception ex) {
89                      throw new IllegalStateException(ex.toString());
90                  }
91              }
92              public java.lang.Object newInstance(java.lang.Object parent) {
93                  return new org.exolab.castor.builder.binding.xml.NamingType();
94              }
95          };
96          desc.setSchemaType("org.exolab.castor.builder.binding.xml.NamingType");
97          desc.setHandler(handler);
98          desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding");
99          desc.setMultivalued(false);
100         addFieldDescriptor(desc);
101         addSequenceElement(desc);
102 
103         //-- validation code for: _elementName
104         fieldValidator = new org.exolab.castor.xml.FieldValidator();
105         { //-- local scope
106         }
107         desc.setValidator(fieldValidator);
108         //-- _complexTypeName
109         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.NamingType.class, "_complexTypeName", "complexTypeName", org.exolab.castor.xml.NodeType.Element);
110         handler = new org.exolab.castor.xml.XMLFieldHandler() {
111             public java.lang.Object getValue( java.lang.Object object ) 
112                 throws IllegalStateException
113             {
114                 NamingXMLType target = (NamingXMLType) object;
115                 return target.getComplexTypeName();
116             }
117             public void setValue( java.lang.Object object, java.lang.Object value) 
118                 throws IllegalStateException, IllegalArgumentException
119             {
120                 try {
121                     NamingXMLType target = (NamingXMLType) object;
122                     target.setComplexTypeName( (org.exolab.castor.builder.binding.xml.NamingType) value);
123                 } catch (java.lang.Exception ex) {
124                     throw new IllegalStateException(ex.toString());
125                 }
126             }
127             public java.lang.Object newInstance(java.lang.Object parent) {
128                 return new org.exolab.castor.builder.binding.xml.NamingType();
129             }
130         };
131         desc.setSchemaType("org.exolab.castor.builder.binding.xml.NamingType");
132         desc.setHandler(handler);
133         desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding");
134         desc.setMultivalued(false);
135         addFieldDescriptor(desc);
136         addSequenceElement(desc);
137 
138         //-- validation code for: _complexTypeName
139         fieldValidator = new org.exolab.castor.xml.FieldValidator();
140         { //-- local scope
141         }
142         desc.setValidator(fieldValidator);
143         //-- _modelGroupName
144         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.NamingType.class, "_modelGroupName", "modelGroupName", org.exolab.castor.xml.NodeType.Element);
145         handler = new org.exolab.castor.xml.XMLFieldHandler() {
146             public java.lang.Object getValue( java.lang.Object object ) 
147                 throws IllegalStateException
148             {
149                 NamingXMLType target = (NamingXMLType) object;
150                 return target.getModelGroupName();
151             }
152             public void setValue( java.lang.Object object, java.lang.Object value) 
153                 throws IllegalStateException, IllegalArgumentException
154             {
155                 try {
156                     NamingXMLType target = (NamingXMLType) object;
157                     target.setModelGroupName( (org.exolab.castor.builder.binding.xml.NamingType) value);
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 new org.exolab.castor.builder.binding.xml.NamingType();
164             }
165         };
166         desc.setSchemaType("org.exolab.castor.builder.binding.xml.NamingType");
167         desc.setHandler(handler);
168         desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding");
169         desc.setMultivalued(false);
170         addFieldDescriptor(desc);
171         addSequenceElement(desc);
172 
173         //-- validation code for: _modelGroupName
174         fieldValidator = new org.exolab.castor.xml.FieldValidator();
175         { //-- local scope
176         }
177         desc.setValidator(fieldValidator);
178     }
179 
180 
181       //-----------/
182      //- Methods -/
183     //-----------/
184 
185     /**
186      * Method getAccessMode.
187      * 
188      * @return the access mode specified for this class.
189      */
190     public org.exolab.castor.mapping.AccessMode getAccessMode(
191     ) {
192         return null;
193     }
194 
195     /**
196      * Method getIdentity.
197      * 
198      * @return the identity field, null if this class has no
199      * identity.
200      */
201     public org.exolab.castor.mapping.FieldDescriptor getIdentity(
202     ) {
203         return _identity;
204     }
205 
206     /**
207      * Method getJavaClass.
208      * 
209      * @return the Java class represented by this descriptor.
210      */
211     public java.lang.Class getJavaClass(
212     ) {
213         return org.exolab.castor.builder.binding.xml.NamingXMLType.class;
214     }
215 
216     /**
217      * Method getNameSpacePrefix.
218      * 
219      * @return the namespace prefix to use when marshaling as XML.
220      */
221     public java.lang.String getNameSpacePrefix(
222     ) {
223         return _nsPrefix;
224     }
225 
226     /**
227      * Method getNameSpaceURI.
228      * 
229      * @return the namespace URI used when marshaling and
230      * unmarshaling as XML.
231      */
232     public java.lang.String getNameSpaceURI(
233     ) {
234         return _nsURI;
235     }
236 
237     /**
238      * Method getValidator.
239      * 
240      * @return a specific validator for the class described by this
241      * ClassDescriptor.
242      */
243     public org.exolab.castor.xml.TypeValidator getValidator(
244     ) {
245         return this;
246     }
247 
248     /**
249      * Method getXMLName.
250      * 
251      * @return the XML Name for the Class being described.
252      */
253     public java.lang.String getXMLName(
254     ) {
255         return _xmlName;
256     }
257 
258     /**
259      * Method isElementDefinition.
260      * 
261      * @return true if XML schema definition of this Class is that
262      * of a global
263      * element or element with anonymous type definition.
264      */
265     public boolean isElementDefinition(
266     ) {
267         return _elementDefinition;
268     }
269 
270 }