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.wfsv.response.v1_1_0;
06:
07: import net.opengis.wfs.ResultTypeType;
08: import net.opengis.wfsv.GetLogType;
09: import org.geoserver.ows.util.OwsUtils;
10: import org.geoserver.platform.Operation;
11: import org.geoserver.wfs.WFS;
12: import org.geoserver.wfs.xml.GML3OutputFormat;
13: import org.geoserver.wfs.xml.v1_1_0.WFSConfiguration;
14: import org.vfny.geoserver.global.Data;
15:
16: /**
17: * Variation on the GML3 output format that allows for handling outputs
18: * coming from
19: *
20: */
21: public class GetLogGML3OutputFormat extends GML3OutputFormat {
22: public GetLogGML3OutputFormat(WFS wfs, Data catalog,
23: WFSConfiguration configuration) {
24: super (wfs, catalog, configuration);
25: }
26:
27: /**
28: * Ensures that the operation being executed is a GetFeature operation.
29: * <p>
30: * Subclasses may implement
31: * </p>
32: */
33: public boolean canHandle(Operation operation) {
34: //GetFeature operation?
35: if ("GetLog".equalsIgnoreCase(operation.getId())) {
36: //also check that the resultType is "results"
37: GetLogType request = (GetLogType) OwsUtils.parameter(
38: operation.getParameters(), GetLogType.class);
39:
40: return request.getResultType() == ResultTypeType.RESULTS_LITERAL;
41: }
42:
43: return false;
44: }
45: }
|