public class TLcdOGCWMSCommandDispatcher extends ALcdWMSCommandDispatcher
The protocol versions supported are:
The implemented OpenGIS WMS REQUEST parameter values are :
GetMap
, GetFeatureInfo
,
GetCapabilities
), this command dispatcher provides also support for
the optional GetLegendGraphic
and DescribeLayer
requests.
The SLD support is enabled by configuring the property enableSldSupport
.
Enabling support for user defined styles is done through configuration of the property enableUserStyleSupport
.
Overwrite the method handleUnknownCommand
to extend the REQUEST command handling.
When a invalid request is received, a TLcdWMSServiceException is thrown and sends an XML report with the exception. as defined in the specifications.
Constructor and Description |
---|
TLcdOGCWMSCommandDispatcher()
Default constructor.
|
TLcdOGCWMSCommandDispatcher(TLcdDataModel[] aDataModels)
Creates a new
TLcdOGCWMSCommandDispatcher instance,
configured with a list of TLcdDataModel instances. |
Modifier and Type | Method and Description |
---|---|
protected void |
addGXYLayers(javax.servlet.http.HttpServletRequest aHttpServletRequest,
String[] aLayerList,
String[] aStyleList,
TLcdSLDStyledLayerDescriptor aStyledLayerDescriptor,
TLcdGXYViewBufferedImage aGXYView)
Creates the necessary layers based on the specified layer list, style list and/or styled layer descriptor, and adds them to the view.
|
protected void |
addGXYLayers(javax.servlet.http.HttpServletRequest aHttpServletRequest,
String aLayerList,
String aStyleList,
TLcdGXYViewBufferedImage aGXYView)
Creates the layers from the list with the styles and add it to the view.
|
void |
addGXYViewEncoder(ILcdGXYViewEncoder aGXYViewEncoder)
Adds a
ILcdGXYViewEncoder implementation for encoding views into
a specific format, specified by their MIME-TYPE. |
void |
addSLDWMSGXYLayerFactory(ALcdSLDWMSGXYLayerFactory aSLDWMSGXYLayerFactory)
Adds a
ALcdSLDWMSGXYLayerFactory to create a ILcdGXYLayer for SLD layers. |
void |
addWMSDescribeLayerEncoder(ILcdWMSDescribeLayerRequestEncoder aWMSDescribeLayerEncoder)
Adds a
ILcdWMSDescribeLayerRequestEncoder implementation for creating and encoding
describe layer responses into a specific format, specified by their MIME-TYPE. |
void |
addWMSFeatureInfoEncoder(ILcdWMSFeatureInfoRequestEncoder aWMSFeatureInfoEncoder)
Adds a
ILcdWMSFeatureInfoRequestEncoder implementation for encoding
selection on views into a specific format, specified by their MIME-TYPE. |
void |
addWMSGetFeatureInfoEncoder(ILcdWMSGetFeatureInfoRequestEncoder aWMSGetFeatureInfoEncoder)
Adds a
ILcdWMSGetFeatureInfoRequestEncoder implementation for encoding
selection on views into a specific format, specified by their MIME-TYPE. |
void |
addWMSGetLegendGraphicEncoder(ILcdWMSGetLegendGraphicRequestEncoder aWMSGetLegendGraphicEncoder)
Adds a
ILcdWMSGetLegendGraphicRequestEncoder implementation for encoding
legend graphics into a specific format, specified by their MIME-TYPE. |
void |
addWMSGXYLayerFactory(ILcdWMSGXYLayerFactory aWMSGXYLayerFactory)
Adds a
ILcdWMSGXYLayerFactory to create a ILcdGXYLayer
for a ALcdWMSLayer . |
void |
addXYWorldReferenceParser(ILcdXYWorldReferenceParser aXYWorldReferenceParser)
Adds a
ILcdXYWorldReferenceParser to parse a ILcdXYWorldReference
from a given text encoding. |
protected void |
clearGXYView(TLcdGXYViewBufferedImage aGXYView)
Method called to clear the initialized view.
|
void |
dispose()
Disposes of this object and allows it to release any system resources that it is holding.
|
protected void |
exportFeatureInfo(TLcdGXYViewBufferedImage aGXYView,
javax.servlet.http.HttpServletRequest aRequest,
javax.servlet.http.HttpServletResponse aResponse,
ILcdGXYLayerSubsetList aSelectionSublist)
Encodes the given selection in the
ILcdGXYLayerSubsetList from a given ILcdGXYView
and sends it to the client. |
protected void |
exportGXYView(TLcdGXYViewBufferedImage aGXYView,
javax.servlet.http.HttpServletRequest aRequest,
javax.servlet.http.HttpServletResponse aResponse)
Encodes a given
TLcdGXYViewBufferedImage to the format specified in the HttpServletRequest and
sends the encoded result to the HttpServletResponse . |
protected ALcdSLDWMSGXYLayerFactory |
getCompositeSLDWMSGXYLayerFactory()
Returns a composite SLD WMS layer factory, containing all the registered
ALcdSLDWMSGXYLayerFactory instances. |
protected ILcdWMSGXYLayerFactory |
getCompositeWMSGXYLayerFactory()
Returns a composite WMS layer factory, containing all the registered
ILcdWMSGXYLayerFactory instances. |
ILcdModelProvider |
getModelProvider()
The
ILcdModelProvider that is currently used by the command dispatcher. |
ILcdRemoteOWSModelProvider |
getRemoteOWSModelProvider()
The
ILcdRemoteOWSModelProvider that is currently used by the command dispatcher. |
ILcdWMSSLDFeatureTypeStyleProvider |
getSLDFeatureTypeStyleProvider()
The
ILcdSLDFeatureTypeStyleProvider that is currently used by the command dispatcher. |
ALcdWMSCapabilities |
getWMSCapabilities()
Deprecated.
Please make use of
ILcdWMSCapabilitiesProvider . |
protected ALcdWMSCapabilities |
getWMSCapabilities(javax.servlet.http.HttpServletRequest aHttpServletRequest)
Deprecated.
Please make use of
ILcdWMSCapabilitiesProvider . |
ILcdWMSCapabilitiesProvider |
getWMSCapabilitiesProvider()
Returns the WMS capabilities provider.
|
ILcdWMSCapabilitiesUpdater |
getWMSCapabilitiesUpdater()
Returns the currently active capabilities updater.
|
ILcdWMSOnlineResourceResolver |
getWMSOnlineResourceResolver()
Returns the online resource resolver used to retrieve the paths (typically an URL)
to online resources defined in WMS responses (e.g. in the capabilities).
|
void |
handleRequest(javax.servlet.http.HttpServletRequest aRequest,
javax.servlet.http.HttpServletResponse aResponse)
This method receives a request and handles it.
|
protected void |
handleUnknownCommand(javax.servlet.http.HttpServletRequest aRequest,
javax.servlet.http.HttpServletResponse aResponse)
This method handles unknown request ( not GetFeatureInfo, GetCapabilities or capabilities, GetMap or map).
|
protected void |
handleWMSServiceException(TLcdWMSServiceException aWMSServiceException,
javax.servlet.http.HttpServletRequest aHttpServletRequest,
javax.servlet.http.HttpServletResponse aHttpServletResponse)
This method handles what should be done in case a
TLcdWMSServiceException had occurred. |
protected void |
initialiseGXYView(TLcdGXYViewBufferedImage aGXYViewSFCT,
javax.servlet.http.HttpServletRequest aHttpServletRequest)
Initialise the view based on the parameter values of the request.
|
boolean |
isEnableUserStyleSupport()
Returns whether the command dispatcher should support user styling of layers.
|
protected void |
loadGXYLayerArraySFCT(ALcdWMSLayer[] aWmsLayers,
String[] aStyles,
TLcdGXYViewBufferedImage aGXYView,
javax.servlet.http.HttpServletRequest aHttpServletRequest)
This method is subject to changes, and should therefore not be used!
The current implementation takes the following steps:
for each
ALcdWMSLayer , a model is retrieved via the getModel method of the model provider . |
protected ILcdXYWorldReference |
parseXYWorldReference(String aXYWorldReferenceAsString)
Converts the value of the text representation into a
ILcdXYWorldReference
using the ILcdXYWorldReferenceParser objects of this command dispatcher. |
protected ILcdGXYLayerSubsetList |
performSelectionAt(int aX,
int aY,
int aFeatureCount,
Vector aGXYLayerList,
ILcdGXYView aGXYViewSFCT,
javax.servlet.http.HttpServletRequest aHttpServletRequest)
Performs a selection on the given view and set of layers, and returns the selected objects
as a
ILcdGXYLayerSubsetList . |
protected ILcdGXYLayerSubsetList |
performSelectionInBounds(int aX,
int aY,
int aSelectionWidth,
int aSelectionHeight,
int aFeatureCount,
Vector aGXYLayerList,
ILcdGXYView aGXYViewSFCT,
javax.servlet.http.HttpServletRequest aHttpServletRequest)
Performs a selection on the given view and set of layers, and returns the selected objects
as a
ILcdGXYLayerSubsetList . |
void |
setEnableUserStyleSupport(boolean aEnableUserStyleSupport)
Controls whether the command dispatcher should support user styling of layers.
|
void |
setModelProvider(ILcdModelProvider aModelProvider)
Sets a
ILcdModelProvider to be used within the command dispatcher
to obtain a model for a source. |
void |
setRemoteOWSModelProvider(ILcdRemoteOWSModelProvider aRemoteOWSModelProvider)
Sets a
ILcdRemoteOWSModelProvider to be used within the command dispatcher
to obtain a model for a user-defined layer. |
void |
setSLDFeatureTypeStyleProvider(ILcdWMSSLDFeatureTypeStyleProvider aSLDFeatureTypeStyleProvider)
Sets a
ILcdSLDFeatureTypeStyleProvider to be used within the command dispatcher
to obtain SLD feature type styles for a WMS layer if no feature type style is included in the request. |
void |
setWMSCapabilities(ALcdWMSCapabilities aCapabilities)
Deprecated.
|
void |
setWMSCapabilitiesProvider(ILcdWMSCapabilitiesProvider aWMSCapabilitiesProvider)
Sets the WMS capabilities provider.
|
void |
setWMSCapabilitiesUpdater(ILcdWMSCapabilitiesUpdater aCapabilitiesUpdater)
Sets a capabilities updater.
|
void |
setWMSOnlineResourceResolver(ILcdWMSOnlineResourceResolver aWMSOnlineResourceResolver)
Sets the online resource resolver used to retrieve the paths (typically an URL)
to online resources defined in WMS responses (e.g. in the capabilities).
|
getGXYView, getGXYViewPoolSize, getParameterIgnoreCase, isClassTraceOn, performSelectionAt, performSelectionInBounds, returnGXYView, setClassTraceOn, setGXYViewPoolSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public TLcdOGCWMSCommandDispatcher()
public TLcdOGCWMSCommandDispatcher(TLcdDataModel[] aDataModels)
TLcdOGCWMSCommandDispatcher
instance,
configured with a list of TLcdDataModel
instances.
These data models are used for decoding XML data in requests.
By default, the WMS XML request decoder is already configured with the data models required to parse regular WMS requests, with/without the use of SLD.
However, when using inline features in an SLD WMS request (e.g., AIXM 5.1 features), it is necessary that the decoder also knows the data model(s) that describe this feature data. These data models can be supplied through this constructor.
aDataModels
- a list of data models to decode SLD inline feature datapublic void addGXYViewEncoder(ILcdGXYViewEncoder aGXYViewEncoder)
ILcdGXYViewEncoder
implementation for encoding views into
a specific format, specified by their MIME-TYPE.
Note that there can be only one encoder for a specific MIME-TYPE.
Note that added implementations can be called for multiple simultaneous requests
and thus should be thread safe!aGXYViewEncoder
- the ILcdGXYViewEncoder
implementation to add.public void addWMSFeatureInfoEncoder(ILcdWMSFeatureInfoRequestEncoder aWMSFeatureInfoEncoder)
ILcdWMSFeatureInfoRequestEncoder
implementation for encoding
selection on views into a specific format, specified by their MIME-TYPE.
Note that there can be only one encoder for a specific MIME-TYPE.
It is important to note that added implementations can be called for multiple simultaneous requests
and thus should be thread safe!
Note that there is a similar interface to ILcdWMSFeatureInfoRequestEncoder
,
namely ILcdWMSGetFeatureInfoRequestEncoder
, which is used for the same purpose but
offers access to extra information related to the current request.
The method addWMSGetFeatureInfoEncoder(ServletConfig)
can be used to register implementations of this method. Registered objects of the type
ILcdWMSGetFeatureInfoRequestEncoder
will have precedence above the objects of the type
ILcdWMSFeatureInfoRequestEncoder
, if they have the same MIME type.aWMSFeatureInfoEncoder
- the ILcdWMSFeatureInfoRequestEncoder
implementation to add.public void addWMSGetFeatureInfoEncoder(ILcdWMSGetFeatureInfoRequestEncoder aWMSGetFeatureInfoEncoder)
ILcdWMSGetFeatureInfoRequestEncoder
implementation for encoding
selection on views into a specific format, specified by their MIME-TYPE.
Note that there can be only one encoder for a specific MIME-TYPE.
It is important to note that added implementations can be called for multiple simultaneous requests
and thus should be thread safe!
Note that there is a similar interface to ILcdWMSGetFeatureInfoRequestEncoder
,
namely ILcdWMSFeatureInfoRequestEncoder
, which is used for the same purpose but
doesn't provide access to information related to the current request. This information
can be useful while encoding GetFeatureInfo
responses.
Registered objects of the type ILcdWMSGetFeatureInfoRequestEncoder
will have precedence
above the objects of the type ILcdWMSFeatureInfoRequestEncoder
, if they have the same MIME type.aWMSGetFeatureInfoEncoder
- the ILcdWMSGetFeatureInfoRequestEncoder
implementation to add.public ILcdWMSOnlineResourceResolver getWMSOnlineResourceResolver()
setWMSOnlineResourceResolver(com.luciad.wms.server.ILcdWMSOnlineResourceResolver)
public void setWMSOnlineResourceResolver(ILcdWMSOnlineResourceResolver aWMSOnlineResourceResolver)
aWMSOnlineResourceResolver
- the online resource resolver used to retrieve the paths (typically an URL)
to online resources defined in WMS responses (e.g. in the capabilities).getWMSOnlineResourceResolver()
public ALcdWMSCapabilities getWMSCapabilities()
ILcdWMSCapabilitiesProvider
.TLcdOGCWMSCommandDispatcher
.
If the WMS server is configured with a capabilities updater (see ILcdWMSCapabilitiesUpdater
),
it is preferred to use the method getWMSCapabilities(HttpServletRequest)
while handling requests. This is to assure that there is only one capabilities configuration used for one
request.TLcdOGCWMSCommandDispatcher
.setWMSCapabilities(com.luciad.wms.server.model.ALcdWMSCapabilities)
protected ALcdWMSCapabilities getWMSCapabilities(javax.servlet.http.HttpServletRequest aHttpServletRequest)
ILcdWMSCapabilitiesProvider
.getWMSCapabilities()
. All
next invocations of this method with the same request will return the
same capabilities, even if a more recent version has already been registered.aHttpServletRequest
- the servlet request.ALcdWMSCapabilities
object depending on the request.setWMSCapabilities(com.luciad.wms.server.model.ALcdWMSCapabilities)
public void setWMSCapabilities(ALcdWMSCapabilities aCapabilities)
aCapabilities
- the default capabilities of this WMS.getWMSCapabilities()
public void setWMSCapabilitiesProvider(ILcdWMSCapabilitiesProvider aWMSCapabilitiesProvider)
WMS capabilities provider
allows providing always up to date versions
of the capabilities.
There is no need to use a ILcdWMSCapabilitiesDecoder
in conjunction with a ILcdWMSCapabilitiesUpdater
anymore.
aWMSCapabilitiesProvider
- the WMS capabilities provider.public ILcdWMSCapabilitiesProvider getWMSCapabilitiesProvider()
public ILcdModelProvider getModelProvider()
ILcdModelProvider
that is currently used by the command dispatcher.
The command dispatcher uses this interface to obtain a model for a source, rather
than directly using the model decoder factories or model decoders. An ILcdModelProvider
therefore provides central access to all models: it typically holds a reference to the model decoder factories
and uses them to decode the actual data. The main advantage of this centralized approach is that it
allows implementations to define additional functionality, that is global for all model decoders.
A typical example is a caching mechanism, to improve the performance.
The default implementation maintains a cache for all decoded models. To prevent memory problems, it makes use of
java.lang.ref.SoftReference
objects, which are cleared at the discretion of the garbage collector
in response to memory demand. Soft references are most often used to implement memory-sensitive caches.ILcdModelProvider
to provide the model for a source.setModelProvider(com.luciad.wms.server.ILcdModelProvider)
public void setModelProvider(ILcdModelProvider aModelProvider)
ILcdModelProvider
to be used within the command dispatcher
to obtain a model for a source.aModelProvider
- the model provider implementation.getModelProvider()
public void addWMSGXYLayerFactory(ILcdWMSGXYLayerFactory aWMSGXYLayerFactory)
ILcdWMSGXYLayerFactory
to create a ILcdGXYLayer
for a ALcdWMSLayer
.
Note that added implementations can be called for multiple simultaneous request
and thus should be thread safe!aWMSGXYLayerFactory
- a ILcdWMSGXYLayerFactory
to create a ILcdGXYLayer
for a ALcdWMSLayer
.protected ILcdWMSGXYLayerFactory getCompositeWMSGXYLayerFactory()
ILcdWMSGXYLayerFactory
instances.
When createGXYLayer(ILcdModel, ALcdWMSLayer, String)
is invoked,
it runs through all the registered layer factories until one is found that is
capable of creating the layer.ILcdWMSGXYLayerFactory
instances.public void addXYWorldReferenceParser(ILcdXYWorldReferenceParser aXYWorldReferenceParser)
ILcdXYWorldReferenceParser
to parse a ILcdXYWorldReference
from a given text encoding.
Note that added implementations can be called for multiple simultaneous request
and thus should be thread safe!aXYWorldReferenceParser
- parser for a ILcdXYWorldReference
from a given text encoding.protected ILcdXYWorldReference parseXYWorldReference(String aXYWorldReferenceAsString)
ILcdXYWorldReference
using the ILcdXYWorldReferenceParser
objects of this command dispatcher.aXYWorldReferenceAsString
- the text representation of the coordinate system.ILcdXYWorldReference
,
null if the ILcdXYWorldReference
can not be created,addXYWorldReferenceParser(com.luciad.view.ILcdXYWorldReferenceParser)
public void addSLDWMSGXYLayerFactory(ALcdSLDWMSGXYLayerFactory aSLDWMSGXYLayerFactory)
ALcdSLDWMSGXYLayerFactory
to create a ILcdGXYLayer
for SLD layers.
Note that added implementations can be called for multiple simultaneous request
and thus should be thread safe!aSLDWMSGXYLayerFactory
- a ALcdSLDWMSGXYLayerFactory
to create a ILcdGXYLayer
for SLD layers.public void addWMSGetLegendGraphicEncoder(ILcdWMSGetLegendGraphicRequestEncoder aWMSGetLegendGraphicEncoder)
ILcdWMSGetLegendGraphicRequestEncoder
implementation for encoding
legend graphics into a specific format, specified by their MIME-TYPE.
Note that there can be only one encoder for a specific MIME-TYPE.
Note that added implementations can be called for multiple simultaneous requests
and thus should be thread safe!aWMSGetLegendGraphicEncoder
- the ILcdWMSGetLegendGraphicRequestEncoder
implementation to add.public void addWMSDescribeLayerEncoder(ILcdWMSDescribeLayerRequestEncoder aWMSDescribeLayerEncoder)
ILcdWMSDescribeLayerRequestEncoder
implementation for creating and encoding
describe layer responses into a specific format, specified by their MIME-TYPE.
Note that there can be only one encoder for a specific MIME-TYPE.
Note that added implementations can be called for multiple simultaneous requests
and thus should be thread safe!aWMSDescribeLayerEncoder
- the ILcdWMSDescribeLayerRequestEncoder
implementation to add.protected ALcdSLDWMSGXYLayerFactory getCompositeSLDWMSGXYLayerFactory()
ALcdSLDWMSGXYLayerFactory
instances.
It runs through all the registered layer factories until one is found that is
capable of creating the layer.ALcdSLDWMSGXYLayerFactory
instances.public ILcdRemoteOWSModelProvider getRemoteOWSModelProvider()
ILcdRemoteOWSModelProvider
that is currently used by the command dispatcher.
The command dispatcher uses this interface to obtain a model for a user-defined layer, rather
than directly using the remote model decoder factories or model decoders. An ILcdRemoteOWSModelProvider
therefore provides central access to all models: it typically holds a reference to the remote model decoder factories
and uses them to decode the actual data. The main advantage of this centralized approach is that it
allows implementations to define additional functionality, that is global for all remote model decoders.
A typical example is a caching mechanism, to improve the performance.
The default implementation does not maintain a cache.ILcdRemoteOWSModelProvider
to provide the model for a user-defined layer.setRemoteOWSModelProvider(com.luciad.wms.server.ILcdRemoteOWSModelProvider)
public void setRemoteOWSModelProvider(ILcdRemoteOWSModelProvider aRemoteOWSModelProvider)
ILcdRemoteOWSModelProvider
to be used within the command dispatcher
to obtain a model for a user-defined layer.aRemoteOWSModelProvider
- the model provider implementation.getRemoteOWSModelProvider()
public ILcdWMSSLDFeatureTypeStyleProvider getSLDFeatureTypeStyleProvider()
ILcdSLDFeatureTypeStyleProvider
that is currently used by the command dispatcher.
The command dispatcher uses this interface to obtain the SLD feature type styles for a WMS layer if no feature type style is included in the request.
An ILcdSLDFeatureTypeStyleProvider
therefore provides central access to all sld feature type style information.
ILcdSLDFeatureTypeStyleProvider
to provide the SLD feature type styles.setSLDFeatureTypeStyleProvider(com.luciad.wms.server.ILcdWMSSLDFeatureTypeStyleProvider)
public void setSLDFeatureTypeStyleProvider(ILcdWMSSLDFeatureTypeStyleProvider aSLDFeatureTypeStyleProvider)
ILcdSLDFeatureTypeStyleProvider
to be used within the command dispatcher
to obtain SLD feature type styles for a WMS layer if no feature type style is included in the request.aSLDFeatureTypeStyleProvider
- the SLD feature type provider.getSLDFeatureTypeStyleProvider()
public void handleRequest(javax.servlet.http.HttpServletRequest aRequest, javax.servlet.http.HttpServletResponse aResponse) throws javax.servlet.ServletException
ALcdWMSCommandDispatcher
handleRequest
in class ALcdWMSCommandDispatcher
aRequest
- the received HttpServletRequest
.aResponse
- the HttpServletResponse
to send the result to.javax.servlet.ServletException
- for servlet errors.protected void handleWMSServiceException(TLcdWMSServiceException aWMSServiceException, javax.servlet.http.HttpServletRequest aHttpServletRequest, javax.servlet.http.HttpServletResponse aHttpServletResponse) throws javax.servlet.ServletException
TLcdWMSServiceException
had occurred.aWMSServiceException
- the WMS Service Exception that has occurred.aHttpServletRequest
- the original request.aHttpServletResponse
- the response object to write to.javax.servlet.ServletException
- if handling the exception leads to an exception too.protected void initialiseGXYView(TLcdGXYViewBufferedImage aGXYViewSFCT, javax.servlet.http.HttpServletRequest aHttpServletRequest) throws TLcdWMSServiceException, javax.servlet.ServletException
aGXYViewSFCT
- the TLcdGXYViewBufferedImage
to be initialised.aHttpServletRequest
- the HttpServletRequest
containing the parameter values.TLcdWMSServiceException
- when the request doesn't follow the WMS and/or SLD specifications.javax.servlet.ServletException
- for servlet errors.protected void clearGXYView(TLcdGXYViewBufferedImage aGXYView)
aGXYView
- the TLcdGXYViewBufferedImage
to be cleared.protected void addGXYLayers(javax.servlet.http.HttpServletRequest aHttpServletRequest, String aLayerList, String aStyleList, TLcdGXYViewBufferedImage aGXYView) throws TLcdWMSServiceException, javax.servlet.ServletException
aHttpServletRequest
- the original servlet request for which this method is called.aLayerList
- a comma separated list of layer names.aStyleList
- a comma separate list of style ids.aGXYView
- the TLcdGXYViewBufferedImage
to add the layers to.IllegalArgumentException
- when illegal arguments are passed.TLcdWMSServiceException
- when the request doesn't follow the WMS specifications.javax.servlet.ServletException
- for servlet errors.protected void addGXYLayers(javax.servlet.http.HttpServletRequest aHttpServletRequest, String[] aLayerList, String[] aStyleList, TLcdSLDStyledLayerDescriptor aStyledLayerDescriptor, TLcdGXYViewBufferedImage aGXYView) throws TLcdWMSServiceException, javax.servlet.ServletException
null
, indicating that the default style must be used. The implementation will delegate to
addGXYLayers(javax.servlet.http.HttpServletRequest, String, String, com.luciad.view.gxy.TLcdGXYViewBufferedImage)
in
TLcdOGCWMSCommandDispatcher
.aHttpServletRequest
- The original servlet request for which this method is called.aLayerList
- An array of layer names. This argument can only be null
if aStyleList
is null and aStyledLayerDescriptor
is not null
.aStyleList
- An array of style ids. This argument can only be null
if aLayerList
is null and aStyledLayerDescriptor
is not null
.aStyledLayerDescriptor
- A Styled Layer Descriptor. This argument can only be null
if aLayerList
and aStyleList
are not null
.aGXYView
- the TLcdGXYViewBufferedImage
to add the layers to.IllegalArgumentException
- when illegal arguments are passed.TLcdWMSServiceException
- when the request doesn't follow the WMS specifications.javax.servlet.ServletException
- for servlet errors.protected void loadGXYLayerArraySFCT(ALcdWMSLayer[] aWmsLayers, String[] aStyles, TLcdGXYViewBufferedImage aGXYView, javax.servlet.http.HttpServletRequest aHttpServletRequest) throws IOException, javax.servlet.ServletException, TLcdWMSServiceException
ALcdWMSLayer
, a model is retrieved via the getModel
method of the model provider
.
Note that the default implementation of ILcdModelProvider
uses model caching.ILcdModel
, a corresponding ILcdGXYLayer
is created via the createGXYLayer
method of the composite layer factory
.ILcdGXYLayer
is set to the name of the corresponding ALcdWMSLayer
instance,
because this property is supposed to be unique.ILcdGXYLayer
objects are added to the supplied TLcdGXYViewBufferedImage
object.
IOException
javax.servlet.ServletException
TLcdWMSServiceException
protected void exportGXYView(TLcdGXYViewBufferedImage aGXYView, javax.servlet.http.HttpServletRequest aRequest, javax.servlet.http.HttpServletResponse aResponse) throws TLcdWMSServiceException, javax.servlet.ServletException
TLcdGXYViewBufferedImage
to the format specified in the HttpServletRequest
and
sends the encoded result to the HttpServletResponse
.aGXYView
- the TLcdGXYViewBufferedImage
to be exported.aRequest
- the HttpServletRequest
containing the format to export in.aResponse
- the HttpServletResponse
to write the result to.TLcdWMSServiceException
- when the format value doesn't follow the WMS specifications.javax.servlet.ServletException
- for general servlet errors.protected void exportFeatureInfo(TLcdGXYViewBufferedImage aGXYView, javax.servlet.http.HttpServletRequest aRequest, javax.servlet.http.HttpServletResponse aResponse, ILcdGXYLayerSubsetList aSelectionSublist) throws TLcdWMSServiceException, javax.servlet.ServletException
ILcdGXYLayerSubsetList
from a given ILcdGXYView
and sends it to the client.aGXYView
- the TLcdGXYViewBufferedImage
in which the elements are selected .aRequest
- the received HttpServletRequest
.aResponse
- the HttpServletResponse
to send the result to.aSelectionSublist
- a ILcdGXYLayerSubsetList
containing the selection to be encoded.TLcdWMSServiceException
- when the format value doesn't follow the WMS specifications.javax.servlet.ServletException
- for general servlet errors.protected void handleUnknownCommand(javax.servlet.http.HttpServletRequest aRequest, javax.servlet.http.HttpServletResponse aResponse) throws TLcdWMSServiceException, javax.servlet.ServletException
TLcdWMSServiceException
specifying an invalid request.aRequest
- the HttpServletRequest
containing the unknown request.aResponse
- the HttpServletResponse
to send the result to.TLcdWMSServiceException
- when the request does not follow the WMS specifications.javax.servlet.ServletException
- in case an exception can not be translated into a TLcdWMSServiceException
.protected ILcdGXYLayerSubsetList performSelectionAt(int aX, int aY, int aFeatureCount, Vector aGXYLayerList, ILcdGXYView aGXYViewSFCT, javax.servlet.http.HttpServletRequest aHttpServletRequest)
ILcdGXYLayerSubsetList
. The selection is defined by a pixel position
aX,aY.aX
- the x value of the selection position on the view.aY
- the y value of the selection position on the view.aFeatureCount
- the maximum number of objects (features) to be selected.aGXYLayerList
- a vector containing the ILcdGXYLayer
objects being queried.aGXYViewSFCT
- the map view for which the selection is requested.aHttpServletRequest
- the original servlet request.protected ILcdGXYLayerSubsetList performSelectionInBounds(int aX, int aY, int aSelectionWidth, int aSelectionHeight, int aFeatureCount, Vector aGXYLayerList, ILcdGXYView aGXYViewSFCT, javax.servlet.http.HttpServletRequest aHttpServletRequest)
ILcdGXYLayerSubsetList
. The selection is defined by pixel bounds,
specified by its upper left location (aX,aY) and its width and height
(aSelectionWidth,aSelectionHeight). By default, objects are only selected if
their visual representation falls within these bounds.aX
- the x value of the upper left location of the selection rectangle.aY
- the y value of the upper left location of the selection rectangle.aSelectionWidth
- the width of the selection rectangle.aSelectionHeight
- the height of the selection rectangle.aFeatureCount
- the maximum number of objects (features) to be selected.aGXYLayerList
- vector containing the ILcdGXYLayer
objects being queried.aGXYViewSFCT
- the map view for which the selection is requested.aHttpServletRequest
- the original servlet request.public boolean isEnableUserStyleSupport()
DescribeLayer
and availability of layer factories that can deal with SLD.public void setEnableUserStyleSupport(boolean aEnableUserStyleSupport)
DescribeLayer
via
addWMSDescribeLayerEncoder(ILcdWMSDescribeLayerRequestEncoder)
and by registering support
to create layers using SLD through addSLDWMSGXYLayerFactory(ALcdSLDWMSGXYLayerFactory)
.aEnableUserStyleSupport
- The value if user style support is enabled.public void setWMSCapabilitiesUpdater(ILcdWMSCapabilitiesUpdater aCapabilitiesUpdater)
aCapabilitiesUpdater
- A capabilities updater.public ILcdWMSCapabilitiesUpdater getWMSCapabilitiesUpdater()
public void dispose()
ILcdDisposable
Disposes of this object and allows it to release any system resources that it is holding.
The result of calling any other method (other than finalize
) on this object subsequent to a call to
this method is undefined.
dispose
in interface ILcdDisposable
dispose
in class ALcdWMSCommandDispatcher