Package com.luciad.wms.server
Class ALcdWMSDescribeLayerRequestEncoder
java.lang.Object
com.luciad.wms.server.ALcdWMSDescribeLayerRequestEncoder
- All Implemented Interfaces:
ILcdWMSDescribeLayerRequestEncoder
public abstract class ALcdWMSDescribeLayerRequestEncoder
extends Object
implements ILcdWMSDescribeLayerRequestEncoder
Extension of
ILcdWMSDescribeLayerRequestEncoder
that is capable of sending a
DescribeLayer
response that uses the default content type application/vnd.ogc.wms_xml
defined for WMS 1.1.0 and later, and that complies to the WMS_DescribeLayerResponse DTD defined by the
OGC 02-70 SLD specification.
Implementations of this class must implement
getQueries(com.luciad.wms.server.model.ALcdWMSLayer, TLcdWMSRequestContext)
: if the supplied layer is feature based, this method should return one or more feature types; otherwise,null
may be returned.
getWFS(com.luciad.wms.server.model.ALcdWMSLayer, TLcdWMSRequestContext)
: returns the URL prefix for the WFS that contains the feature data. As this is optional,null
is returned by default.getOWSType(com.luciad.wms.server.model.ALcdWMSLayer, TLcdWMSRequestContext)
: returns the OWS type of the service containing the feature data. As this is optional,null
is returned by default.getOWSURL(com.luciad.wms.server.model.ALcdWMSLayer, TLcdWMSRequestContext)
: returns the OWS URL of the service containing the feature data. As this is optional,null
is returned by default.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
encode
(ALcdWMSLayer[] aWMSLayers, OutputStream aOutputStream, TLcdWMSRequestContext aRequestContext) Encodes the describe layer response a given layer and sends it to the givenOutputStream
.final String
Returns the content MIME type of the encoder.protected String
getOWSType
(ALcdWMSLayer aLayer, TLcdWMSRequestContext aRequestContext) Returns the OWS type of the service containing the feature data.protected String
getOWSURL
(ALcdWMSLayer aLayer, TLcdWMSRequestContext aRequestContext) Returns the OWS base URL of the service containing the feature data.protected abstract String[]
getQueries
(ALcdWMSLayer aLayer, TLcdWMSRequestContext aRequestContext) Returns an array of one or more feature/coverage-types for the given named layer.protected String
getWFS
(ALcdWMSLayer aLayer, TLcdWMSRequestContext aRequestContext) Returns the URL prefix for the WFS containing the feature data.
-
Constructor Details
-
ALcdWMSDescribeLayerRequestEncoder
public ALcdWMSDescribeLayerRequestEncoder()
-
-
Method Details
-
getContentType
Description copied from interface:ILcdWMSDescribeLayerRequestEncoder
Returns the content MIME type of the encoder.- Specified by:
getContentType
in interfaceILcdWMSDescribeLayerRequestEncoder
- Returns:
- the MIME-type as
String
.
-
encode
public final void encode(ALcdWMSLayer[] aWMSLayers, OutputStream aOutputStream, TLcdWMSRequestContext aRequestContext) throws IOException Description copied from interface:ILcdWMSDescribeLayerRequestEncoder
Encodes the describe layer response a given layer and sends it to the givenOutputStream
.- Specified by:
encode
in interfaceILcdWMSDescribeLayerRequestEncoder
- Parameters:
aWMSLayers
- the named Web Map Server layers for which a description is needed.aOutputStream
- theOutputStream
to write the output to.aRequestContext
- a container for the original request and other related request parameters.- Throws:
IOException
- for any I/O Exceptions.
-
getWFS
Returns the URL prefix for the WFS containing the feature data. Note that this method is similar togetOWSURL(com.luciad.wms.server.model.ALcdWMSLayer, TLcdWMSRequestContext)
, as it provides the URL of the service containing the feature data; it is only retained for greater compatibility with the WFS specification. As this is optional,null
is returned by default/.- Parameters:
aLayer
- a named layeraRequestContext
- a container for the original request and other related request parameter- Returns:
- the URL prefix for the WFS containing the feature data, or
null
if not applicable.
-
getOWSType
Returns the OWS type of the service containing the feature data. If defined, this must be eitherWFS
orWCS
. As this is optional,null
is returned by default/.- Parameters:
aLayer
- a named layeraRequestContext
- a container for the original request and other related request parameters- Returns:
- the OWS type of the service, or
null
if not applicable.
-
getOWSURL
Returns the OWS base URL of the service containing the feature data. As this is optional,null
is returned by default/.- Parameters:
aLayer
- a named layer.aRequestContext
- a container for the original request and other related request parameters- Returns:
- the OWS base URL of the service, or
null
if not applicable.
-
getQueries
Returns an array of one or more feature/coverage-types for the given named layer. If the layer is not feature based,null
must be returned.- Parameters:
aLayer
- a named layeraRequestContext
- a container for the original request and other related request parameters- Returns:
- an array of one or more feature/coverage-types for the given named layer, or
null
otherwise.
-