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: ConeSearch.java,v 1.2 2007/01/04 16:26:33 clq2 Exp $
6    */
7   
8   package org.astrogrid.registry.beans.v10.resource.conesearch;
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   * a standard service that returns catalog entries with a
26   *  position falling within a cone on the sky (given by a position 
27   *  and a radius). 
28   *  
29   *  The standard ConeSearch interface is defined to be ParamHTTP; 
30   *  the specifics of this interface (e.g. the supported inputs)
31   *  can be given using xsi:type="ParamHTTP" with the Interface 
32   *  element. Other alternative (and therefore non-standard) 
33   *  interfaces may also be described (e.g. a WebService version).
34   *  
35   * 
36   * @version $Revision: 1.2 $ $Date: 2007/01/04 16:26:33 $
37   */
38  public class ConeSearch 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 how this particular ConeSearch 
49       *  service behaves. 
50       *  
51       */
52      private org.astrogrid.registry.beans.v10.resource.conesearch.ConeSearchCapability _capability;
53  
54  
55        //----------------/
56       //- Constructors -/
57      //----------------/
58  
59      public ConeSearch() {
60          super();
61      } //-- org.astrogrid.registry.beans.v10.resource.conesearch.ConeSearch()
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 ConeSearch) {
82          
83              ConeSearch temp = (ConeSearch)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       * how this particular ConeSearch 
100      *  service behaves. 
101      *  
102      * 
103      * @return the value of field 'capability'.
104      */
105     public org.astrogrid.registry.beans.v10.resource.conesearch.ConeSearchCapability getCapability()
106     {
107         return this._capability;
108     } //-- org.astrogrid.registry.beans.v10.resource.conesearch.ConeSearchCapability 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 how this
151      * particular ConeSearch 
152      *  service behaves. 
153      *  
154      * 
155      * @param capability the value of field 'capability'.
156      */
157     public void setCapability(org.astrogrid.registry.beans.v10.resource.conesearch.ConeSearchCapability capability)
158     {
159         this._capability = capability;
160     } //-- void setCapability(org.astrogrid.registry.beans.v10.resource.conesearch.ConeSearchCapability) 
161 
162     /***
163      * Method unmarshalConeSearch
164      * 
165      * @param reader
166      */
167     public static org.astrogrid.registry.beans.v10.resource.conesearch.ConeSearch unmarshalConeSearch(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.conesearch.ConeSearch) Unmarshaller.unmarshal(org.astrogrid.registry.beans.v10.resource.conesearch.ConeSearch.class, reader);
171     } //-- org.astrogrid.registry.beans.v10.resource.conesearch.ConeSearch unmarshalConeSearch(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 }