public abstract class ALcdMultiDimensionalModelProvider extends Object implements ILcdModelProvider
ILcdModelProvider
that provides support for multi-dimensional requests.
Next to the getModel(String)
defined in ILcdModelProvider
,
it adds a method getModel(ALcdWMSLayer, ALcdWMSDimension[], TLcdWMSDimensionExtent[], TLcdWMSRequestContext)
that returns
a model for a specified layer and dimension parameters.
A client request that contains one or more dimensional parameters, does not necessarily comply
to the actual dimension definitions. For example, if a client specifies a value for which no exact
match is available, a nearest value may be used. For this purposes, the method
getDimensionExtent(ALcdWMSLayer, ALcdWMSDimension, TLcdWMSDimensionExtent, TLcdWMSRequestContext)
is used.Constructor and Description |
---|
ALcdMultiDimensionalModelProvider() |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes of this object and allows it to release any system resources that it is holding.
|
TLcdWMSDimensionExtent |
getDimensionExtent(ALcdWMSLayer aLayer,
ALcdWMSDimension aDimension,
TLcdWMSDimensionExtent aSuppliedExtent,
TLcdWMSRequestContext aWMSRequestContext)
Returns the actual dimension extent, specifying the value(s)/interval(s) on which the supplied dimension extent can be mapped.
|
ILcdModel |
getModel(ALcdWMSLayer aLayer,
ALcdWMSDimension[] aDimensions,
TLcdWMSDimensionExtent[] aDimensionExtent,
TLcdWMSRequestContext aWMSRequestContext)
Returns the
ILcdModel corresponding to a layer and its dimensional parameters. |
ILcdModel |
getModel(String aSourceName,
ALcdRequestContext aRequestContext)
Returns the
ILcdModel corresponding to a source name. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getModelUpdateSequence
close
public ILcdModel getModel(String aSourceName, ALcdRequestContext aRequestContext) throws IOException
ILcdModel
corresponding to a source name.
This method is used for all ALcdWMSLayer
objects that don't
have any dimensions defined.
By default, an ILcdModelProvider
implementation is used that maintains
a cache for all decoded models. To prevent memory problems, it makes use of
Soft reference 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.getModel
in interface ILcdOGCModelProvider
getModel
in interface ILcdModelProvider
aSourceName
- the source name of the model.aRequestContext
- the request context, which is an instance of type TLcdWMSRequestContext
.
This can be null if the method is called by a process which is not handling a request.ILcdModel
corresponding to a source name.IOException
- if the model can not be returned (because decoding fails).public ILcdModel getModel(ALcdWMSLayer aLayer, ALcdWMSDimension[] aDimensions, TLcdWMSDimensionExtent[] aDimensionExtent, TLcdWMSRequestContext aWMSRequestContext) throws IOException
ILcdModel
corresponding to a layer and its dimensional parameters.
This method is used for all ALcdWMSLayer
objects that have one or more dimensions defined
in the capabilities.
The default implementation of this method sets the filtering value to the retrieved model via getModel(String, ALcdRequestContext)
.
Because of the performance considerations, getModel(String, ALcdRequestContext)
utilizes a model cache in which ILcdMultiDimensional
models can be used in a thread safe manner. Thus this method relies on this idea that any multidimensional model retrieved from getModel
is safe to alter filtering values.
If you ever override getModel(String, ALcdRequestContext)
to add custom formats, you should ensure that the multidimensional
models obtained from your method are either safe in means of filter setting or you override this method too to prevent possible
threading issues.
aLayer
- The layer for which a model must be retrieved.aDimensions
- The dimensions that are defined for the layer. These dimensions can be defined
directly by the layer, or be inherited from a parent layer.aDimensionExtent
- The value(s) or interval(s) to be used for the dimensional parameters.aWMSRequestContext
- the WMS request context, which gives access to the original HttpServletRequest
that was sent to the WMS and several other parameters.ILcdModel
corresponding to the layer and its dimensional parameters.IOException
- if the model can not be returned (because decoding fails).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 ILcdOGCModelProvider
dispose
in interface ILcdDisposable
public TLcdWMSDimensionExtent getDimensionExtent(ALcdWMSLayer aLayer, ALcdWMSDimension aDimension, TLcdWMSDimensionExtent aSuppliedExtent, TLcdWMSRequestContext aWMSRequestContext)
isNearestValue()
in the supplied ALcdWMSDimension
object returns true
),
a nearest match must be determined and added to the returned dimension extent.null
must be returnedaLayer
- The layer for which a dimension was specified in the client request.aDimension
- The dimension for which a value was specified in the client request. Note that this dimension can be defined in a parent layer
of the specified layer, since dimension definitions are inherited if none are defined by the child layer.aSuppliedExtent
- The value(s)/interval(s) specified for the dimension in the client request.aWMSRequestContext
- the WMS request context, which gives access to the original HttpServletRequest
that was sent to the WMS and several other parameters.