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