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