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: WebServiceExecutionControllerConfig.java,v 1.2 2007/01/04 16:26:21 clq2 Exp $
6    */
7   
8   package org.astrogrid.applications.beans.v1.cea.implementation;
9   
10    //---------------------------------/
11   //- Imported classes and packages -/
12  //---------------------------------/
13  
14  import java.io.IOException;
15  import java.io.Reader;
16  import java.io.Serializable;
17  import java.io.Writer;
18  import java.util.ArrayList;
19  import java.util.Enumeration;
20  import org.exolab.castor.xml.MarshalException;
21  import org.exolab.castor.xml.Marshaller;
22  import org.exolab.castor.xml.Unmarshaller;
23  import org.exolab.castor.xml.ValidationException;
24  import org.xml.sax.ContentHandler;
25  
26  /***
27   * Class WebServiceExecutionControllerConfig.
28   * 
29   * @version $Revision: 1.2 $ $Date: 2007/01/04 16:26:21 $
30   */
31  public class WebServiceExecutionControllerConfig extends org.astrogrid.applications.beans.v1.cea.implementation.CommonExecutionConnectorConfigType 
32  implements java.io.Serializable
33  {
34  
35  
36        //--------------------------/
37       //- Class/Member Variables -/
38      //--------------------------/
39  
40      /***
41       * Field _webServiceList
42       */
43      private java.util.ArrayList _webServiceList;
44  
45  
46        //----------------/
47       //- Constructors -/
48      //----------------/
49  
50      public WebServiceExecutionControllerConfig() {
51          super();
52          _webServiceList = new ArrayList();
53      } //-- org.astrogrid.applications.beans.v1.cea.implementation.WebServiceExecutionControllerConfig()
54  
55  
56        //-----------/
57       //- Methods -/
58      //-----------/
59  
60      /***
61       * Method addWebService
62       * 
63       * @param vWebService
64       */
65      public void addWebService(org.astrogrid.applications.beans.v1.cea.implementation.WebServiceApplication vWebService)
66          throws java.lang.IndexOutOfBoundsException
67      {
68          _webServiceList.add(vWebService);
69      } //-- void addWebService(org.astrogrid.applications.beans.v1.cea.implementation.WebServiceApplication) 
70  
71      /***
72       * Method addWebService
73       * 
74       * @param index
75       * @param vWebService
76       */
77      public void addWebService(int index, org.astrogrid.applications.beans.v1.cea.implementation.WebServiceApplication vWebService)
78          throws java.lang.IndexOutOfBoundsException
79      {
80          _webServiceList.add(index, vWebService);
81      } //-- void addWebService(int, org.astrogrid.applications.beans.v1.cea.implementation.WebServiceApplication) 
82  
83      /***
84       * Method clearWebService
85       */
86      public void clearWebService()
87      {
88          _webServiceList.clear();
89      } //-- void clearWebService() 
90  
91      /***
92       * Method enumerateWebService
93       */
94      public java.util.Enumeration enumerateWebService()
95      {
96          return new org.exolab.castor.util.IteratorEnumeration(_webServiceList.iterator());
97      } //-- java.util.Enumeration enumerateWebService() 
98  
99      /***
100      * Note: hashCode() has not been overriden
101      * 
102      * @param obj
103      */
104     public boolean equals(java.lang.Object obj)
105     {
106         if ( this == obj )
107             return true;
108         
109         if (super.equals(obj)==false)
110             return false;
111         
112         if (obj instanceof WebServiceExecutionControllerConfig) {
113         
114             WebServiceExecutionControllerConfig temp = (WebServiceExecutionControllerConfig)obj;
115             if (this._webServiceList != null) {
116                 if (temp._webServiceList == null) return false;
117                 else if (!(this._webServiceList.equals(temp._webServiceList))) 
118                     return false;
119             }
120             else if (temp._webServiceList != null)
121                 return false;
122             return true;
123         }
124         return false;
125     } //-- boolean equals(java.lang.Object) 
126 
127     /***
128      * Method getWebService
129      * 
130      * @param index
131      */
132     public org.astrogrid.applications.beans.v1.cea.implementation.WebServiceApplication getWebService(int index)
133         throws java.lang.IndexOutOfBoundsException
134     {
135         //-- check bounds for index
136         if ((index < 0) || (index > _webServiceList.size())) {
137             throw new IndexOutOfBoundsException();
138         }
139         
140         return (org.astrogrid.applications.beans.v1.cea.implementation.WebServiceApplication) _webServiceList.get(index);
141     } //-- org.astrogrid.applications.beans.v1.cea.implementation.WebServiceApplication getWebService(int) 
142 
143     /***
144      * Method getWebService
145      */
146     public org.astrogrid.applications.beans.v1.cea.implementation.WebServiceApplication[] getWebService()
147     {
148         int size = _webServiceList.size();
149         org.astrogrid.applications.beans.v1.cea.implementation.WebServiceApplication[] mArray = new org.astrogrid.applications.beans.v1.cea.implementation.WebServiceApplication[size];
150         for (int index = 0; index < size; index++) {
151             mArray[index] = (org.astrogrid.applications.beans.v1.cea.implementation.WebServiceApplication) _webServiceList.get(index);
152         }
153         return mArray;
154     } //-- org.astrogrid.applications.beans.v1.cea.implementation.WebServiceApplication[] getWebService() 
155 
156     /***
157      * Method getWebServiceCount
158      */
159     public int getWebServiceCount()
160     {
161         return _webServiceList.size();
162     } //-- int getWebServiceCount() 
163 
164     /***
165      * Method isValid
166      */
167     public boolean isValid()
168     {
169         try {
170             validate();
171         }
172         catch (org.exolab.castor.xml.ValidationException vex) {
173             return false;
174         }
175         return true;
176     } //-- boolean isValid() 
177 
178     /***
179      * Method marshal
180      * 
181      * @param out
182      */
183     public void marshal(java.io.Writer out)
184         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
185     {
186         
187         Marshaller.marshal(this, out);
188     } //-- void marshal(java.io.Writer) 
189 
190     /***
191      * Method marshal
192      * 
193      * @param handler
194      */
195     public void marshal(org.xml.sax.ContentHandler handler)
196         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
197     {
198         
199         Marshaller.marshal(this, handler);
200     } //-- void marshal(org.xml.sax.ContentHandler) 
201 
202     /***
203      * Method removeWebService
204      * 
205      * @param vWebService
206      */
207     public boolean removeWebService(org.astrogrid.applications.beans.v1.cea.implementation.WebServiceApplication vWebService)
208     {
209         boolean removed = _webServiceList.remove(vWebService);
210         return removed;
211     } //-- boolean removeWebService(org.astrogrid.applications.beans.v1.cea.implementation.WebServiceApplication) 
212 
213     /***
214      * Method setWebService
215      * 
216      * @param index
217      * @param vWebService
218      */
219     public void setWebService(int index, org.astrogrid.applications.beans.v1.cea.implementation.WebServiceApplication vWebService)
220         throws java.lang.IndexOutOfBoundsException
221     {
222         //-- check bounds for index
223         if ((index < 0) || (index > _webServiceList.size())) {
224             throw new IndexOutOfBoundsException();
225         }
226         _webServiceList.set(index, vWebService);
227     } //-- void setWebService(int, org.astrogrid.applications.beans.v1.cea.implementation.WebServiceApplication) 
228 
229     /***
230      * Method setWebService
231      * 
232      * @param webServiceArray
233      */
234     public void setWebService(org.astrogrid.applications.beans.v1.cea.implementation.WebServiceApplication[] webServiceArray)
235     {
236         //-- copy array
237         _webServiceList.clear();
238         for (int i = 0; i < webServiceArray.length; i++) {
239             _webServiceList.add(webServiceArray[i]);
240         }
241     } //-- void setWebService(org.astrogrid.applications.beans.v1.cea.implementation.WebServiceApplication) 
242 
243     /***
244      * Method unmarshalWebServiceExecutionControllerConfig
245      * 
246      * @param reader
247      */
248     public static org.astrogrid.applications.beans.v1.cea.implementation.WebServiceExecutionControllerConfig unmarshalWebServiceExecutionControllerConfig(java.io.Reader reader)
249         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
250     {
251         return (org.astrogrid.applications.beans.v1.cea.implementation.WebServiceExecutionControllerConfig) Unmarshaller.unmarshal(org.astrogrid.applications.beans.v1.cea.implementation.WebServiceExecutionControllerConfig.class, reader);
252     } //-- org.astrogrid.applications.beans.v1.cea.implementation.WebServiceExecutionControllerConfig unmarshalWebServiceExecutionControllerConfig(java.io.Reader) 
253 
254     /***
255      * Method validate
256      */
257     public void validate()
258         throws org.exolab.castor.xml.ValidationException
259     {
260         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
261         validator.validate(this);
262     } //-- void validate() 
263 
264 }