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 FileTypeDescriptor.
21   * 
22   * @version $Revision$ $Date$
23   */
24  public class FileTypeDescriptor extends fr.in2p3.jsaga.adaptor.schema.data.emulator.EntryTypeDescriptor {
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 FileTypeDescriptor() 
57       {
58          super();
59          setExtendsWithoutFlatten(new fr.in2p3.jsaga.adaptor.schema.data.emulator.EntryTypeDescriptor());
60          nsURI = "http://www.in2p3.fr/jsaga/data-emulator";
61          xmlName = "FileType";
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          //-- _link
71          desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_link", "link", org.exolab.castor.xml.NodeType.Attribute);
72          handler = new org.exolab.castor.xml.XMLFieldHandler() {
73              public java.lang.Object getValue( java.lang.Object object ) 
74                  throws IllegalStateException
75              {
76                  FileType target = (FileType) object;
77                  return target.getLink();
78              }
79              public void setValue( java.lang.Object object, java.lang.Object value) 
80                  throws IllegalStateException, IllegalArgumentException
81              {
82                  try {
83                      FileType target = (FileType) object;
84                      target.setLink( (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 new java.lang.String();
92              }
93          };
94          desc.setHandler(handler);
95          desc.setNameSpaceURI("http://www.in2p3.fr/jsaga/data-emulator");
96          desc.setMultivalued(false);
97          addFieldDescriptor(desc);
98          
99          //-- validation code for: _link
100         fieldValidator = new org.exolab.castor.xml.FieldValidator();
101         { //-- local scope
102         }
103         desc.setValidator(fieldValidator);
104         //-- initialize element descriptors
105         
106         //-- _content
107         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "content", org.exolab.castor.xml.NodeType.Element);
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                 FileType target = (FileType) object;
114                 return target.getContent();
115             }
116             public void setValue( java.lang.Object object, java.lang.Object value) 
117                 throws IllegalStateException, IllegalArgumentException
118             {
119                 try {
120                     FileType target = (FileType) object;
121                     target.setContent( (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: _content
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     } //-- fr.in2p3.jsaga.adaptor.schema.data.emulator.FileTypeDescriptor()
145 
146 
147       //-----------/
148      //- Methods -/
149     //-----------/
150 
151     /**
152      * Method getAccessMode
153      * 
154      * 
155      * 
156      * @return AccessMode
157      */
158     public org.exolab.castor.mapping.AccessMode getAccessMode()
159     {
160         return null;
161     } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 
162 
163     /**
164      * Method getExtends
165      * 
166      * 
167      * 
168      * @return ClassDescriptor
169      */
170     public org.exolab.castor.mapping.ClassDescriptor getExtends()
171     {
172         return super.getExtends();
173     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 
174 
175     /**
176      * Method getIdentity
177      * 
178      * 
179      * 
180      * @return FieldDescriptor
181      */
182     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
183     {
184         if (identity == null)
185             return super.getIdentity();
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.FileType.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 }