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