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:
06: package org.geoserver.wfsv.response.v1_1_0;
07:
08: import net.opengis.wfs.ResultTypeType;
09: import net.opengis.wfsv.GetLogType;
10:
11: import org.geoserver.ows.util.OwsUtils;
12: import org.geoserver.platform.Operation;
13: import org.geoserver.wfs.WFS;
14: import org.geoserver.wfs.response.GeoJSONOutputFormat;
15:
16: public class GetLogJSONOutputFormat extends GeoJSONOutputFormat {
17:
18: public GetLogJSONOutputFormat(WFS wfs) {
19: super (wfs);
20: }
21:
22: public boolean canHandle(Operation operation) {
23: //GetFeature operation?
24: if ("GetLog".equalsIgnoreCase(operation.getId())) {
25: //also check that the resultType is "results"
26: GetLogType request = (GetLogType) OwsUtils.parameter(
27: operation.getParameters(), GetLogType.class);
28:
29: return request.getResultType() == ResultTypeType.RESULTS_LITERAL;
30: }
31:
32: return false;
33: }
34:
35: }
|