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.geoserver.wcs;
06:
07: import org.springframework.beans.BeansException;
08: import org.springframework.context.ApplicationContext;
09: import org.springframework.context.ApplicationContextAware;
10: import org.vfny.geoserver.wcs.requests.CoverageRequest;
11: import org.vfny.geoserver.wcs.requests.DescribeRequest;
12: import org.vfny.geoserver.wcs.requests.WCSCapabilitiesRequest;
13: import org.vfny.geoserver.wcs.responses.CoverageResponse;
14: import org.vfny.geoserver.wcs.responses.DescribeResponse;
15: import org.vfny.geoserver.wcs.responses.WCSCapabilitiesResponse;
16: import org.vfny.geoserver.wcs.servlets.Capabilities;
17: import org.vfny.geoserver.wcs.servlets.Coverage;
18: import org.vfny.geoserver.wcs.servlets.Describe;
19:
20: public class DefaultWebCoverageService implements WebCoverageService,
21: ApplicationContextAware {
22: /**
23: * Application context
24: */
25: ApplicationContext context;
26:
27: public void setApplicationContext(ApplicationContext context)
28: throws BeansException {
29: this .context = context;
30: }
31:
32: public WCSCapabilitiesResponse getCapabilities(
33: WCSCapabilitiesRequest request) {
34: Capabilities getCapabilities = (Capabilities) context
35: .getBean("wcsGetCapabilities");
36:
37: return (WCSCapabilitiesResponse) getCapabilities.getResponse();
38: }
39:
40: public DescribeResponse describeCoverage(DescribeRequest request) {
41: Describe describeCoverage = (Describe) context
42: .getBean("wcsDescribeCoverage");
43:
44: return (DescribeResponse) describeCoverage.getResponse();
45: }
46:
47: public CoverageResponse getCoverage(CoverageRequest request) {
48: Coverage getCoverage = (Coverage) context
49: .getBean("wcsGetCoverage");
50:
51: return (CoverageResponse) getCoverage.getResponse();
52: }
53: }
|