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: ActivityContainerDescriptor.java,v 1.29 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 ActivityContainerDescriptor.
21   * 
22   * @version $Revision: 1.29 $ $Date: 2007/01/04 16:26:28 $
23   */
24  public class ActivityContainerDescriptor 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 ActivityContainerDescriptor() {
57          super();
58          setExtendsWithoutFlatten(new org.astrogrid.workflow.beans.v1.AbstractActivityDescriptor());
59          nsURI = "http://www.astrogrid.org/schema/AGWorkflow/v1";
60          xmlName = "ActivityContainer";
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          //-- _activityList
72          desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.astrogrid.workflow.beans.v1.AbstractActivity.class, "_activityList", "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                  ActivityContainer target = (ActivityContainer) 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                      ActivityContainer target = (ActivityContainer) object;
85                      target.addActivity( (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.setMultivalued(true);
98          addFieldDescriptor(desc);
99          
100         //-- validation code for: _activityList
101         fieldValidator = new org.exolab.castor.xml.FieldValidator();
102         fieldValidator.setMinOccurs(0);
103         { //-- local scope
104         }
105         desc.setValidator(fieldValidator);
106     } //-- org.astrogrid.workflow.beans.v1.ActivityContainerDescriptor()
107 
108 
109       //-----------/
110      //- Methods -/
111     //-----------/
112 
113     /***
114      * Method getAccessMode
115      */
116     public org.exolab.castor.mapping.AccessMode getAccessMode()
117     {
118         return null;
119     } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 
120 
121     /***
122      * Method getExtends
123      */
124     public org.exolab.castor.mapping.ClassDescriptor getExtends()
125     {
126         return super.getExtends();
127     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 
128 
129     /***
130      * Method getIdentity
131      */
132     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
133     {
134         if (identity == null)
135             return super.getIdentity();
136         return identity;
137     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 
138 
139     /***
140      * Method getJavaClass
141      */
142     public java.lang.Class getJavaClass()
143     {
144         return org.astrogrid.workflow.beans.v1.ActivityContainer.class;
145     } //-- java.lang.Class getJavaClass() 
146 
147     /***
148      * Method getNameSpacePrefix
149      */
150     public java.lang.String getNameSpacePrefix()
151     {
152         return nsPrefix;
153     } //-- java.lang.String getNameSpacePrefix() 
154 
155     /***
156      * Method getNameSpaceURI
157      */
158     public java.lang.String getNameSpaceURI()
159     {
160         return nsURI;
161     } //-- java.lang.String getNameSpaceURI() 
162 
163     /***
164      * Method getValidator
165      */
166     public org.exolab.castor.xml.TypeValidator getValidator()
167     {
168         return this;
169     } //-- org.exolab.castor.xml.TypeValidator getValidator() 
170 
171     /***
172      * Method getXMLName
173      */
174     public java.lang.String getXMLName()
175     {
176         return xmlName;
177     } //-- java.lang.String getXMLName() 
178 
179 }