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: CeaServiceType.java,v 1.2 2007/01/04 16:26:31 clq2 Exp $
6    */
7   
8   package org.astrogrid.registry.beans.v10.cea;
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 org.exolab.castor.xml.MarshalException;
19  import org.exolab.castor.xml.Marshaller;
20  import org.exolab.castor.xml.Unmarshaller;
21  import org.exolab.castor.xml.ValidationException;
22  import org.xml.sax.ContentHandler;
23  
24  /***
25   * The definition of a service that can offer an instance of a
26   * CeaApplication
27   * 
28   * @version $Revision: 1.2 $ $Date: 2007/01/04 16:26:31 $
29   */
30  public class CeaServiceType extends org.astrogrid.registry.beans.v10.resource.Service 
31  implements java.io.Serializable
32  {
33  
34  
35        //--------------------------/
36       //- Class/Member Variables -/
37      //--------------------------/
38  
39      /***
40       * Ths list of applications that a Common Execution Controller
41       * Manages
42       */
43      private org.astrogrid.registry.beans.v10.cea.ManagedApplications _managedApplications;
44  
45  
46        //----------------/
47       //- Constructors -/
48      //----------------/
49  
50      public CeaServiceType() {
51          super();
52      } //-- org.astrogrid.registry.beans.v10.cea.CeaServiceType()
53  
54  
55        //-----------/
56       //- Methods -/
57      //-----------/
58  
59      /***
60       * Note: hashCode() has not been overriden
61       * 
62       * @param obj
63       */
64      public boolean equals(java.lang.Object obj)
65      {
66          if ( this == obj )
67              return true;
68          
69          if (super.equals(obj)==false)
70              return false;
71          
72          if (obj instanceof CeaServiceType) {
73          
74              CeaServiceType temp = (CeaServiceType)obj;
75              if (this._managedApplications != null) {
76                  if (temp._managedApplications == null) return false;
77                  else if (!(this._managedApplications.equals(temp._managedApplications))) 
78                      return false;
79              }
80              else if (temp._managedApplications != null)
81                  return false;
82              return true;
83          }
84          return false;
85      } //-- boolean equals(java.lang.Object) 
86  
87      /***
88       * Returns the value of field 'managedApplications'. The field
89       * 'managedApplications' has the following description: Ths
90       * list of applications that a Common Execution Controller
91       * Manages
92       * 
93       * @return the value of field 'managedApplications'.
94       */
95      public org.astrogrid.registry.beans.v10.cea.ManagedApplications getManagedApplications()
96      {
97          return this._managedApplications;
98      } //-- org.astrogrid.registry.beans.v10.cea.ManagedApplications getManagedApplications() 
99  
100     /***
101      * Method isValid
102      */
103     public boolean isValid()
104     {
105         try {
106             validate();
107         }
108         catch (org.exolab.castor.xml.ValidationException vex) {
109             return false;
110         }
111         return true;
112     } //-- boolean isValid() 
113 
114     /***
115      * Method marshal
116      * 
117      * @param out
118      */
119     public void marshal(java.io.Writer out)
120         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
121     {
122         
123         Marshaller.marshal(this, out);
124     } //-- void marshal(java.io.Writer) 
125 
126     /***
127      * Method marshal
128      * 
129      * @param handler
130      */
131     public void marshal(org.xml.sax.ContentHandler handler)
132         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
133     {
134         
135         Marshaller.marshal(this, handler);
136     } //-- void marshal(org.xml.sax.ContentHandler) 
137 
138     /***
139      * Sets the value of field 'managedApplications'. The field
140      * 'managedApplications' has the following description: Ths
141      * list of applications that a Common Execution Controller
142      * Manages
143      * 
144      * @param managedApplications the value of field
145      * 'managedApplications'.
146      */
147     public void setManagedApplications(org.astrogrid.registry.beans.v10.cea.ManagedApplications managedApplications)
148     {
149         this._managedApplications = managedApplications;
150     } //-- void setManagedApplications(org.astrogrid.registry.beans.v10.cea.ManagedApplications) 
151 
152     /***
153      * Method unmarshalCeaServiceType
154      * 
155      * @param reader
156      */
157     public static org.astrogrid.registry.beans.v10.cea.CeaServiceType unmarshalCeaServiceType(java.io.Reader reader)
158         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
159     {
160         return (org.astrogrid.registry.beans.v10.cea.CeaServiceType) Unmarshaller.unmarshal(org.astrogrid.registry.beans.v10.cea.CeaServiceType.class, reader);
161     } //-- org.astrogrid.registry.beans.v10.cea.CeaServiceType unmarshalCeaServiceType(java.io.Reader) 
162 
163     /***
164      * Method validate
165      */
166     public void validate()
167         throws org.exolab.castor.xml.ValidationException
168     {
169         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
170         validator.validate(this);
171     } //-- void validate() 
172 
173 }