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