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.adaptor.schema.data.emulator;
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 EntryTypeDescriptor.
21   * 
22   * @version $Revision$ $Date$
23   */
24  public class EntryTypeDescriptor 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 EntryTypeDescriptor() 
57       {
58          super();
59          nsURI = "http://www.in2p3.fr/jsaga/data-emulator";
60          xmlName = "EntryType";
61          org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
62          org.exolab.castor.mapping.FieldHandler             handler        = null;
63          org.exolab.castor.xml.FieldValidator               fieldValidator = null;
64          //-- initialize attribute descriptors
65          
66          //-- _name
67          desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute);
68          desc.setImmutable(true);
69          handler = new org.exolab.castor.xml.XMLFieldHandler() {
70              public java.lang.Object getValue( java.lang.Object object ) 
71                  throws IllegalStateException
72              {
73                  EntryType target = (EntryType) object;
74                  return target.getName();
75              }
76              public void setValue( java.lang.Object object, java.lang.Object value) 
77                  throws IllegalStateException, IllegalArgumentException
78              {
79                  try {
80                      EntryType target = (EntryType) object;
81                      target.setName( (java.lang.String) value);
82                  }
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 null;
89              }
90          };
91          desc.setHandler(handler);
92          desc.setNameSpaceURI("http://www.in2p3.fr/jsaga/data-emulator");
93          desc.setRequired(true);
94          desc.setMultivalued(false);
95          addFieldDescriptor(desc);
96          
97          //-- validation code for: _name
98          fieldValidator = new org.exolab.castor.xml.FieldValidator();
99          fieldValidator.setMinOccurs(1);
100         { //-- local scope
101             StringValidator typeValidator = new StringValidator();
102             typeValidator.setWhiteSpace("preserve");
103             fieldValidator.setValidator(typeValidator);
104         }
105         desc.setValidator(fieldValidator);
106         //-- _owner
107         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_owner", "owner", org.exolab.castor.xml.NodeType.Attribute);
108         desc.setImmutable(true);
109         handler = new org.exolab.castor.xml.XMLFieldHandler() {
110             public java.lang.Object getValue( java.lang.Object object ) 
111                 throws IllegalStateException
112             {
113                 EntryType target = (EntryType) object;
114                 return target.getOwner();
115             }
116             public void setValue( java.lang.Object object, java.lang.Object value) 
117                 throws IllegalStateException, IllegalArgumentException
118             {
119                 try {
120                     EntryType target = (EntryType) object;
121                     target.setOwner( (java.lang.String) value);
122                 }
123                 catch (java.lang.Exception ex) {
124                     throw new IllegalStateException(ex.toString());
125                 }
126             }
127             public java.lang.Object newInstance( java.lang.Object parent ) {
128                 return null;
129             }
130         };
131         desc.setHandler(handler);
132         desc.setNameSpaceURI("http://www.in2p3.fr/jsaga/data-emulator");
133         desc.setMultivalued(false);
134         addFieldDescriptor(desc);
135         
136         //-- validation code for: _owner
137         fieldValidator = new org.exolab.castor.xml.FieldValidator();
138         { //-- local scope
139             StringValidator typeValidator = new StringValidator();
140             typeValidator.setWhiteSpace("preserve");
141             fieldValidator.setValidator(typeValidator);
142         }
143         desc.setValidator(fieldValidator);
144         //-- initialize element descriptors
145         
146     } //-- fr.in2p3.jsaga.adaptor.schema.data.emulator.EntryTypeDescriptor()
147 
148 
149       //-----------/
150      //- Methods -/
151     //-----------/
152 
153     /**
154      * Method getAccessMode
155      * 
156      * 
157      * 
158      * @return AccessMode
159      */
160     public org.exolab.castor.mapping.AccessMode getAccessMode()
161     {
162         return null;
163     } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 
164 
165     /**
166      * Method getExtends
167      * 
168      * 
169      * 
170      * @return ClassDescriptor
171      */
172     public org.exolab.castor.mapping.ClassDescriptor getExtends()
173     {
174         return null;
175     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 
176 
177     /**
178      * Method getIdentity
179      * 
180      * 
181      * 
182      * @return FieldDescriptor
183      */
184     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
185     {
186         return identity;
187     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 
188 
189     /**
190      * Method getJavaClass
191      * 
192      * 
193      * 
194      * @return Class
195      */
196     public java.lang.Class getJavaClass()
197     {
198         return fr.in2p3.jsaga.adaptor.schema.data.emulator.EntryType.class;
199     } //-- java.lang.Class getJavaClass() 
200 
201     /**
202      * Method getNameSpacePrefix
203      * 
204      * 
205      * 
206      * @return String
207      */
208     public java.lang.String getNameSpacePrefix()
209     {
210         return nsPrefix;
211     } //-- java.lang.String getNameSpacePrefix() 
212 
213     /**
214      * Method getNameSpaceURI
215      * 
216      * 
217      * 
218      * @return String
219      */
220     public java.lang.String getNameSpaceURI()
221     {
222         return nsURI;
223     } //-- java.lang.String getNameSpaceURI() 
224 
225     /**
226      * Method getValidator
227      * 
228      * 
229      * 
230      * @return TypeValidator
231      */
232     public org.exolab.castor.xml.TypeValidator getValidator()
233     {
234         return this;
235     } //-- org.exolab.castor.xml.TypeValidator getValidator() 
236 
237     /**
238      * Method getXMLName
239      * 
240      * 
241      * 
242      * @return String
243      */
244     public java.lang.String getXMLName()
245     {
246         return xmlName;
247     } //-- java.lang.String getXMLName() 
248 
249 }