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: StreamTABLEFORMATType.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 StreamTABLEFORMATType.
26   * 
27   * @version $Revision: 1.14 $ $Date: 2007/01/04 16:26:14 $
28   */
29  public class StreamTABLEFORMATType extends org.astrogrid.registry.beans.resource.votable.TABLEFORMATType 
30  implements java.io.Serializable
31  {
32  
33  
34        //--------------------------/
35       //- Class/Member Variables -/
36      //--------------------------/
37  
38      /***
39       * Field _STREAM
40       */
41      private org.astrogrid.registry.beans.resource.votable.STREAM _STREAM;
42  
43  
44        //----------------/
45       //- Constructors -/
46      //----------------/
47  
48      public StreamTABLEFORMATType() {
49          super();
50      } //-- org.astrogrid.registry.beans.resource.votable.StreamTABLEFORMATType()
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 StreamTABLEFORMATType) {
71          
72              StreamTABLEFORMATType temp = (StreamTABLEFORMATType)obj;
73              if (this._STREAM != null) {
74                  if (temp._STREAM == null) return false;
75                  else if (!(this._STREAM.equals(temp._STREAM))) 
76                      return false;
77              }
78              else if (temp._STREAM != 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 'STREAM'.
87       * 
88       * @return the value of field 'STREAM'.
89       */
90      public org.astrogrid.registry.beans.resource.votable.STREAM getSTREAM()
91      {
92          return this._STREAM;
93      } //-- org.astrogrid.registry.beans.resource.votable.STREAM getSTREAM() 
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 'STREAM'.
135      * 
136      * @param STREAM the value of field 'STREAM'.
137      */
138     public void setSTREAM(org.astrogrid.registry.beans.resource.votable.STREAM STREAM)
139     {
140         this._STREAM = STREAM;
141     } //-- void setSTREAM(org.astrogrid.registry.beans.resource.votable.STREAM) 
142 
143     /***
144      * Method unmarshalStreamTABLEFORMATType
145      * 
146      * @param reader
147      */
148     public static org.astrogrid.registry.beans.resource.votable.StreamTABLEFORMATType unmarshalStreamTABLEFORMATType(java.io.Reader reader)
149         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
150     {
151         return (org.astrogrid.registry.beans.resource.votable.StreamTABLEFORMATType) Unmarshaller.unmarshal(org.astrogrid.registry.beans.resource.votable.StreamTABLEFORMATType.class, reader);
152     } //-- org.astrogrid.registry.beans.resource.votable.StreamTABLEFORMATType unmarshalStreamTABLEFORMATType(java.io.Reader) 
153 
154     /***
155      * Method validate
156      */
157     public void validate()
158         throws org.exolab.castor.xml.ValidationException
159     {
160         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
161         validator.validate(this);
162     } //-- void validate() 
163 
164 }