public abstract class WFSStrategy extends Specification
Implementations of this interface know how to send and get information back from a WFS service
for a specific protocol version, but are not meant to provide any logic other than the
conversation with the service. For instance, WFSProtocol
implementations are not required
to transform filters
to something appropriate for the service capabilities, nor
any other control logic than creating and sending the requests mapping what is given to the
operation methods.
This interface provides enough information extracted or derived from the WFS capabilities document as for the client code to issue requests appropriate for the server capabilities.
Constructor and Description |
---|
WFSStrategy() |
Modifier and Type | Method and Description |
---|---|
abstract URL |
buildUrlGET(WFSRequest request) |
abstract void |
dispose()
Allows to free any resource held.
|
abstract List<String> |
getClientSupportedOutputFormats(WFSOperationType operation) |
abstract WFSConfig |
getConfig() |
abstract String |
getDefaultOutputFormat(WFSOperationType operation) |
abstract FeatureTypeInfo |
getFeatureTypeInfo(QName typeName)
Returns the feature type metadata object parsed from the capabilities document for the given
typeName |
abstract Set<QName> |
getFeatureTypeNames()
Returns the set of type names as extracted from the capabilities document, including the
namespace and prefix.
|
abstract Map<QName,Class<?>> |
getFieldTypeMappings()
Provide additional field type mappings
|
abstract FilterCapabilities |
getFilterCapabilities()
Returns the parsed version of the FilterCapabilities section in the capabilities document
|
abstract URL |
getOperationURL(WFSOperationType operation,
HttpMethod method)
Returns the URL for the given operation name and HTTP protocol as stated in the WFS
capabilities.
|
abstract InputStream |
getPostContents(WFSRequest wfsRequest)
Returns the input stream with the POST body contents for the given request.
|
abstract String |
getPostContentType(WFSRequest wfsRequest) |
abstract Set<String> |
getServerSupportedOutputFormats(QName typeName,
WFSOperationType operation) |
abstract Set<String> |
getServerSupportedOutputFormats(WFSOperationType operation) |
abstract WFSServiceInfo |
getServiceInfo() |
abstract Version |
getServiceVersion()
Returns the WFS protocol version this facade talks to the WFS instance.
|
abstract Set<String> |
getSupportedCRSIdentifiers(QName typeName)
Returns the union of the default CRS and the other supported CRS's of the given feature type
as declared in the corresponding FeatureType element in the capabilities document, as well as
any globally supported CRS identifier declared as a parameter of the GetFeature oepration in
the capabilities document.
|
abstract Configuration |
getWfsConfiguration() |
String |
newRequestHandle(WFSOperationType operation) |
abstract void |
setCapabilities(WFSGetCapabilities capabilities) |
abstract void |
setConfig(WFSConfig config) |
abstract Filter[] |
splitFilters(QName typeName,
Filter filter)
Splits the filter provided by the geotools query into the server supported and unsupported
ones.
|
abstract boolean |
supports(GetFeatureRequest.ResultType resultType) |
abstract boolean |
supportsOperation(WFSOperationType operation,
HttpMethod method)
Returns whether the service supports the given operation for the given HTTP method.
|
abstract boolean |
supportsTransaction(QName typeName) |
createGetCapabilitiesRequest, getVersion
public abstract void setCapabilities(WFSGetCapabilities capabilities)
public abstract void setConfig(WFSConfig config)
public abstract FeatureTypeInfo getFeatureTypeInfo(QName typeName)
typeName
typeName
- the typeName as stated in the capabilities FeatureTypeList
to get the
info fortypeName
IllegalArgumentException
- if typeName
is not the name of a FeatureType stated
in the capabilities document.public abstract WFSConfig getConfig()
public abstract Version getServiceVersion()
public abstract Set<String> getServerSupportedOutputFormats(WFSOperationType operation)
public abstract Set<String> getServerSupportedOutputFormats(QName typeName, WFSOperationType operation)
typeName
- the feature type name for which to return the supported output formatspublic abstract List<String> getClientSupportedOutputFormats(WFSOperationType operation)
public abstract Set<QName> getFeatureTypeNames()
public abstract FilterCapabilities getFilterCapabilities()
FilterCapabilities
out of the FilterCapabilities section in the
getcapabilities documentpublic abstract Filter[] splitFilters(QName typeName, Filter filter)
typeName
- org.geotools.data.wfs.internal.WFSStrategy#splitFilters(org.opengis.filter.Filter)
public abstract boolean supportsOperation(WFSOperationType operation, HttpMethod method)
operation
- the operation to check if the server supportsmethod
- the HTTP method to check if the server supports for the given operationtrue
if the operation/method is supported as stated in the WFS capabilitiespublic abstract boolean supports(GetFeatureRequest.ResultType resultType)
public abstract boolean supportsTransaction(QName typeName)
public abstract URL getOperationURL(WFSOperationType operation, HttpMethod method)
operation
- the name of the WFS operationmethod
- the HTTP methodnull
if the
capabilities does not declare an access point for the operation/method combinationsupportsOperation(WFSOperationType, HttpMethod)
public abstract Set<String> getSupportedCRSIdentifiers(QName typeName)
typeName
- the featuretype name as declared in the FeatureType/Name element of the WFS
capabilitiespublic abstract void dispose()
Successive calls to this method should not result in any exception, but the instance is meant to not be usable after the first invocation.
public abstract String getDefaultOutputFormat(WFSOperationType operation)
public abstract URL buildUrlGET(WFSRequest request)
public abstract String getPostContentType(WFSRequest wfsRequest)
public abstract InputStream getPostContents(WFSRequest wfsRequest) throws IOException
IOException
public abstract WFSServiceInfo getServiceInfo()
public abstract Configuration getWfsConfiguration()
public String newRequestHandle(WFSOperationType operation)
Copyright © 1996–2019 Geotools. All rights reserved.