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: SimpleImageAccess.java,v 1.2 2007/01/04 16:26:30 clq2 Exp $
6    */
7   
8   package org.astrogrid.registry.beans.v10.resource.sia;
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 capabilities of an SIA implementation. It includes
26   *  the listing of the columns that appear in image query
27   *  output VOTable and SIA-specific metadata.
28   *  
29   *  Editor's Notes: 
30   *  * This is a prototype definition to
31   *  illustrate how to extend the schema to a speicific 
32   *  standard interface.
33   *  * Staging information is not included yet. 
34   *  
35   * 
36   * @version $Revision: 1.2 $ $Date: 2007/01/04 16:26:30 $
37   */
38  public class SimpleImageAccess extends org.astrogrid.registry.beans.v10.resource.dataservice.TabularSkyService 
39  implements java.io.Serializable
40  {
41  
42  
43        //--------------------------/
44       //- Class/Member Variables -/
45      //--------------------------/
46  
47      /***
48       * a description of the behavior and limitations
49       *  of the SIA implementation. 
50       *  
51       */
52      private org.astrogrid.registry.beans.v10.resource.sia.SIACapability _capability;
53  
54  
55        //----------------/
56       //- Constructors -/
57      //----------------/
58  
59      public SimpleImageAccess() {
60          super();
61      } //-- org.astrogrid.registry.beans.v10.resource.sia.SimpleImageAccess()
62  
63  
64        //-----------/
65       //- Methods -/
66      //-----------/
67  
68      /***
69       * Note: hashCode() has not been overriden
70       * 
71       * @param obj
72       */
73      public boolean equals(java.lang.Object obj)
74      {
75          if ( this == obj )
76              return true;
77          
78          if (super.equals(obj)==false)
79              return false;
80          
81          if (obj instanceof SimpleImageAccess) {
82          
83              SimpleImageAccess temp = (SimpleImageAccess)obj;
84              if (this._capability != null) {
85                  if (temp._capability == null) return false;
86                  else if (!(this._capability.equals(temp._capability))) 
87                      return false;
88              }
89              else if (temp._capability != null)
90                  return false;
91              return true;
92          }
93          return false;
94      } //-- boolean equals(java.lang.Object) 
95  
96      /***
97       * Returns the value of field 'capability'. The field
98       * 'capability' has the following description: a description of
99       * the behavior and limitations
100      *  of the SIA implementation. 
101      *  
102      * 
103      * @return the value of field 'capability'.
104      */
105     public org.astrogrid.registry.beans.v10.resource.sia.SIACapability getCapability()
106     {
107         return this._capability;
108     } //-- org.astrogrid.registry.beans.v10.resource.sia.SIACapability getCapability() 
109 
110     /***
111      * Method isValid
112      */
113     public boolean isValid()
114     {
115         try {
116             validate();
117         }
118         catch (org.exolab.castor.xml.ValidationException vex) {
119             return false;
120         }
121         return true;
122     } //-- boolean isValid() 
123 
124     /***
125      * Method marshal
126      * 
127      * @param out
128      */
129     public void marshal(java.io.Writer out)
130         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
131     {
132         
133         Marshaller.marshal(this, out);
134     } //-- void marshal(java.io.Writer) 
135 
136     /***
137      * Method marshal
138      * 
139      * @param handler
140      */
141     public void marshal(org.xml.sax.ContentHandler handler)
142         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
143     {
144         
145         Marshaller.marshal(this, handler);
146     } //-- void marshal(org.xml.sax.ContentHandler) 
147 
148     /***
149      * Sets the value of field 'capability'. The field 'capability'
150      * has the following description: a description of the behavior
151      * and limitations
152      *  of the SIA implementation. 
153      *  
154      * 
155      * @param capability the value of field 'capability'.
156      */
157     public void setCapability(org.astrogrid.registry.beans.v10.resource.sia.SIACapability capability)
158     {
159         this._capability = capability;
160     } //-- void setCapability(org.astrogrid.registry.beans.v10.resource.sia.SIACapability) 
161 
162     /***
163      * Method unmarshalSimpleImageAccess
164      * 
165      * @param reader
166      */
167     public static org.astrogrid.registry.beans.v10.resource.sia.SimpleImageAccess unmarshalSimpleImageAccess(java.io.Reader reader)
168         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
169     {
170         return (org.astrogrid.registry.beans.v10.resource.sia.SimpleImageAccess) Unmarshaller.unmarshal(org.astrogrid.registry.beans.v10.resource.sia.SimpleImageAccess.class, reader);
171     } //-- org.astrogrid.registry.beans.v10.resource.sia.SimpleImageAccess unmarshalSimpleImageAccess(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 }