1
2
3
4
5
6
7
8 package org.astrogrid.workflow.beans.v1;
9
10
11
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
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
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
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
68
69
70
71
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
101 fieldValidator = new org.exolab.castor.xml.FieldValidator();
102 fieldValidator.setMinOccurs(0);
103 {
104 }
105 desc.setValidator(fieldValidator);
106 }
107
108
109
110
111
112
113 /***
114 * Method getAccessMode
115 */
116 public org.exolab.castor.mapping.AccessMode getAccessMode()
117 {
118 return null;
119 }
120
121 /***
122 * Method getExtends
123 */
124 public org.exolab.castor.mapping.ClassDescriptor getExtends()
125 {
126 return super.getExtends();
127 }
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 }
138
139 /***
140 * Method getJavaClass
141 */
142 public java.lang.Class getJavaClass()
143 {
144 return org.astrogrid.workflow.beans.v1.ActivityContainer.class;
145 }
146
147 /***
148 * Method getNameSpacePrefix
149 */
150 public java.lang.String getNameSpacePrefix()
151 {
152 return nsPrefix;
153 }
154
155 /***
156 * Method getNameSpaceURI
157 */
158 public java.lang.String getNameSpaceURI()
159 {
160 return nsURI;
161 }
162
163 /***
164 * Method getValidator
165 */
166 public org.exolab.castor.xml.TypeValidator getValidator()
167 {
168 return this;
169 }
170
171 /***
172 * Method getXMLName
173 */
174 public java.lang.String getXMLName()
175 {
176 return xmlName;
177 }
178
179 }