org.geotools.data.wfs.v1_1_0
Interface WFSStrategy

All Known Implementing Classes:
CubeWerxStrategy, DefaultWFSStrategy, GeoServerStrategy, IonicStrategy

public interface WFSStrategy

An interface to allow plugging different strategy objects into a WFSDataStore to take care of specific WFS implementations limitations or deviations from the spec.

Since:
2.6
Version:
$Id: WFSStrategy.java 31915 2008-11-24 19:48:07Z groldan $
Author:
Gabriel Roldan (OpenGeo)
See Also:
WFSDataStoreFactory, DefaultWFSStrategy, CubeWerxStrategy

Nested Class Summary
static class WFSStrategy.RequestComponents
          Holds the components needed by the data store to issue and post process a GetFeature request.
 
Method Summary
 WFSStrategy.RequestComponents createGetFeatureRequest(WFSProtocol wfs, GetFeature request)
          Creates a GetFeature request that the server implementation this strategy works upon can deal with, and returns both the appropriate request to send to the server as well as the Filter that should be post processed at runtime once the server response is obtained, in order to match the actual query.
 java.lang.String getDefaultOutputFormat(WFSProtocol wfs, WFSOperationType operation)
          Returns the protocol default output format name for the WFS version the implementation talks.
 Configuration getWfsConfiguration()
          Returns an xml configuration suitable to parse/encode wfs documents appropriate for the server.
 org.opengis.filter.Filter[] splitFilters(Capabilities filterCaps, org.opengis.filter.Filter filter)
           
 boolean supportsGet()
          A simple means to specify whether GET requests are supported between the server and the client.
 boolean supportsPost()
          A simple means to specify whether POST requests are supported between the server and the client.
 

Method Detail

supportsPost

boolean supportsPost()
A simple means to specify whether POST requests are supported between the server and the client. Regardless of the server supporting the method or not there might be other sort of inconvenients (technical?) that prevents us from using a given method at all, but generally this should just return true

Returns:
whether we can send POST requests to the server

supportsGet

boolean supportsGet()
A simple means to specify whether GET requests are supported between the server and the client. Regardless of the server supporting the method or not there might be other sort of inconvenients (technical?) that prevents us from using a given method at all, but generally this should just return true

Returns:
whether we can send GET requests to the server

getWfsConfiguration

Configuration getWfsConfiguration()
Returns an xml configuration suitable to parse/encode wfs documents appropriate for the server.

Note: most of the time it will just be WFSConfiguration, but it may be possible, for example, an strategy needs to override some bindings.

Returns:
a WFS xml Configuration

getDefaultOutputFormat

java.lang.String getDefaultOutputFormat(WFSProtocol wfs,
                                        WFSOperationType operation)
Returns the protocol default output format name for the WFS version the implementation talks.

Parameters:
operation -
Returns:
the default output format name for the given operation for the protocol version

splitFilters

org.opengis.filter.Filter[] splitFilters(Capabilities filterCaps,
                                         org.opengis.filter.Filter filter)

createGetFeatureRequest

WFSStrategy.RequestComponents createGetFeatureRequest(WFSProtocol wfs,
                                                      GetFeature request)
                                                      throws java.io.IOException
Creates a GetFeature request that the server implementation this strategy works upon can deal with, and returns both the appropriate request to send to the server as well as the Filter that should be post processed at runtime once the server response is obtained, in order to match the actual query.

Parameters:
wfs - the WFS protocol handler from which the strategy may need to grab some feature type metadata not available through the datastore interface, or even perform some test request.
request - the GetFeature query to create the server request and post-processing filter for
outputFormat - the output format indentifier that the request needs to be sent for. Shall be supported by the server for the requested feature type.
Returns:
a handle to the request and post-processing filter appropriate to attend the given query
Throws:
java.io.IOException


Copyright © 1996-2010 Geotools. All Rights Reserved.