|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectWFS_1_1_0_Protocol
public class WFS_1_1_0_Protocol
WFSProtocol implementation to talk to a WFS 1.1.0 server leveraging the GeoTools xml-xsd subsystem for schema assisted parsing and encoding of WFS requests and responses.
| Field Summary | |
|---|---|
protected Charset |
defaultEncoding
|
protected HTTPClient |
http
|
| Constructor Summary | |
|---|---|
WFS_1_1_0_Protocol(InputStream capabilitiesReader,
HTTPClient http,
Charset defaultEncoding)
|
|
| Method Summary | |
|---|---|
WFSResponse |
describeFeatureTypeGET(String typeName,
String outputFormat)
Issues a DescribeFeatureType request for the given type name and output format using the HTTP GET method |
WFSResponse |
describeFeatureTypePOST(String typeName,
String outputFormat)
Issues a DescribeFeatureType request for the given type name and output format using the HTTP POST method |
void |
dispose()
Allows to free any resource held. |
static void |
encode(EObject request,
Configuration configuration,
OutputStream out,
Charset charset)
Encodes a WFS request into out |
String |
getDefaultCRS(String typeName)
Returns the CRS identifier of the default CRS for the given feature type as declared in the corresponding FeatureType element in the capabilities document. |
String |
getDefaultOutputFormat(WFSOperationType operation)
|
URL |
getDescribeFeatureTypeURLGet(String typeName)
Returns the http GET request to get the gml schema for the given type name |
String |
getFeatureTypeAbstract(String typeName)
Returns the abstract of the given feature type as declared in the corresponding FeatureType element in the capabilities document. |
Set<String> |
getFeatureTypeKeywords(String typeName)
Returns the list of keywords of the given feature type as declared in the corresponding FeatureType element in the capabilities document. |
QName |
getFeatureTypeName(String typeName)
Returns the full feature type name for the typeName as declared in the FeatureTypeList/FeatureType/Name element of the capabilities document. |
Set<QName> |
getFeatureTypeNames()
Returns the set of type names as extracted from the capabilities document, including the namespace and prefix. |
String |
getFeatureTypeTitle(String typeName)
Returns the title of the given feature type as declared in the corresponding FeatureType element in the capabilities document. |
ReferencedEnvelope |
getFeatureTypeWGS84Bounds(String typeName)
Returns the lat lon envelope of the given feature type as declared in the corresponding FeatureType element in the capabilities document. |
FilterCapabilities |
getFilterCapabilities()
Returns the parsed version of the FilterCapabilities section in the capabilities document |
URL |
getOperationURL(WFSOperationType operation,
boolean post)
Returns the URL for the given operation name and HTTP protocol as stated in the WFS capabilities. |
String |
getServiceAbstract()
Returns service abstract as stated in the capabilities document |
Set<String> |
getServiceKeywords()
Returns service keywords as stated in the capabilities document |
URI |
getServiceProviderUri()
Returns service provider URI as stated in the capabilities document |
String |
getServiceTitle()
Returns service title as stated in the capabilities document |
Version |
getServiceVersion()
Returns the WFS protocol version this facade talks to the WFS instance. |
Set<String> |
getSupportedCRSIdentifiers(String 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. |
Set<String> |
getSupportedGetFeatureOutputFormats()
Returns the output format names declared in the GetFeature operation metadata section of the WFS capabilities document |
Set<String> |
getSupportedOutputFormats(String typeName)
Returns the union of WFSProtocol.getSupportedGetFeatureOutputFormats() and the output formats
declared for the feature type specifically in the FeatureTypeList section of the capabilities
document for the given feature type |
SimpleFeatureType |
issueDescribeFeatureTypeGET(String prefixedTypeName,
CoordinateReferenceSystem crs)
|
WFSResponse |
issueGetFeatureGET(GetFeature request)
Issues a GetFeature request for the given request, using GET HTTP method The request shall already be adapted to what the server supports in terms of filter
capabilities and CRS reprojection. |
WFSResponse |
issueGetFeaturePOST(GetFeature request)
Issues a GetFeature request for the given request, using POST HTTP method The query to WFS request parameter translation is the same than for WFSProtocol.issueGetFeatureGET(GetFeature)
|
protected WFSCapabilitiesType |
parseCapabilities(InputStream capabilitiesReader)
|
void |
setStrategy(WFSStrategy strategy)
|
Filter[] |
splitFilters(Filter filter)
|
boolean |
supportsOperation(WFSOperationType operation,
boolean post)
Returns whether the service supports the given operation for the given HTTP method. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected HTTPClient http
protected final Charset defaultEncoding
| Constructor Detail |
|---|
public WFS_1_1_0_Protocol(InputStream capabilitiesReader,
HTTPClient http,
Charset defaultEncoding)
throws IOException
IOException| Method Detail |
|---|
public void setStrategy(WFSStrategy strategy)
public Version getServiceVersion()
WFSProtocol
getServiceVersion in interface WFSProtocolVersion.v1_1_0WFSProtocol.getServiceVersion()public String getServiceTitle()
WFSProtocol
getServiceTitle in interface WFSProtocolWFSProtocol.getServiceTitle()public String getServiceAbstract()
WFSProtocol
getServiceAbstract in interface WFSProtocolnullWFSProtocol.getServiceAbstract()public Set<String> getServiceKeywords()
WFSProtocol
getServiceKeywords in interface WFSProtocolWFSProtocol.getServiceKeywords()public URI getServiceProviderUri()
WFSProtocol
getServiceProviderUri in interface WFSProtocolWFSProtocol.getServiceProviderUri()public Set<String> getSupportedGetFeatureOutputFormats()
WFSProtocol
getSupportedGetFeatureOutputFormats in interface WFSProtocolWFSProtocol.getSupportedGetFeatureOutputFormats()public Set<String> getSupportedOutputFormats(String typeName)
WFSProtocolWFSProtocol.getSupportedGetFeatureOutputFormats() and the output formats
declared for the feature type specifically in the FeatureTypeList section of the capabilities
document for the given feature type
getSupportedOutputFormats in interface WFSProtocoltypeName - the feature type name for which to return the supported output formats
typeNameWFSProtocol.getSupportedOutputFormats(String)public Set<QName> getFeatureTypeNames()
WFSProtocol
getFeatureTypeNames in interface WFSProtocolWFSProtocol.getFeatureTypeNames()public QName getFeatureTypeName(String typeName)
WFSProtocoltypeName as declared in the FeatureTypeList/FeatureType/Name element of the capabilities document.
The returned QName contains the namespace, localname as well as the prefix. typeName
is known to be prefix:localName.
getFeatureTypeName in interface WFSProtocoltypeName - the prefixed type name to get the full name for
WFSProtocol.getFeatureTypeName(String)public FilterCapabilities getFilterCapabilities()
WFSProtocol
getFilterCapabilities in interface WFSProtocolFilterCapabilities out of the FilterCapabilities section in the
getcapabilities documentWFSProtocol.getFilterCapabilities()
public boolean supportsOperation(WFSOperationType operation,
boolean post)
WFSProtocol
supportsOperation in interface WFSProtocoloperation - the operation to check if the server supports
true if the operation/method is supported as stated in the WFS capabilitiesWFSProtocol.supportsOperation(WFSOperationType, boolean)
public URL getOperationURL(WFSOperationType operation,
boolean post)
WFSProtocol
getOperationURL in interface WFSProtocoloperation - the name of the WFS operation
null if the
capabilities does not declare an access point for the operation/method combinationWFSProtocol.getOperationURL(WFSOperationType, boolean)public String getFeatureTypeTitle(String typeName)
WFSProtocol
getFeatureTypeTitle in interface WFSProtocoltypeName - the featuretype name as declared in the FeatureType/Name element of the WFS
capabilities
WFSProtocol.getFeatureTypeTitle(String)public String getFeatureTypeAbstract(String typeName)
WFSProtocol
getFeatureTypeAbstract in interface WFSProtocoltypeName - the featuretype name as declared in the FeatureType/Name element of the WFS
capabilities
WFSProtocol.getFeatureTypeAbstract(String)public ReferencedEnvelope getFeatureTypeWGS84Bounds(String typeName)
WFSProtocol
getFeatureTypeWGS84Bounds in interface WFSProtocoltypeName - the featuretype name as declared in the FeatureType/Name element of the WFS
capabilities
WFSProtocol.getFeatureTypeWGS84Bounds(String)public String getDefaultCRS(String typeName)
WFSProtocol
getDefaultCRS in interface WFSProtocoltypeName - the featuretype name as declared in the FeatureType/Name element of the WFS
capabilities
WFSProtocol.getDefaultCRS(String)public Set<String> getSupportedCRSIdentifiers(String typeName)
WFSProtocol
getSupportedCRSIdentifiers in interface WFSProtocoltypeName - the featuretype name as declared in the FeatureType/Name element of the WFS
capabilities
WFSProtocol.getSupportedCRSIdentifiers(String)public Set<String> getFeatureTypeKeywords(String typeName)
WFSProtocol
getFeatureTypeKeywords in interface WFSProtocoltypeName - the featuretype name as declared in the FeatureType/Name element of the WFS
capabilities
WFSProtocol.getFeatureTypeKeywords(String)public URL getDescribeFeatureTypeURLGet(String typeName)
WFSProtocol
getDescribeFeatureTypeURLGet in interface WFSProtocolWFSProtocol.getDescribeFeatureTypeURLGet(String)
public WFSResponse describeFeatureTypeGET(String typeName,
String outputFormat)
throws IOException
WFSProtocol
describeFeatureTypeGET in interface WFSProtocolIOExceptionWFSProtocol.describeFeatureTypeGET(String, String)
public WFSResponse describeFeatureTypePOST(String typeName,
String outputFormat)
throws IOException
WFSProtocol
describeFeatureTypePOST in interface WFSProtocolIOExceptionWFSProtocol.describeFeatureTypePOST(String, String)
public WFSResponse issueGetFeatureGET(GetFeature request)
throws IOException
WFSProtocol
The request shall already be adapted to what the server supports in terms of filter
capabilities and CRS reprojection. The WFSProtocol implementation is not required to
check if the query filter is fully supported nor if the CRS is supported for the feature
type.
issueGetFeatureGET in interface WFSProtocolrequest - the request to send to the WFS, as is.
IOExceptionWFSProtocol#issueGetFeatureGET(GetFeatureType, Map)
public WFSResponse issueGetFeaturePOST(GetFeature request)
throws IOException
WFSProtocol
The query to WFS request parameter translation is the same than for
WFSProtocol.issueGetFeatureGET(GetFeature)
issueGetFeaturePOST in interface WFSProtocolIOExceptionWFSProtocol#getFeaturePOST(Query, String)public void dispose()
WFSProtocolSuccessive calls to this method should not result in any exception, but the instance is meant to not be usable after the first invocation.
dispose in interface WFSProtocolWFSProtocol.dispose()
protected WFSCapabilitiesType parseCapabilities(InputStream capabilitiesReader)
throws IOException
IOException
public static void encode(EObject request,
Configuration configuration,
OutputStream out,
Charset charset)
throws IOException
out
request - one of GetCapabilitiesType, GetFeatureType, etcconfiguration - the wfs configuration to use for encoding the request into the output streamout - the output stream where to encode the request intocharset - the charset to use to encode the request in
IOExceptionpublic String getDefaultOutputFormat(WFSOperationType operation)
getDefaultOutputFormat in interface WFSProtocolpublic Filter[] splitFilters(Filter filter)
splitFilters in interface WFSProtocol
public SimpleFeatureType issueDescribeFeatureTypeGET(String prefixedTypeName,
CoordinateReferenceSystem crs)
throws IOException
issueDescribeFeatureTypeGET in interface WFSProtocolIOExceptionWFSProtocol.issueDescribeFeatureTypeGET(java.lang.String, org.opengis.referencing.crs.CoordinateReferenceSystem)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||