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: COOSYS.java,v 1.14 2007/01/04 16:26:13 clq2 Exp $
6    */
7   
8   package org.astrogrid.registry.beans.resource.votable;
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.astrogrid.registry.beans.resource.votable.types.COOSYSSystemType;
19  import org.exolab.castor.xml.MarshalException;
20  import org.exolab.castor.xml.Marshaller;
21  import org.exolab.castor.xml.Unmarshaller;
22  import org.exolab.castor.xml.ValidationException;
23  import org.xml.sax.ContentHandler;
24  
25  /***
26   * Class COOSYS.
27   * 
28   * @version $Revision: 1.14 $ $Date: 2007/01/04 16:26:13 $
29   */
30  public class COOSYS extends org.astrogrid.registry.beans.resource.votable.AnyTEXT 
31  implements java.io.Serializable
32  {
33  
34  
35        //--------------------------/
36       //- Class/Member Variables -/
37      //--------------------------/
38  
39      /***
40       * Field _ID
41       */
42      private java.lang.String _ID;
43  
44      /***
45       * Field _equinox
46       */
47      private java.lang.String _equinox;
48  
49      /***
50       * Field _epoch
51       */
52      private java.lang.String _epoch;
53  
54      /***
55       * Field _system
56       */
57      private org.astrogrid.registry.beans.resource.votable.types.COOSYSSystemType _system = org.astrogrid.registry.beans.resource.votable.types.COOSYSSystemType.valueOf("eq_FK5");
58  
59      /***
60       * internal content storage
61       */
62      private java.lang.String _content = "";
63  
64  
65        //----------------/
66       //- Constructors -/
67      //----------------/
68  
69      public COOSYS() {
70          super();
71          setSystem(org.astrogrid.registry.beans.resource.votable.types.COOSYSSystemType.valueOf("eq_FK5"));
72          setContent("");
73      } //-- org.astrogrid.registry.beans.resource.votable.COOSYS()
74  
75  
76        //-----------/
77       //- Methods -/
78      //-----------/
79  
80      /***
81       * Note: hashCode() has not been overriden
82       * 
83       * @param obj
84       */
85      public boolean equals(java.lang.Object obj)
86      {
87          if ( this == obj )
88              return true;
89          
90          if (super.equals(obj)==false)
91              return false;
92          
93          if (obj instanceof COOSYS) {
94          
95              COOSYS temp = (COOSYS)obj;
96              if (this._ID != null) {
97                  if (temp._ID == null) return false;
98                  else if (!(this._ID.equals(temp._ID))) 
99                      return false;
100             }
101             else if (temp._ID != null)
102                 return false;
103             if (this._equinox != null) {
104                 if (temp._equinox == null) return false;
105                 else if (!(this._equinox.equals(temp._equinox))) 
106                     return false;
107             }
108             else if (temp._equinox != null)
109                 return false;
110             if (this._epoch != null) {
111                 if (temp._epoch == null) return false;
112                 else if (!(this._epoch.equals(temp._epoch))) 
113                     return false;
114             }
115             else if (temp._epoch != null)
116                 return false;
117             if (this._system != null) {
118                 if (temp._system == null) return false;
119                 else if (!(this._system.equals(temp._system))) 
120                     return false;
121             }
122             else if (temp._system != null)
123                 return false;
124             if (this._content != null) {
125                 if (temp._content == null) return false;
126                 else if (!(this._content.equals(temp._content))) 
127                     return false;
128             }
129             else if (temp._content != null)
130                 return false;
131             return true;
132         }
133         return false;
134     } //-- boolean equals(java.lang.Object) 
135 
136     /***
137      * Returns the value of field 'content'. The field 'content'
138      * has the following description: internal content storage
139      * 
140      * @return the value of field 'content'.
141      */
142     public java.lang.String getContent()
143     {
144         return this._content;
145     } //-- java.lang.String getContent() 
146 
147     /***
148      * Returns the value of field 'epoch'.
149      * 
150      * @return the value of field 'epoch'.
151      */
152     public java.lang.String getEpoch()
153     {
154         return this._epoch;
155     } //-- java.lang.String getEpoch() 
156 
157     /***
158      * Returns the value of field 'equinox'.
159      * 
160      * @return the value of field 'equinox'.
161      */
162     public java.lang.String getEquinox()
163     {
164         return this._equinox;
165     } //-- java.lang.String getEquinox() 
166 
167     /***
168      * Returns the value of field 'ID'.
169      * 
170      * @return the value of field 'ID'.
171      */
172     public java.lang.String getID()
173     {
174         return this._ID;
175     } //-- java.lang.String getID() 
176 
177     /***
178      * Returns the value of field 'system'.
179      * 
180      * @return the value of field 'system'.
181      */
182     public org.astrogrid.registry.beans.resource.votable.types.COOSYSSystemType getSystem()
183     {
184         return this._system;
185     } //-- org.astrogrid.registry.beans.resource.votable.types.COOSYSSystemType getSystem() 
186 
187     /***
188      * Method isValid
189      */
190     public boolean isValid()
191     {
192         try {
193             validate();
194         }
195         catch (org.exolab.castor.xml.ValidationException vex) {
196             return false;
197         }
198         return true;
199     } //-- boolean isValid() 
200 
201     /***
202      * Method marshal
203      * 
204      * @param out
205      */
206     public void marshal(java.io.Writer out)
207         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
208     {
209         
210         Marshaller.marshal(this, out);
211     } //-- void marshal(java.io.Writer) 
212 
213     /***
214      * Method marshal
215      * 
216      * @param handler
217      */
218     public void marshal(org.xml.sax.ContentHandler handler)
219         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
220     {
221         
222         Marshaller.marshal(this, handler);
223     } //-- void marshal(org.xml.sax.ContentHandler) 
224 
225     /***
226      * Sets the value of field 'content'. The field 'content' has
227      * the following description: internal content storage
228      * 
229      * @param content the value of field 'content'.
230      */
231     public void setContent(java.lang.String content)
232     {
233         this._content = content;
234     } //-- void setContent(java.lang.String) 
235 
236     /***
237      * Sets the value of field 'epoch'.
238      * 
239      * @param epoch the value of field 'epoch'.
240      */
241     public void setEpoch(java.lang.String epoch)
242     {
243         this._epoch = epoch;
244     } //-- void setEpoch(java.lang.String) 
245 
246     /***
247      * Sets the value of field 'equinox'.
248      * 
249      * @param equinox the value of field 'equinox'.
250      */
251     public void setEquinox(java.lang.String equinox)
252     {
253         this._equinox = equinox;
254     } //-- void setEquinox(java.lang.String) 
255 
256     /***
257      * Sets the value of field 'ID'.
258      * 
259      * @param ID the value of field 'ID'.
260      */
261     public void setID(java.lang.String ID)
262     {
263         this._ID = ID;
264     } //-- void setID(java.lang.String) 
265 
266     /***
267      * Sets the value of field 'system'.
268      * 
269      * @param system the value of field 'system'.
270      */
271     public void setSystem(org.astrogrid.registry.beans.resource.votable.types.COOSYSSystemType system)
272     {
273         this._system = system;
274     } //-- void setSystem(org.astrogrid.registry.beans.resource.votable.types.COOSYSSystemType) 
275 
276     /***
277      * Method unmarshalCOOSYS
278      * 
279      * @param reader
280      */
281     public static org.astrogrid.registry.beans.resource.votable.COOSYS unmarshalCOOSYS(java.io.Reader reader)
282         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
283     {
284         return (org.astrogrid.registry.beans.resource.votable.COOSYS) Unmarshaller.unmarshal(org.astrogrid.registry.beans.resource.votable.COOSYS.class, reader);
285     } //-- org.astrogrid.registry.beans.resource.votable.COOSYS unmarshalCOOSYS(java.io.Reader) 
286 
287     /***
288      * Method validate
289      */
290     public void validate()
291         throws org.exolab.castor.xml.ValidationException
292     {
293         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
294         validator.validate(this);
295     } //-- void validate() 
296 
297 }