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 ContextDescriptor.
21   * 
22   * @version $Revision$ $Date$
23   */
24  public class ContextDescriptor extends fr.in2p3.jsaga.generated.session.ConfigurableTypeDescriptor {
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 ContextDescriptor() 
57       {
58          super();
59          setExtendsWithoutFlatten(new fr.in2p3.jsaga.generated.session.ConfigurableTypeDescriptor());
60          nsURI = "http://www.in2p3.fr/jsaga/session";
61          xmlName = "context";
62          
63          //-- set grouping compositor
64          setCompositorAsSequence();
65          org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
66          org.exolab.castor.mapping.FieldHandler             handler        = null;
67          org.exolab.castor.xml.FieldValidator               fieldValidator = null;
68          //-- initialize attribute descriptors
69          
70          //-- _id
71          desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);
72          desc.setImmutable(true);
73          handler = new org.exolab.castor.xml.XMLFieldHandler() {
74              public java.lang.Object getValue( java.lang.Object object ) 
75                  throws IllegalStateException
76              {
77                  Context target = (Context) object;
78                  return target.getId();
79              }
80              public void setValue( java.lang.Object object, java.lang.Object value) 
81                  throws IllegalStateException, IllegalArgumentException
82              {
83                  try {
84                      Context target = (Context) object;
85                      target.setId( (java.lang.String) value);
86                  }
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.setHandler(handler);
96          desc.setMultivalued(false);
97          addFieldDescriptor(desc);
98          
99          //-- validation code for: _id
100         fieldValidator = new org.exolab.castor.xml.FieldValidator();
101         { //-- local scope
102             StringValidator typeValidator = new StringValidator();
103             typeValidator.setWhiteSpace("preserve");
104             fieldValidator.setValidator(typeValidator);
105         }
106         desc.setValidator(fieldValidator);
107         //-- initialize element descriptors
108         
109         //-- _dataList
110         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(fr.in2p3.jsaga.generated.session.Data.class, "_dataList", "data", org.exolab.castor.xml.NodeType.Element);
111         handler = new org.exolab.castor.xml.XMLFieldHandler() {
112             public java.lang.Object getValue( java.lang.Object object ) 
113                 throws IllegalStateException
114             {
115                 Context target = (Context) object;
116                 return target.getData();
117             }
118             public void setValue( java.lang.Object object, java.lang.Object value) 
119                 throws IllegalStateException, IllegalArgumentException
120             {
121                 try {
122                     Context target = (Context) object;
123                     target.addData( (fr.in2p3.jsaga.generated.session.Data) value);
124                 }
125                 catch (java.lang.Exception ex) {
126                     throw new IllegalStateException(ex.toString());
127                 }
128             }
129             public java.lang.Object newInstance( java.lang.Object parent ) {
130                 return new fr.in2p3.jsaga.generated.session.Data();
131             }
132         };
133         desc.setHandler(handler);
134         desc.setNameSpaceURI("http://www.in2p3.fr/jsaga/session");
135         desc.setMultivalued(true);
136         addFieldDescriptor(desc);
137         
138         //-- validation code for: _dataList
139         fieldValidator = new org.exolab.castor.xml.FieldValidator();
140         fieldValidator.setMinOccurs(0);
141         { //-- local scope
142         }
143         desc.setValidator(fieldValidator);
144         //-- _jobList
145         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(fr.in2p3.jsaga.generated.session.Job.class, "_jobList", "job", org.exolab.castor.xml.NodeType.Element);
146         handler = new org.exolab.castor.xml.XMLFieldHandler() {
147             public java.lang.Object getValue( java.lang.Object object ) 
148                 throws IllegalStateException
149             {
150                 Context target = (Context) object;
151                 return target.getJob();
152             }
153             public void setValue( java.lang.Object object, java.lang.Object value) 
154                 throws IllegalStateException, IllegalArgumentException
155             {
156                 try {
157                     Context target = (Context) object;
158                     target.addJob( (fr.in2p3.jsaga.generated.session.Job) value);
159                 }
160                 catch (java.lang.Exception ex) {
161                     throw new IllegalStateException(ex.toString());
162                 }
163             }
164             public java.lang.Object newInstance( java.lang.Object parent ) {
165                 return new fr.in2p3.jsaga.generated.session.Job();
166             }
167         };
168         desc.setHandler(handler);
169         desc.setNameSpaceURI("http://www.in2p3.fr/jsaga/session");
170         desc.setMultivalued(true);
171         addFieldDescriptor(desc);
172         
173         //-- validation code for: _jobList
174         fieldValidator = new org.exolab.castor.xml.FieldValidator();
175         fieldValidator.setMinOccurs(0);
176         { //-- local scope
177         }
178         desc.setValidator(fieldValidator);
179         //-- _includeList
180         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(fr.in2p3.jsaga.generated.session.Include.class, "_includeList", "include", org.exolab.castor.xml.NodeType.Element);
181         handler = new org.exolab.castor.xml.XMLFieldHandler() {
182             public java.lang.Object getValue( java.lang.Object object ) 
183                 throws IllegalStateException
184             {
185                 Context target = (Context) object;
186                 return target.getInclude();
187             }
188             public void setValue( java.lang.Object object, java.lang.Object value) 
189                 throws IllegalStateException, IllegalArgumentException
190             {
191                 try {
192                     Context target = (Context) object;
193                     target.addInclude( (fr.in2p3.jsaga.generated.session.Include) value);
194                 }
195                 catch (java.lang.Exception ex) {
196                     throw new IllegalStateException(ex.toString());
197                 }
198             }
199             public java.lang.Object newInstance( java.lang.Object parent ) {
200                 return new fr.in2p3.jsaga.generated.session.Include();
201             }
202         };
203         desc.setHandler(handler);
204         desc.setNameSpaceURI("http://www.in2p3.fr/jsaga/session");
205         desc.setMultivalued(true);
206         addFieldDescriptor(desc);
207         
208         //-- validation code for: _includeList
209         fieldValidator = new org.exolab.castor.xml.FieldValidator();
210         fieldValidator.setMinOccurs(0);
211         { //-- local scope
212         }
213         desc.setValidator(fieldValidator);
214         //-- _excludeList
215         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(fr.in2p3.jsaga.generated.session.Exclude.class, "_excludeList", "exclude", org.exolab.castor.xml.NodeType.Element);
216         handler = new org.exolab.castor.xml.XMLFieldHandler() {
217             public java.lang.Object getValue( java.lang.Object object ) 
218                 throws IllegalStateException
219             {
220                 Context target = (Context) object;
221                 return target.getExclude();
222             }
223             public void setValue( java.lang.Object object, java.lang.Object value) 
224                 throws IllegalStateException, IllegalArgumentException
225             {
226                 try {
227                     Context target = (Context) object;
228                     target.addExclude( (fr.in2p3.jsaga.generated.session.Exclude) value);
229                 }
230                 catch (java.lang.Exception ex) {
231                     throw new IllegalStateException(ex.toString());
232                 }
233             }
234             public java.lang.Object newInstance( java.lang.Object parent ) {
235                 return new fr.in2p3.jsaga.generated.session.Exclude();
236             }
237         };
238         desc.setHandler(handler);
239         desc.setNameSpaceURI("http://www.in2p3.fr/jsaga/session");
240         desc.setMultivalued(true);
241         addFieldDescriptor(desc);
242         
243         //-- validation code for: _excludeList
244         fieldValidator = new org.exolab.castor.xml.FieldValidator();
245         fieldValidator.setMinOccurs(0);
246         { //-- local scope
247         }
248         desc.setValidator(fieldValidator);
249     } //-- fr.in2p3.jsaga.generated.session.ContextDescriptor()
250 
251 
252       //-----------/
253      //- Methods -/
254     //-----------/
255 
256     /**
257      * Method getAccessMode
258      * 
259      * 
260      * 
261      * @return AccessMode
262      */
263     public org.exolab.castor.mapping.AccessMode getAccessMode()
264     {
265         return null;
266     } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 
267 
268     /**
269      * Method getExtends
270      * 
271      * 
272      * 
273      * @return ClassDescriptor
274      */
275     public org.exolab.castor.mapping.ClassDescriptor getExtends()
276     {
277         return super.getExtends();
278     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 
279 
280     /**
281      * Method getIdentity
282      * 
283      * 
284      * 
285      * @return FieldDescriptor
286      */
287     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
288     {
289         if (identity == null)
290             return super.getIdentity();
291         return identity;
292     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 
293 
294     /**
295      * Method getJavaClass
296      * 
297      * 
298      * 
299      * @return Class
300      */
301     public java.lang.Class getJavaClass()
302     {
303         return fr.in2p3.jsaga.generated.session.Context.class;
304     } //-- java.lang.Class getJavaClass() 
305 
306     /**
307      * Method getNameSpacePrefix
308      * 
309      * 
310      * 
311      * @return String
312      */
313     public java.lang.String getNameSpacePrefix()
314     {
315         return nsPrefix;
316     } //-- java.lang.String getNameSpacePrefix() 
317 
318     /**
319      * Method getNameSpaceURI
320      * 
321      * 
322      * 
323      * @return String
324      */
325     public java.lang.String getNameSpaceURI()
326     {
327         return nsURI;
328     } //-- java.lang.String getNameSpaceURI() 
329 
330     /**
331      * Method getValidator
332      * 
333      * 
334      * 
335      * @return TypeValidator
336      */
337     public org.exolab.castor.xml.TypeValidator getValidator()
338     {
339         return this;
340     } //-- org.exolab.castor.xml.TypeValidator getValidator() 
341 
342     /**
343      * Method getXMLName
344      * 
345      * 
346      * 
347      * @return String
348      */
349     public java.lang.String getXMLName()
350     {
351         return xmlName;
352     } //-- java.lang.String getXMLName() 
353 
354 }