1
2
3
4
5
6
7
8 package org.astrogrid.registry.beans.resource.sia;
9
10
11
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.astrogrid.registry.beans.resource.sia.types.ImageServiceTypeType;
19 import org.exolab.castor.xml.MarshalException;
20 import org.exolab.castor.xml.Marshaller;
21 import org.exolab.castor.xml.Unmarshaller;
22 import org.exolab.castor.xml.ValidationException;
23 import org.xml.sax.ContentHandler;
24
25 /***
26 * Class SimpleImageAccessType.
27 *
28 * @version $Revision: 1.14 $ $Date: 2007/01/04 16:26:29 $
29 */
30 public class SimpleImageAccessType extends org.astrogrid.registry.beans.resource.CapabilityType
31 implements java.io.Serializable
32 {
33
34
35
36
37
38
39 /***
40 * The class of image service: Cutout, Mosaic, Atlas, Pointed
41 *
42 */
43 private org.astrogrid.registry.beans.resource.sia.types.ImageServiceTypeType _imageServiceType;
44
45 /***
46 * The maximum image query region size, expressed in decimal
47 * degrees. A value of 360 degrees indicates that there is no
48 * limit
49 * and the entire data collection (entire sky) can be queried.
50 *
51 *
52 */
53 private org.astrogrid.registry.beans.resource.sia.MaxQueryRegionSize _maxQueryRegionSize;
54
55 /***
56 * The maximum image query region size, expressed in decimal
57 * degrees. A value of 360 degrees indicates that there is no
58 * limit
59 * and the entire data collection (entire sky) can be
60 * requested.
61 *
62 */
63 private org.astrogrid.registry.beans.resource.sia.MaxImageExtent _maxImageExtent;
64
65 /***
66 * The largest image (in terms of pixels) that can be
67 * requested.
68 *
69 */
70 private org.astrogrid.registry.beans.resource.sia.MaxImageSize _maxImageSize;
71
72 /***
73 * The maximum image file size in bytes.
74 *
75 */
76 private int _maxFileSize;
77
78 /***
79 * keeps track of state for field: _maxFileSize
80 */
81 private boolean _has_maxFileSize;
82
83 /***
84 * The largest number of records that the Image Query web
85 * method will return.
86 *
87 */
88 private int _maxRecords;
89
90 /***
91 * keeps track of state for field: _maxRecords
92 */
93 private boolean _has_maxRecords;
94
95
96
97
98
99
100 public SimpleImageAccessType() {
101 super();
102 }
103
104
105
106
107
108
109 /***
110 * Note: hashCode() has not been overriden
111 *
112 * @param obj
113 */
114 public boolean equals(java.lang.Object obj)
115 {
116 if ( this == obj )
117 return true;
118
119 if (super.equals(obj)==false)
120 return false;
121
122 if (obj instanceof SimpleImageAccessType) {
123
124 SimpleImageAccessType temp = (SimpleImageAccessType)obj;
125 if (this._imageServiceType != null) {
126 if (temp._imageServiceType == null) return false;
127 else if (!(this._imageServiceType.equals(temp._imageServiceType)))
128 return false;
129 }
130 else if (temp._imageServiceType != null)
131 return false;
132 if (this._maxQueryRegionSize != null) {
133 if (temp._maxQueryRegionSize == null) return false;
134 else if (!(this._maxQueryRegionSize.equals(temp._maxQueryRegionSize)))
135 return false;
136 }
137 else if (temp._maxQueryRegionSize != null)
138 return false;
139 if (this._maxImageExtent != null) {
140 if (temp._maxImageExtent == null) return false;
141 else if (!(this._maxImageExtent.equals(temp._maxImageExtent)))
142 return false;
143 }
144 else if (temp._maxImageExtent != null)
145 return false;
146 if (this._maxImageSize != null) {
147 if (temp._maxImageSize == null) return false;
148 else if (!(this._maxImageSize.equals(temp._maxImageSize)))
149 return false;
150 }
151 else if (temp._maxImageSize != null)
152 return false;
153 if (this._maxFileSize != temp._maxFileSize)
154 return false;
155 if (this._has_maxFileSize != temp._has_maxFileSize)
156 return false;
157 if (this._maxRecords != temp._maxRecords)
158 return false;
159 if (this._has_maxRecords != temp._has_maxRecords)
160 return false;
161 return true;
162 }
163 return false;
164 }
165
166 /***
167 * Returns the value of field 'imageServiceType'. The field
168 * 'imageServiceType' has the following description: The class
169 * of image service: Cutout, Mosaic, Atlas, Pointed
170 *
171 *
172 * @return the value of field 'imageServiceType'.
173 */
174 public org.astrogrid.registry.beans.resource.sia.types.ImageServiceTypeType getImageServiceType()
175 {
176 return this._imageServiceType;
177 }
178
179 /***
180 * Returns the value of field 'maxFileSize'. The field
181 * 'maxFileSize' has the following description: The maximum
182 * image file size in bytes.
183 *
184 *
185 * @return the value of field 'maxFileSize'.
186 */
187 public int getMaxFileSize()
188 {
189 return this._maxFileSize;
190 }
191
192 /***
193 * Returns the value of field 'maxImageExtent'. The field
194 * 'maxImageExtent' has the following description: The maximum
195 * image query region size, expressed in decimal
196 * degrees. A value of 360 degrees indicates that there is no
197 * limit
198 * and the entire data collection (entire sky) can be
199 * requested.
200 *
201 *
202 * @return the value of field 'maxImageExtent'.
203 */
204 public org.astrogrid.registry.beans.resource.sia.MaxImageExtent getMaxImageExtent()
205 {
206 return this._maxImageExtent;
207 }
208
209 /***
210 * Returns the value of field 'maxImageSize'. The field
211 * 'maxImageSize' has the following description: The largest
212 * image (in terms of pixels) that can be requested.
213 *
214 *
215 * @return the value of field 'maxImageSize'.
216 */
217 public org.astrogrid.registry.beans.resource.sia.MaxImageSize getMaxImageSize()
218 {
219 return this._maxImageSize;
220 }
221
222 /***
223 * Returns the value of field 'maxQueryRegionSize'. The field
224 * 'maxQueryRegionSize' has the following description: The
225 * maximum image query region size, expressed in decimal
226 * degrees. A value of 360 degrees indicates that there is no
227 * limit
228 * and the entire data collection (entire sky) can be queried.
229 *
230 *
231 *
232 * @return the value of field 'maxQueryRegionSize'.
233 */
234 public org.astrogrid.registry.beans.resource.sia.MaxQueryRegionSize getMaxQueryRegionSize()
235 {
236 return this._maxQueryRegionSize;
237 }
238
239 /***
240 * Returns the value of field 'maxRecords'. The field
241 * 'maxRecords' has the following description: The largest
242 * number of records that the Image Query web
243 * method will return.
244 *
245 *
246 * @return the value of field 'maxRecords'.
247 */
248 public int getMaxRecords()
249 {
250 return this._maxRecords;
251 }
252
253 /***
254 * Method hasMaxFileSize
255 */
256 public boolean hasMaxFileSize()
257 {
258 return this._has_maxFileSize;
259 }
260
261 /***
262 * Method hasMaxRecords
263 */
264 public boolean hasMaxRecords()
265 {
266 return this._has_maxRecords;
267 }
268
269 /***
270 * Method isValid
271 */
272 public boolean isValid()
273 {
274 try {
275 validate();
276 }
277 catch (org.exolab.castor.xml.ValidationException vex) {
278 return false;
279 }
280 return true;
281 }
282
283 /***
284 * Method marshal
285 *
286 * @param out
287 */
288 public void marshal(java.io.Writer out)
289 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
290 {
291
292 Marshaller.marshal(this, out);
293 }
294
295 /***
296 * Method marshal
297 *
298 * @param handler
299 */
300 public void marshal(org.xml.sax.ContentHandler handler)
301 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
302 {
303
304 Marshaller.marshal(this, handler);
305 }
306
307 /***
308 * Sets the value of field 'imageServiceType'. The field
309 * 'imageServiceType' has the following description: The class
310 * of image service: Cutout, Mosaic, Atlas, Pointed
311 *
312 *
313 * @param imageServiceType the value of field 'imageServiceType'
314 */
315 public void setImageServiceType(org.astrogrid.registry.beans.resource.sia.types.ImageServiceTypeType imageServiceType)
316 {
317 this._imageServiceType = imageServiceType;
318 }
319
320 /***
321 * Sets the value of field 'maxFileSize'. The field
322 * 'maxFileSize' has the following description: The maximum
323 * image file size in bytes.
324 *
325 *
326 * @param maxFileSize the value of field 'maxFileSize'.
327 */
328 public void setMaxFileSize(int maxFileSize)
329 {
330 this._maxFileSize = maxFileSize;
331 this._has_maxFileSize = true;
332 }
333
334 /***
335 * Sets the value of field 'maxImageExtent'. The field
336 * 'maxImageExtent' has the following description: The maximum
337 * image query region size, expressed in decimal
338 * degrees. A value of 360 degrees indicates that there is no
339 * limit
340 * and the entire data collection (entire sky) can be
341 * requested.
342 *
343 *
344 * @param maxImageExtent the value of field 'maxImageExtent'.
345 */
346 public void setMaxImageExtent(org.astrogrid.registry.beans.resource.sia.MaxImageExtent maxImageExtent)
347 {
348 this._maxImageExtent = maxImageExtent;
349 }
350
351 /***
352 * Sets the value of field 'maxImageSize'. The field
353 * 'maxImageSize' has the following description: The largest
354 * image (in terms of pixels) that can be requested.
355 *
356 *
357 * @param maxImageSize the value of field 'maxImageSize'.
358 */
359 public void setMaxImageSize(org.astrogrid.registry.beans.resource.sia.MaxImageSize maxImageSize)
360 {
361 this._maxImageSize = maxImageSize;
362 }
363
364 /***
365 * Sets the value of field 'maxQueryRegionSize'. The field
366 * 'maxQueryRegionSize' has the following description: The
367 * maximum image query region size, expressed in decimal
368 * degrees. A value of 360 degrees indicates that there is no
369 * limit
370 * and the entire data collection (entire sky) can be queried.
371 *
372 *
373 *
374 * @param maxQueryRegionSize the value of field
375 * 'maxQueryRegionSize'.
376 */
377 public void setMaxQueryRegionSize(org.astrogrid.registry.beans.resource.sia.MaxQueryRegionSize maxQueryRegionSize)
378 {
379 this._maxQueryRegionSize = maxQueryRegionSize;
380 }
381
382 /***
383 * Sets the value of field 'maxRecords'. The field 'maxRecords'
384 * has the following description: The largest number of records
385 * that the Image Query web
386 * method will return.
387 *
388 *
389 * @param maxRecords the value of field 'maxRecords'.
390 */
391 public void setMaxRecords(int maxRecords)
392 {
393 this._maxRecords = maxRecords;
394 this._has_maxRecords = true;
395 }
396
397 /***
398 * Method unmarshalSimpleImageAccessType
399 *
400 * @param reader
401 */
402 public static org.astrogrid.registry.beans.resource.sia.SimpleImageAccessType unmarshalSimpleImageAccessType(java.io.Reader reader)
403 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
404 {
405 return (org.astrogrid.registry.beans.resource.sia.SimpleImageAccessType) Unmarshaller.unmarshal(org.astrogrid.registry.beans.resource.sia.SimpleImageAccessType.class, reader);
406 }
407
408 /***
409 * Method validate
410 */
411 public void validate()
412 throws org.exolab.castor.xml.ValidationException
413 {
414 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
415 validator.validate(this);
416 }
417
418 }