public abstract class ALcdWMSDescribeLayerRequestEncoder extends Object implements ILcdWMSDescribeLayerRequestEncoder
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 and Description |
---|
ALcdWMSDescribeLayerRequestEncoder() |
Modifier and Type | Method and Description |
---|---|
void |
encode(ALcdWMSLayer[] aWMSLayers,
OutputStream aOutputStream,
TLcdWMSRequestContext aRequestContext)
Encodes the describe layer response a given layer and sends it to the given
OutputStream . |
String |
getContentType()
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.
|
public final String getContentType()
ILcdWMSDescribeLayerRequestEncoder
getContentType
in interface ILcdWMSDescribeLayerRequestEncoder
String
.public final void encode(ALcdWMSLayer[] aWMSLayers, OutputStream aOutputStream, TLcdWMSRequestContext aRequestContext) throws IOException
ILcdWMSDescribeLayerRequestEncoder
OutputStream
.encode
in interface ILcdWMSDescribeLayerRequestEncoder
aWMSLayers
- the named Web Map Server layers for which a description is needed.aOutputStream
- the OutputStream
to write the output to.aRequestContext
- a container for the original request and other related request parameters.IOException
- for any I/O Exceptions.protected String getWFS(ALcdWMSLayer aLayer, TLcdWMSRequestContext aRequestContext)
getOWSURL(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/.aLayer
- a named layeraRequestContext
- a container for the original request and other related request parameternull
if not applicable.protected String getOWSType(ALcdWMSLayer aLayer, TLcdWMSRequestContext aRequestContext)
WFS
or WCS
.
As this is optional, null
is returned by default/.aLayer
- a named layeraRequestContext
- a container for the original request and other related request parametersnull
if not applicable.protected String getOWSURL(ALcdWMSLayer aLayer, TLcdWMSRequestContext aRequestContext)
null
is returned by default/.aLayer
- a named layer.aRequestContext
- a container for the original request and other related request parametersnull
if not applicable.protected abstract String[] getQueries(ALcdWMSLayer aLayer, TLcdWMSRequestContext aRequestContext)
null
must be returned.aLayer
- a named layeraRequestContext
- a container for the original request and other related request parametersnull
otherwise.