View Javadoc

1   /*
2    * This class was automatically generated with 
3    * <a href="http://www.castor.org">Castor 0.9.4.3</a>, using an XML
4    * Schema.
5    * $Id: ExtensionDescriptor.java,v 1.13 2007/01/04 16:26:08 clq2 Exp $
6    */
7   
8   package org.astrogrid.workflow.beans.v1.execution;
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 ExtensionDescriptor.
21   * 
22   * @version $Revision: 1.13 $ $Date: 2007/01/04 16:26:08 $
23   */
24  public class ExtensionDescriptor 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 ExtensionDescriptor() {
57          super();
58          nsURI = "http://www.astrogrid.org/schema/ExecutionRecord/v1";
59          xmlName = "extension";
60          org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
61          org.exolab.castor.xml.XMLFieldHandler              handler        = null;
62          org.exolab.castor.xml.FieldValidator               fieldValidator = null;
63          //-- _content
64          desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text);
65          desc.setImmutable(true);
66          handler = (new org.exolab.castor.xml.XMLFieldHandler() {
67              public java.lang.Object getValue( java.lang.Object object ) 
68                  throws IllegalStateException
69              {
70                  Extension target = (Extension) object;
71                  return target.getContent();
72              }
73              public void setValue( java.lang.Object object, java.lang.Object value) 
74                  throws IllegalStateException, IllegalArgumentException
75              {
76                  try {
77                      Extension target = (Extension) object;
78                      target.setContent( (java.lang.String) value);
79                  }
80                  catch (java.lang.Exception ex) {
81                      throw new IllegalStateException(ex.toString());
82                  }
83              }
84              public java.lang.Object newInstance( java.lang.Object parent ) {
85                  return null;
86              }
87          } );
88          desc.setHandler(handler);
89          addFieldDescriptor(desc);
90          
91          //-- validation code for: _content
92          fieldValidator = new org.exolab.castor.xml.FieldValidator();
93          { //-- local scope
94              StringValidator typeValidator = new StringValidator();
95              typeValidator.setWhiteSpace("preserve");
96              fieldValidator.setValidator(typeValidator);
97          }
98          desc.setValidator(fieldValidator);
99          //-- initialize attribute descriptors
100         
101         //-- _key
102         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_key", "key", org.exolab.castor.xml.NodeType.Attribute);
103         desc.setImmutable(true);
104         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
105             public java.lang.Object getValue( java.lang.Object object ) 
106                 throws IllegalStateException
107             {
108                 Extension target = (Extension) object;
109                 return target.getKey();
110             }
111             public void setValue( java.lang.Object object, java.lang.Object value) 
112                 throws IllegalStateException, IllegalArgumentException
113             {
114                 try {
115                     Extension target = (Extension) object;
116                     target.setKey( (java.lang.String) value);
117                 }
118                 catch (java.lang.Exception ex) {
119                     throw new IllegalStateException(ex.toString());
120                 }
121             }
122             public java.lang.Object newInstance( java.lang.Object parent ) {
123                 return null;
124             }
125         } );
126         desc.setHandler(handler);
127         desc.setRequired(true);
128         addFieldDescriptor(desc);
129         
130         //-- validation code for: _key
131         fieldValidator = new org.exolab.castor.xml.FieldValidator();
132         fieldValidator.setMinOccurs(1);
133         { //-- local scope
134             StringValidator typeValidator = new StringValidator();
135             typeValidator.setWhiteSpace("preserve");
136             fieldValidator.setValidator(typeValidator);
137         }
138         desc.setValidator(fieldValidator);
139         //-- initialize element descriptors
140         
141     } //-- org.astrogrid.workflow.beans.v1.execution.ExtensionDescriptor()
142 
143 
144       //-----------/
145      //- Methods -/
146     //-----------/
147 
148     /***
149      * Method getAccessMode
150      */
151     public org.exolab.castor.mapping.AccessMode getAccessMode()
152     {
153         return null;
154     } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 
155 
156     /***
157      * Method getExtends
158      */
159     public org.exolab.castor.mapping.ClassDescriptor getExtends()
160     {
161         return null;
162     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 
163 
164     /***
165      * Method getIdentity
166      */
167     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
168     {
169         return identity;
170     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 
171 
172     /***
173      * Method getJavaClass
174      */
175     public java.lang.Class getJavaClass()
176     {
177         return org.astrogrid.workflow.beans.v1.execution.Extension.class;
178     } //-- java.lang.Class getJavaClass() 
179 
180     /***
181      * Method getNameSpacePrefix
182      */
183     public java.lang.String getNameSpacePrefix()
184     {
185         return nsPrefix;
186     } //-- java.lang.String getNameSpacePrefix() 
187 
188     /***
189      * Method getNameSpaceURI
190      */
191     public java.lang.String getNameSpaceURI()
192     {
193         return nsURI;
194     } //-- java.lang.String getNameSpaceURI() 
195 
196     /***
197      * Method getValidator
198      */
199     public org.exolab.castor.xml.TypeValidator getValidator()
200     {
201         return this;
202     } //-- org.exolab.castor.xml.TypeValidator getValidator() 
203 
204     /***
205      * Method getXMLName
206      */
207     public java.lang.String getXMLName()
208     {
209         return xmlName;
210     } //-- java.lang.String getXMLName() 
211 
212 }