View Javadoc

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