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.IncludeType;
15  
16  /**
17   * Class IncludeTypeDescriptor.
18   * 
19   * @version $Revision$ $Date$
20   */
21  public class IncludeTypeDescriptor 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 IncludeTypeDescriptor() {
59          super();
60          _nsURI = "http://www.castor.org/SourceGenerator/Binding";
61          _xmlName = "includeType";
62          _elementDefinition = false;
63          org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
64          org.exolab.castor.mapping.FieldHandler             handler        = null;
65          org.exolab.castor.xml.FieldValidator               fieldValidator = null;
66          //-- initialize attribute descriptors
67  
68          //-- _URI
69          desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_URI", "URI", org.exolab.castor.xml.NodeType.Attribute);
70          handler = new org.exolab.castor.xml.XMLFieldHandler() {
71              public java.lang.Object getValue( java.lang.Object object ) 
72                  throws IllegalStateException
73              {
74                  IncludeType target = (IncludeType) object;
75                  return target.getURI();
76              }
77              public void setValue( java.lang.Object object, java.lang.Object value) 
78                  throws IllegalStateException, IllegalArgumentException
79              {
80                  try {
81                      IncludeType target = (IncludeType) object;
82                      target.setURI( (java.lang.String) value);
83                  } catch (java.lang.Exception ex) {
84                      throw new IllegalStateException(ex.toString());
85                  }
86              }
87              public java.lang.Object newInstance(java.lang.Object parent) {
88                  return new java.lang.String();
89              }
90          };
91          desc.setSchemaType("anyURI");
92          desc.setHandler(handler);
93          desc.setRequired(true);
94          desc.setMultivalued(false);
95          addFieldDescriptor(desc);
96  
97          //-- validation code for: _URI
98          fieldValidator = new org.exolab.castor.xml.FieldValidator();
99          fieldValidator.setMinOccurs(1);
100         { //-- local scope
101         }
102         desc.setValidator(fieldValidator);
103         //-- initialize element descriptors
104 
105     }
106 
107 
108       //-----------/
109      //- Methods -/
110     //-----------/
111 
112     /**
113      * Method getAccessMode.
114      * 
115      * @return the access mode specified for this class.
116      */
117     public org.exolab.castor.mapping.AccessMode getAccessMode(
118     ) {
119         return null;
120     }
121 
122     /**
123      * Method getIdentity.
124      * 
125      * @return the identity field, null if this class has no
126      * identity.
127      */
128     public org.exolab.castor.mapping.FieldDescriptor getIdentity(
129     ) {
130         return _identity;
131     }
132 
133     /**
134      * Method getJavaClass.
135      * 
136      * @return the Java class represented by this descriptor.
137      */
138     public java.lang.Class getJavaClass(
139     ) {
140         return org.exolab.castor.builder.binding.xml.IncludeType.class;
141     }
142 
143     /**
144      * Method getNameSpacePrefix.
145      * 
146      * @return the namespace prefix to use when marshaling as XML.
147      */
148     public java.lang.String getNameSpacePrefix(
149     ) {
150         return _nsPrefix;
151     }
152 
153     /**
154      * Method getNameSpaceURI.
155      * 
156      * @return the namespace URI used when marshaling and
157      * unmarshaling as XML.
158      */
159     public java.lang.String getNameSpaceURI(
160     ) {
161         return _nsURI;
162     }
163 
164     /**
165      * Method getValidator.
166      * 
167      * @return a specific validator for the class described by this
168      * ClassDescriptor.
169      */
170     public org.exolab.castor.xml.TypeValidator getValidator(
171     ) {
172         return this;
173     }
174 
175     /**
176      * Method getXMLName.
177      * 
178      * @return the XML Name for the Class being described.
179      */
180     public java.lang.String getXMLName(
181     ) {
182         return _xmlName;
183     }
184 
185     /**
186      * Method isElementDefinition.
187      * 
188      * @return true if XML schema definition of this Class is that
189      * of a global
190      * element or element with anonymous type definition.
191      */
192     public boolean isElementDefinition(
193     ) {
194         return _elementDefinition;
195     }
196 
197 }