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