View Javadoc

1   /*
2    * This class was automatically generated with 
3    * <a href="http://castor.exolab.org">Castor 0.9.2</a>, using an
4    * XML Schema.
5    * $Id$
6    */
7   
8   package org.apache.jetspeed.xml.api.jcm;
9   
10    //---------------------------------/
11   //- Imported classes and packages -/
12  //---------------------------------/
13  
14  import org.exolab.castor.mapping.AccessMode;
15  import org.exolab.castor.mapping.ClassDescriptor;
16  import org.exolab.castor.mapping.FieldDescriptor;
17  import org.exolab.castor.xml.*;
18  import org.exolab.castor.xml.FieldValidator;
19  import org.exolab.castor.xml.TypeValidator;
20  import org.exolab.castor.xml.XMLFieldDescriptor;
21  import org.exolab.castor.xml.handlers.*;
22  import org.exolab.castor.xml.util.XMLFieldDescriptorImpl;
23  import org.exolab.castor.xml.validators.*;
24  
25  /***
26   * 
27   * @version $Revision$ $Date$
28  **/
29  public class TextinputDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
30  
31  
32        //--------------------------/
33       //- Class/Member Variables -/
34      //--------------------------/
35  
36      private java.lang.String nsPrefix;
37  
38      private java.lang.String nsURI;
39  
40      private java.lang.String xmlName;
41  
42      private org.exolab.castor.xml.XMLFieldDescriptor identity;
43  
44  
45        //----------------/
46       //- Constructors -/
47      //----------------/
48  
49      public TextinputDescriptor() {
50          super();
51          nsURI = "http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content";
52          xmlName = "textinput";
53          XMLFieldDescriptorImpl  desc           = null;
54          XMLFieldHandler         handler        = null;
55          FieldValidator          fieldValidator = null;
56          //-- initialize attribute descriptors
57          
58          //-- initialize element descriptors
59          
60          //-- _title
61          desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_title", "title", NodeType.Element);
62          desc.setImmutable(true);
63          handler = (new XMLFieldHandler() {
64              public Object getValue( Object object ) 
65                  throws IllegalStateException
66              {
67                  Textinput target = (Textinput) object;
68                  return target.getTitle();
69              }
70              public void setValue( Object object, Object value) 
71                  throws IllegalStateException, IllegalArgumentException
72              {
73                  try {
74                      Textinput target = (Textinput) object;
75                      target.setTitle( (java.lang.String) value);
76                  }
77                  catch (Exception ex) {
78                      throw new IllegalStateException(ex.toString());
79                  }
80              }
81              public Object newInstance( Object parent ) {
82                  return null;
83              }
84          } );
85          desc.setHandler(handler);
86          desc.setNameSpaceURI("http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content");
87          desc.setMultivalued(false);
88          addFieldDescriptor(desc);
89          
90          //-- validation code for: _title
91          fieldValidator = new FieldValidator();
92          { //-- local scope
93              StringValidator sv = new StringValidator();
94              sv.setWhiteSpace("preserve");
95              fieldValidator.setValidator(sv);
96          }
97          desc.setValidator(fieldValidator);
98          
99          //-- _link
100         desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_link", "link", NodeType.Element);
101         desc.setImmutable(true);
102         handler = (new XMLFieldHandler() {
103             public Object getValue( Object object ) 
104                 throws IllegalStateException
105             {
106                 Textinput target = (Textinput) object;
107                 return target.getLink();
108             }
109             public void setValue( Object object, Object value) 
110                 throws IllegalStateException, IllegalArgumentException
111             {
112                 try {
113                     Textinput target = (Textinput) object;
114                     target.setLink( (java.lang.String) value);
115                 }
116                 catch (Exception ex) {
117                     throw new IllegalStateException(ex.toString());
118                 }
119             }
120             public Object newInstance( Object parent ) {
121                 return null;
122             }
123         } );
124         desc.setHandler(handler);
125         desc.setNameSpaceURI("http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content");
126         desc.setMultivalued(false);
127         addFieldDescriptor(desc);
128         
129         //-- validation code for: _link
130         fieldValidator = new FieldValidator();
131         { //-- local scope
132             StringValidator sv = new StringValidator();
133             sv.setWhiteSpace("preserve");
134             fieldValidator.setValidator(sv);
135         }
136         desc.setValidator(fieldValidator);
137         
138         //-- _description
139         desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", NodeType.Element);
140         desc.setImmutable(true);
141         handler = (new XMLFieldHandler() {
142             public Object getValue( Object object ) 
143                 throws IllegalStateException
144             {
145                 Textinput target = (Textinput) object;
146                 return target.getDescription();
147             }
148             public void setValue( Object object, Object value) 
149                 throws IllegalStateException, IllegalArgumentException
150             {
151                 try {
152                     Textinput target = (Textinput) object;
153                     target.setDescription( (java.lang.String) value);
154                 }
155                 catch (Exception ex) {
156                     throw new IllegalStateException(ex.toString());
157                 }
158             }
159             public Object newInstance( Object parent ) {
160                 return null;
161             }
162         } );
163         desc.setHandler(handler);
164         desc.setNameSpaceURI("http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content");
165         desc.setMultivalued(false);
166         addFieldDescriptor(desc);
167         
168         //-- validation code for: _description
169         fieldValidator = new FieldValidator();
170         { //-- local scope
171             StringValidator sv = new StringValidator();
172             sv.setWhiteSpace("preserve");
173             fieldValidator.setValidator(sv);
174         }
175         desc.setValidator(fieldValidator);
176         
177         //-- _name
178         desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", NodeType.Element);
179         desc.setImmutable(true);
180         handler = (new XMLFieldHandler() {
181             public Object getValue( Object object ) 
182                 throws IllegalStateException
183             {
184                 Textinput target = (Textinput) object;
185                 return target.getName();
186             }
187             public void setValue( Object object, Object value) 
188                 throws IllegalStateException, IllegalArgumentException
189             {
190                 try {
191                     Textinput target = (Textinput) object;
192                     target.setName( (java.lang.String) value);
193                 }
194                 catch (Exception ex) {
195                     throw new IllegalStateException(ex.toString());
196                 }
197             }
198             public Object newInstance( Object parent ) {
199                 return null;
200             }
201         } );
202         desc.setHandler(handler);
203         desc.setNameSpaceURI("http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content");
204         desc.setMultivalued(false);
205         addFieldDescriptor(desc);
206         
207         //-- validation code for: _name
208         fieldValidator = new FieldValidator();
209         { //-- local scope
210             StringValidator sv = new StringValidator();
211             sv.setWhiteSpace("preserve");
212             fieldValidator.setValidator(sv);
213         }
214         desc.setValidator(fieldValidator);
215         
216     } //-- org.apache.jetspeed.xml.api.jcm.TextinputDescriptor()
217 
218 
219       //-----------/
220      //- Methods -/
221     //-----------/
222 
223     /***
224     **/
225     public org.exolab.castor.mapping.AccessMode getAccessMode()
226     {
227         return null;
228     } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 
229 
230     /***
231     **/
232     public org.exolab.castor.mapping.ClassDescriptor getExtends()
233     {
234         return null;
235     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 
236 
237     /***
238     **/
239     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
240     {
241         return identity;
242     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 
243 
244     /***
245     **/
246     public java.lang.Class getJavaClass()
247     {
248         return org.apache.jetspeed.xml.api.jcm.Textinput.class;
249     } //-- java.lang.Class getJavaClass() 
250 
251     /***
252     **/
253     public java.lang.String getNameSpacePrefix()
254     {
255         return nsPrefix;
256     } //-- java.lang.String getNameSpacePrefix() 
257 
258     /***
259     **/
260     public java.lang.String getNameSpaceURI()
261     {
262         return nsURI;
263     } //-- java.lang.String getNameSpaceURI() 
264 
265     /***
266     **/
267     public org.exolab.castor.xml.TypeValidator getValidator()
268     {
269         return this;
270     } //-- org.exolab.castor.xml.TypeValidator getValidator() 
271 
272     /***
273     **/
274     public java.lang.String getXMLName()
275     {
276         return xmlName;
277     } //-- java.lang.String getXMLName() 
278 
279 }