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