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 ContextsDescriptor.
21   * 
22   * @version $Revision$ $Date$
23   */
24  public class ContextsDescriptor 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 ContextsDescriptor() 
57       {
58          super();
59          nsURI = "http://www.in2p3.fr/jsaga/session";
60          xmlName = "contexts";
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          //-- initialize element descriptors
70          
71          //-- _contextList
72          desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(fr.in2p3.jsaga.generated.session.Context.class, "_contextList", "context", org.exolab.castor.xml.NodeType.Element);
73          handler = new org.exolab.castor.xml.XMLFieldHandler() {
74              public java.lang.Object getValue( java.lang.Object object ) 
75                  throws IllegalStateException
76              {
77                  Contexts target = (Contexts) object;
78                  return target.getContext();
79              }
80              public void setValue( java.lang.Object object, java.lang.Object value) 
81                  throws IllegalStateException, IllegalArgumentException
82              {
83                  try {
84                      Contexts target = (Contexts) object;
85                      target.addContext( (fr.in2p3.jsaga.generated.session.Context) 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 new fr.in2p3.jsaga.generated.session.Context();
93              }
94          };
95          desc.setHandler(handler);
96          desc.setNameSpaceURI("http://www.in2p3.fr/jsaga/session");
97          desc.setMultivalued(true);
98          addFieldDescriptor(desc);
99          
100         //-- validation code for: _contextList
101         fieldValidator = new org.exolab.castor.xml.FieldValidator();
102         fieldValidator.setMinOccurs(0);
103         { //-- local scope
104         }
105         desc.setValidator(fieldValidator);
106     } //-- fr.in2p3.jsaga.generated.session.ContextsDescriptor()
107 
108 
109       //-----------/
110      //- Methods -/
111     //-----------/
112 
113     /**
114      * Method getAccessMode
115      * 
116      * 
117      * 
118      * @return AccessMode
119      */
120     public org.exolab.castor.mapping.AccessMode getAccessMode()
121     {
122         return null;
123     } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 
124 
125     /**
126      * Method getExtends
127      * 
128      * 
129      * 
130      * @return ClassDescriptor
131      */
132     public org.exolab.castor.mapping.ClassDescriptor getExtends()
133     {
134         return null;
135     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 
136 
137     /**
138      * Method getIdentity
139      * 
140      * 
141      * 
142      * @return FieldDescriptor
143      */
144     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
145     {
146         return identity;
147     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 
148 
149     /**
150      * Method getJavaClass
151      * 
152      * 
153      * 
154      * @return Class
155      */
156     public java.lang.Class getJavaClass()
157     {
158         return fr.in2p3.jsaga.generated.session.Contexts.class;
159     } //-- java.lang.Class getJavaClass() 
160 
161     /**
162      * Method getNameSpacePrefix
163      * 
164      * 
165      * 
166      * @return String
167      */
168     public java.lang.String getNameSpacePrefix()
169     {
170         return nsPrefix;
171     } //-- java.lang.String getNameSpacePrefix() 
172 
173     /**
174      * Method getNameSpaceURI
175      * 
176      * 
177      * 
178      * @return String
179      */
180     public java.lang.String getNameSpaceURI()
181     {
182         return nsURI;
183     } //-- java.lang.String getNameSpaceURI() 
184 
185     /**
186      * Method getValidator
187      * 
188      * 
189      * 
190      * @return TypeValidator
191      */
192     public org.exolab.castor.xml.TypeValidator getValidator()
193     {
194         return this;
195     } //-- org.exolab.castor.xml.TypeValidator getValidator() 
196 
197     /**
198      * Method getXMLName
199      * 
200      * 
201      * 
202      * @return String
203      */
204     public java.lang.String getXMLName()
205     {
206         return xmlName;
207     } //-- java.lang.String getXMLName() 
208 
209 }