public abstract class ALcdWMSLayer extends Object
This class is a direct representation of the layer concept introduced in the OGC WMS specification.
A WMS layer is used to represent the data offered by a WMS. When a client performs a GetCapabilities
request,
the XML response will (amongst other content) contain a (hierarchical) list of layers that can be requested
by the client. This list of layers is modeled via the ALcdWMSLayer
domain object.
A WMS layer is identified by a unique key, represented by the name
property. This property
is used by the client to identify a layer in a request. It is however possible to hide the name towards the client
(see isNameVisible()
); in that case, the client cannot request the layer. A layer can contain data by itself
(see getSourceName()
), and/or it can group other layers (see getChildWMSLayer(int)
). A layer
should also have a title
, intended as a human-readable name to describe the layer.
To further describe the layer's content, a number of optional metadata properties are available, such as
abstract
, keywords
etc.
A layer can be parametrized via the WMS dimension concept, see getDimension(int)
. Common parameters
are time and elevation, to allow clients to request the data respectively for a given time instant and altitude.
A layer can also be given a number of styles which the client can request, see getWMSLayerStyle(int)
.
To indicate whether a client can perform GetFeatureInfo
requests on the layer, the
queryable
property is used.
ILcdModel
) and create a Luciad layer (ILcdLayer
) to generate the resulting map.ALcdWMSLayerStyle
,
ALcdWMSDimension
Constructor and Description |
---|
ALcdWMSLayer() |
Modifier and Type | Method and Description |
---|---|
ALcdWMSLayer |
findWMSLayer(String aLayerName)
Search for a layer in the hierarchy with the requested layer name.
|
abstract String |
getAbstract()
Returns an abstract for this layer.
|
abstract ALcdWMSAuthorityURL |
getAuthorityURL(int aIndex)
Returns the
ALcdWMSAuthorityURL at a given index. |
abstract int |
getAuthorityURLCount()
Returns the number of
ALcdWMSAuthorityURL objects
specified within this ALcdWMSLayer . |
int |
getCascadeCount()
Returns the number of times this layer has been retransmitted.
|
abstract ALcdWMSLayer |
getChildWMSLayer(int aIndex)
Returns the sub-layer at an index.
|
abstract int |
getChildWMSLayerCount()
Returns the number of sub-layers this layer is composed of.
|
abstract String |
getCoordinateReferenceSystem(int aIndex)
Returns the extra coordinate reference system in which this layer can be displayed.
|
abstract int |
getCoordinateReferenceSystemCount()
Returns the number of extra coordinate reference systems in which this layer can be displayed.
|
TLcdWMSURL |
getDataURL(int aIndex)
Returns the
TLcdWMSURL representing a DataURL at the given index. |
int |
getDataURLCount()
Returns the number of
TLcdWMSURL objects representing DataURLs. |
ALcdWMSDimension |
getDimension(int aIndex)
Returns the dimensional parameter definition at the given index.
|
int |
getDimensionCount()
Returns the number of dimensional parameters associated with this layer (and child layers).
|
Long |
getExpiryDate()
Returns the expiry date of this layer.
|
TLcdWMSURL |
getFeatureListURL(int aIndex)
Returns the
TLcdWMSURL representing a FeatureListURL at the given index. |
int |
getFeatureListURLCount()
Returns the number of
TLcdWMSURL objects representing FeatureListURLs. |
int |
getFixedHeight()
Returns the fixed height of this layer.
|
int |
getFixedWidth()
Returns the fixed width of this layer.
|
abstract TLcdWMSIdentifier |
getIdentifier(int aIndex)
Returns the
TLcdWMSIdentifier at a given index. |
abstract int |
getIdentifierCount()
Returns the number of
TLcdWMSIdentifier of this ALcdWMSLayer . |
abstract String |
getKeyword(int aIndex)
Returns the keyword at the given index.
|
abstract int |
getKeywordCount()
Returns the number of keywords.
|
abstract double |
getMaxScaleDenominator()
Returns the max scale denominator range value.
|
TLcdWMSURL |
getMetadataURL(int aIndex)
Returns the
TLcdWMSURL representing a MetadataURL at the given index. |
int |
getMetadataURLCount()
Returns the number of
TLcdWMSURL objects representing MetadataURLs. |
abstract double |
getMinScaleDenominator()
Returns the min scale denominator range value.
|
Long |
getModificationDate()
Returns the modification date of this layer.
|
abstract String |
getName()
Returns the name of this layer.
|
ALcdWMSLayer |
getParentWMSLayer()
Returns the parent layer of this layer.
|
abstract Object |
getProperty(String aKey)
Searches the property with the specified key.
|
abstract Object |
getProperty(String aKey,
Object aDefaultValue)
Searches the property with the specified key.
|
abstract String |
getSourceName()
Returns the source name of the data for this layer.
|
abstract String |
getTitle()
Returns the title of this layer.
|
String |
getUpdateSequence()
Returns the update sequence value associated with this capabilities object.
|
abstract ILcdBounds |
getWGS84LonLatBounds()
Returns the bounding box of this layer in WGS84.
|
abstract ALcdWMSLayerStyle |
getWMSLayerStyle(int aIndex)
Returns one of the new styles defined by this layer (for the specific index).
|
abstract int |
getWMSLayerStyleCount()
Returns the number of new styles this layer defines.
|
abstract boolean |
isNameVisible()
Each layer has a key, but this might not be visible to the
WMS user (if the implementor of the WMS service does not want the
layer to be retrievable).
|
boolean |
isNoSubsets()
Returns the value of the 'noSubsets' parameter of this layer.
|
Boolean |
isOpaque()
Returns whether the layer represents map data that is mostly or completely opaque.
|
abstract boolean |
isQueryable()
Returns if the layer has extra (meta) information available.
|
abstract void |
putProperty(String aKey,
Object aObject)
Maps the specified key to the specified object.
|
void |
setExpiryDate(long aDate)
Sets an expiry date for this layer.
|
void |
setModificationDate(Long aDate)
Sets a modification date for this layer.
|
protected void |
setParentLayer(ALcdWMSLayer aParentLayer)
Sets the given layer as parent layer of this layer.
|
void |
setUpdateSequence(String aUpdateSequence)
Sets the update sequence value associated with this capabilities object.
|
public abstract String getTitle()
public abstract String getName()
public abstract boolean isNameVisible()
public abstract String getAbstract()
public abstract ILcdBounds getWGS84LonLatBounds()
ILcdBounds
containing the lon lat bounding box.public abstract boolean isQueryable()
queryable
property has the value false
client applications cannot make GetFeatureInfo
requests on this WMS layer.public Boolean isOpaque()
null
is returned.Boolean.TRUE
if the layer represents map data that is mostly or completely opaque.public ALcdWMSLayer getParentWMSLayer()
null
is returned.null
otherwise.public abstract int getChildWMSLayerCount()
public abstract ALcdWMSLayer getChildWMSLayer(int aIndex) throws IndexOutOfBoundsException
aIndex
- the index of the sub-layer.IndexOutOfBoundsException
- in case of an invalid index.public abstract String getSourceName()
public abstract int getWMSLayerStyleCount()
public abstract ALcdWMSLayerStyle getWMSLayerStyle(int aIndex) throws IndexOutOfBoundsException
aIndex
- index of the new style to return.IndexOutOfBoundsException
- in case of an invalid index.public abstract void putProperty(String aKey, Object aObject)
aKey
- the key to use for the property list.aObject
- the value corresponding to the key.public abstract Object getProperty(String aKey)
aKey
- the key to search for.public abstract Object getProperty(String aKey, Object aDefaultValue)
aKey
- the key to search for.aDefaultValue
- the default value to return if no property is found with the specified key.public abstract int getAuthorityURLCount()
ALcdWMSAuthorityURL
objects
specified within this ALcdWMSLayer
.ALcdWMSAuthorityURL
objects
specified within this ALcdWMSLayer
.public abstract ALcdWMSAuthorityURL getAuthorityURL(int aIndex) throws IndexOutOfBoundsException
ALcdWMSAuthorityURL
at a given index.aIndex
- the index of the ALcdWMSAuthorityURL
.ALcdWMSAuthorityURL
at a given index.IndexOutOfBoundsException
- if the index value is invalid.public int getMetadataURLCount()
TLcdWMSURL
objects representing MetadataURLs.
By default, 0 is returned.TLcdWMSURL
objects representing MetadataURLs.public TLcdWMSURL getMetadataURL(int aIndex) throws IndexOutOfBoundsException
TLcdWMSURL
representing a MetadataURL at the given index.
By default, no MetaDataURLs are available and an
IndexOutOfBoundsException
will be thrown.aIndex
- the index of the TLcdWMSURL
representing a MetadataURL.TLcdWMSURL
representing a MetadataURL at the given index.IndexOutOfBoundsException
- if the index value is invalid.public int getDataURLCount()
TLcdWMSURL
objects representing DataURLs.
By default, 0 is returned.TLcdWMSURL
objects representing DataURLs.public TLcdWMSURL getDataURL(int aIndex) throws IndexOutOfBoundsException
TLcdWMSURL
representing a DataURL at the given index.
By default, no DataURLs are available and an
IndexOutOfBoundsException
will be thrown.aIndex
- the index of the TLcdWMSURL
representing a DataURL.TLcdWMSURL
representing a DataURL at the given index.IndexOutOfBoundsException
- if the index value is invalid.public int getFeatureListURLCount()
TLcdWMSURL
objects representing FeatureListURLs.
By default, 0 is returned.TLcdWMSURL
objects representing FeatureListURLs.public TLcdWMSURL getFeatureListURL(int aIndex) throws IndexOutOfBoundsException
TLcdWMSURL
representing a FeatureListURL at the given index.
By default, no FeatureListURLs are available and an
IndexOutOfBoundsException
will be thrown.aIndex
- the index of the TLcdWMSURL
representing a FeatureListURL.TLcdWMSURL
representing a FeatureListURL at the given index.IndexOutOfBoundsException
- if the index value is invalid.public abstract int getIdentifierCount()
TLcdWMSIdentifier
of this ALcdWMSLayer
.TLcdWMSIdentifier
of this ALcdWMSLayer
.public abstract TLcdWMSIdentifier getIdentifier(int aIndex) throws IndexOutOfBoundsException
TLcdWMSIdentifier
at a given index.aIndex
- the index of the TLcdWMSIdentifier
.TLcdWMSIdentifier
at a given index.IndexOutOfBoundsException
- if the index value is invalid.public int getCascadeCount()
public abstract int getCoordinateReferenceSystemCount()
public abstract String getCoordinateReferenceSystem(int aIndex) throws IndexOutOfBoundsException
aIndex
- the index of the extra coordinate reference system.IndexOutOfBoundsException
- if the index value is invalid.public abstract double getMinScaleDenominator()
public abstract double getMaxScaleDenominator()
public abstract int getKeywordCount()
public abstract String getKeyword(int aIndex) throws IndexOutOfBoundsException
aIndex
- the index of the keyword to return.IndexOutOfBoundsException
- if invalid index.public ALcdWMSDimension getDimension(int aIndex) throws IndexOutOfBoundsException
IndexOutOfBoundsException
will be thrown.aIndex
- The index of the dimensional parameter to be retrieved.IndexOutOfBoundsException
- if invalid index.public int getDimensionCount()
protected void setParentLayer(ALcdWMSLayer aParentLayer)
null
can be supplied.aParentLayer
- The parent layer of this layer, or null
.public boolean isNoSubsets()
public int getFixedWidth()
public int getFixedHeight()
public void setExpiryDate(long aDate)
Expires
HTTP header on GetMap
and
GetFeatureInfo
responses.aDate
- an expiry date for this layergetExpiryDate()
public Long getExpiryDate()
null
is returned.setExpiryDate(long)
public void setModificationDate(Long aDate)
Last-Modified
HTTP header on GetMap
and GetFeatureInfo
responses.aDate
- a modification date for this layergetModificationDate()
public Long getModificationDate()
null
is returned.setModificationDate(Long aDate)
public String getUpdateSequence()
Returns the update sequence value associated with this capabilities object. This update sequence identifies the state of the layer, including all dependencies such as styles, layer factory implementation etc...
The update sequence should comply with a number of conditions:
By default, this method always returns "0"
. This means that the default implementation assumes that
WMS layers never change. If WMS layers change, the update sequence should be modified using the
setUpdateSequence(java.lang.String)
method.
One way to generate update sequences would be to use a (persistent) counter that gets incremented on every
change. Another way would be to use System.currentTimeMillis()
from a correct clock. It is also an
option to return a String
that is concatenated with update sequences from a number of underlying
concepts, such as styles, layer factory versions, data, ...
Note that it is not needed to take into account the update sequence of the data (see
ILcdModelProvider.getModelUpdateSequence(java.lang.String, com.luciad.ogc.common.ALcdRequestContext)
) when calling the setUpdateSequence(java.lang.String)
method.
Instead, any code that makes use of the layer update sequence returned by this method should also take into
account the update sequence of the model. An example are GetMap request caches. A cache entry should be
invalidated if the layer update sequence changes, or if the model update sequence changes.
null
.public void setUpdateSequence(String aUpdateSequence)
Sets the update sequence value associated with this capabilities object. See getUpdateSequence()
for
more information.
aUpdateSequence
- the new update sequence.public ALcdWMSLayer findWMSLayer(String aLayerName)
aLayerName
- the name of the layer searched for.null
otherwise.