01: /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org. All rights reserved.
02: * This code is licensed under the GPL 2.0 license, availible at the root
03: * application directory.
04: */
05: package org.vfny.geoserver.wcs.requests;
06:
07: import org.vfny.geoserver.Request;
08: import org.vfny.geoserver.global.GeoServer;
09: import org.vfny.geoserver.global.WCS;
10: import org.vfny.geoserver.wcs.servlets.WCService;
11:
12: /**
13: * DOCUMENT ME!
14: *
15: * @author $Author: Alessio Fabiani (alessio.fabiani@gmail.com) $ (last modification)
16: * @author $Author: Simone Giannecchini (simboss1@gmail.com) $ (last modification)
17: */
18: public class WCSRequest extends Request {
19: public static final String WCS_SERVICE_TYPE = "WCS";
20:
21: /**
22: * A WCSRequest configured with WCS_SERVICE_TYPE
23: */
24: public WCSRequest(String requestType, WCService service) {
25: super (WCS_SERVICE_TYPE, requestType, service);
26: }
27:
28: /**
29: * Sets the wcs service object.
30: */
31: public void setWCService(WCService wcs) {
32: setServiceRef(wcs);
33: }
34:
35: /**
36: * Returns the wcs service object..
37: */
38: public WCService getWCService() {
39: return (WCService) getServiceRef();
40: }
41:
42: /**
43: * Convenience method for obtaining the global wcs service instance.
44: */
45: public WCS getWCS() {
46: return getWCService().getWCS();
47: }
48:
49: /**
50: * Convenience method for obtaining the global geoserver instance.
51: */
52: public GeoServer getGeoServer() {
53: GeoServer gs = getWCS().getGeoServer();
54:
55: return gs;
56: }
57: }
|