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 ServiceTypeDescriptor.
21   * 
22   * @version $Revision$ $Date$
23   */
24  public class ServiceTypeDescriptor 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 ServiceTypeDescriptor() 
57       {
58          super();
59          setExtendsWithoutFlatten(new fr.in2p3.jsaga.generated.session.ConfigurableTypeDescriptor());
60          nsURI = "http://www.in2p3.fr/jsaga/session";
61          xmlName = "ServiceType";
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          //-- initialize element descriptors
71          
72          //-- _aliasList
73          desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_aliasList", "alias", org.exolab.castor.xml.NodeType.Element);
74          desc.setImmutable(true);
75          handler = new org.exolab.castor.xml.XMLFieldHandler() {
76              public java.lang.Object getValue( java.lang.Object object ) 
77                  throws IllegalStateException
78              {
79                  ServiceType target = (ServiceType) object;
80                  return target.getAlias();
81              }
82              public void setValue( java.lang.Object object, java.lang.Object value) 
83                  throws IllegalStateException, IllegalArgumentException
84              {
85                  try {
86                      ServiceType target = (ServiceType) object;
87                      target.addAlias( (java.lang.String) value);
88                  }
89                  catch (java.lang.Exception ex) {
90                      throw new IllegalStateException(ex.toString());
91                  }
92              }
93              public java.lang.Object newInstance( java.lang.Object parent ) {
94                  return null;
95              }
96          };
97          desc.setHandler(handler);
98          desc.setNameSpaceURI("http://www.in2p3.fr/jsaga/session");
99          desc.setMultivalued(true);
100         addFieldDescriptor(desc);
101         
102         //-- validation code for: _aliasList
103         fieldValidator = new org.exolab.castor.xml.FieldValidator();
104         fieldValidator.setMinOccurs(0);
105         { //-- local scope
106             StringValidator typeValidator = new StringValidator();
107             typeValidator.setWhiteSpace("preserve");
108             fieldValidator.setValidator(typeValidator);
109         }
110         desc.setValidator(fieldValidator);
111         //-- _includeList
112         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(fr.in2p3.jsaga.generated.session.Include.class, "_includeList", "include", org.exolab.castor.xml.NodeType.Element);
113         handler = new org.exolab.castor.xml.XMLFieldHandler() {
114             public java.lang.Object getValue( java.lang.Object object ) 
115                 throws IllegalStateException
116             {
117                 ServiceType target = (ServiceType) object;
118                 return target.getInclude();
119             }
120             public void setValue( java.lang.Object object, java.lang.Object value) 
121                 throws IllegalStateException, IllegalArgumentException
122             {
123                 try {
124                     ServiceType target = (ServiceType) object;
125                     target.addInclude( (fr.in2p3.jsaga.generated.session.Include) value);
126                 }
127                 catch (java.lang.Exception ex) {
128                     throw new IllegalStateException(ex.toString());
129                 }
130             }
131             public java.lang.Object newInstance( java.lang.Object parent ) {
132                 return new fr.in2p3.jsaga.generated.session.Include();
133             }
134         };
135         desc.setHandler(handler);
136         desc.setNameSpaceURI("http://www.in2p3.fr/jsaga/session");
137         desc.setMultivalued(true);
138         addFieldDescriptor(desc);
139         
140         //-- validation code for: _includeList
141         fieldValidator = new org.exolab.castor.xml.FieldValidator();
142         fieldValidator.setMinOccurs(0);
143         { //-- local scope
144         }
145         desc.setValidator(fieldValidator);
146         //-- _excludeList
147         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(fr.in2p3.jsaga.generated.session.Exclude.class, "_excludeList", "exclude", org.exolab.castor.xml.NodeType.Element);
148         handler = new org.exolab.castor.xml.XMLFieldHandler() {
149             public java.lang.Object getValue( java.lang.Object object ) 
150                 throws IllegalStateException
151             {
152                 ServiceType target = (ServiceType) object;
153                 return target.getExclude();
154             }
155             public void setValue( java.lang.Object object, java.lang.Object value) 
156                 throws IllegalStateException, IllegalArgumentException
157             {
158                 try {
159                     ServiceType target = (ServiceType) object;
160                     target.addExclude( (fr.in2p3.jsaga.generated.session.Exclude) value);
161                 }
162                 catch (java.lang.Exception ex) {
163                     throw new IllegalStateException(ex.toString());
164                 }
165             }
166             public java.lang.Object newInstance( java.lang.Object parent ) {
167                 return new fr.in2p3.jsaga.generated.session.Exclude();
168             }
169         };
170         desc.setHandler(handler);
171         desc.setNameSpaceURI("http://www.in2p3.fr/jsaga/session");
172         desc.setMultivalued(true);
173         addFieldDescriptor(desc);
174         
175         //-- validation code for: _excludeList
176         fieldValidator = new org.exolab.castor.xml.FieldValidator();
177         fieldValidator.setMinOccurs(0);
178         { //-- local scope
179         }
180         desc.setValidator(fieldValidator);
181     } //-- fr.in2p3.jsaga.generated.session.ServiceTypeDescriptor()
182 
183 
184       //-----------/
185      //- Methods -/
186     //-----------/
187 
188     /**
189      * Method getAccessMode
190      * 
191      * 
192      * 
193      * @return AccessMode
194      */
195     public org.exolab.castor.mapping.AccessMode getAccessMode()
196     {
197         return null;
198     } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 
199 
200     /**
201      * Method getExtends
202      * 
203      * 
204      * 
205      * @return ClassDescriptor
206      */
207     public org.exolab.castor.mapping.ClassDescriptor getExtends()
208     {
209         return super.getExtends();
210     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 
211 
212     /**
213      * Method getIdentity
214      * 
215      * 
216      * 
217      * @return FieldDescriptor
218      */
219     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
220     {
221         if (identity == null)
222             return super.getIdentity();
223         return identity;
224     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 
225 
226     /**
227      * Method getJavaClass
228      * 
229      * 
230      * 
231      * @return Class
232      */
233     public java.lang.Class getJavaClass()
234     {
235         return fr.in2p3.jsaga.generated.session.ServiceType.class;
236     } //-- java.lang.Class getJavaClass() 
237 
238     /**
239      * Method getNameSpacePrefix
240      * 
241      * 
242      * 
243      * @return String
244      */
245     public java.lang.String getNameSpacePrefix()
246     {
247         return nsPrefix;
248     } //-- java.lang.String getNameSpacePrefix() 
249 
250     /**
251      * Method getNameSpaceURI
252      * 
253      * 
254      * 
255      * @return String
256      */
257     public java.lang.String getNameSpaceURI()
258     {
259         return nsURI;
260     } //-- java.lang.String getNameSpaceURI() 
261 
262     /**
263      * Method getValidator
264      * 
265      * 
266      * 
267      * @return TypeValidator
268      */
269     public org.exolab.castor.xml.TypeValidator getValidator()
270     {
271         return this;
272     } //-- org.exolab.castor.xml.TypeValidator getValidator() 
273 
274     /**
275      * Method getXMLName
276      * 
277      * 
278      * 
279      * @return String
280      */
281     public java.lang.String getXMLName()
282     {
283         return xmlName;
284     } //-- java.lang.String getXMLName() 
285 
286 }