Package com.luciad.wms.server.model
Class TLcdWMSLayer
java.lang.Object
com.luciad.wms.server.model.ALcdWMSLayer
com.luciad.wms.server.model.TLcdWMSLayer
Default implementation of a
ALcdWMSLayer
.
If you want the WMS layer to be advertised such that client applications can include it within their requests you need to do the following.
- Call
setName(String)
setName(layerName). - Call
setNameVisible(boolean)
setNameVisible(true).
true
in all cases.
An example is when you have a layer containing sub-layers as a grouping of related layers in the hierarchy.
If you want the WMS layer to be advertised such that it can be included in GetFeatureInfo
requests you
need to call the method setQueryable(true)
.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAuthorityURL
(ALcdWMSAuthorityURL aAuthorityURL) Adds a newALcdWMSAuthorityURL
to thisALcdWMSLayer
.void
addChildWMSLayer
(ALcdWMSLayer aChildWMSLayer) Adds a child to this layer.void
addCoordinateReferenceSystem
(String aCoordinateReferenceSystem) Adds an extra coordinate reference system in which this layer can be visualized.void
addDataURL
(TLcdWMSURL aDataURL) Adds a newTLcdWMSURL
representing a DataURL to thisALcdWMSLayer
.void
addDimension
(ALcdWMSDimension aDimension) Adds aALcdWMSDimension
to thisALcdWMSLayer
.void
addFeatureListURL
(TLcdWMSURL aFeatureListURL) Adds a newTLcdWMSURL
representing a FeatureListURL to thisALcdWMSLayer
.void
addIdentifier
(TLcdWMSIdentifier aIdentifier) Adds aTLcdWMSIdentifier
to thisALcdWMSLayer
.void
addKeyword
(String aKeyword) Adds a keyword for this layer.void
addMetadataURL
(TLcdWMSURL aMetadataURL) Adds a newTLcdWMSURL
representing a MetadataURL to thisALcdWMSLayer
.void
addStyle
(ALcdWMSLayerStyle aWMSStyle) Adds a style for thisALcdWMSLayer
and its children.findWMSLayer
(String aLayerName) Search for a layer in the hierarchy with the requested layer name.Returns an abstract for this layer.getAuthorityURL
(int aIndex) Returns theALcdWMSAuthorityURL
at a given index.int
Returns the number ofALcdWMSAuthorityURL
objects specified within thisALcdWMSLayer
.getChildWMSLayer
(int aIndex) Returns the sub-layer at an index.int
Returns the number of sub-layers this layer is composed of.int
getChildWMSLayerIndex
(ALcdWMSLayer aLayer) Returns the index of a child layer in the list.getCoordinateReferenceSystem
(int aIndex) Returns the extra coordinate reference system in which this layer can be displayed.int
Returns the number of extra coordinate reference systems in which this layer can be displayed.getDataURL
(int aIndex) Returns theTLcdWMSURL
representing a DataURL at the given index.int
Returns the number ofTLcdWMSURL
objects representing DataURLs.getDimension
(int aIndex) Returns the dimensional parameter definition at the given index.int
Returns the number of dimensional parameters associated with this layer (and child layers).getFeatureListURL
(int aIndex) Returns theTLcdWMSURL
representing a FeatureListURL at the given index.int
Returns the number ofTLcdWMSURL
objects representing FeatureListURLs.int
Returns the fixed height of this layer.int
Returns the fixed width of this layer.getIdentifier
(int aIndex) Returns theTLcdWMSIdentifier
at a given index.int
Returns the number ofTLcdWMSIdentifier
of thisALcdWMSLayer
.getKeyword
(int aIndex) Returns the keyword at the given index.int
Returns the number of keywords.double
Returns the max scale denominator range value.getMetadataURL
(int aIndex) Returns theTLcdWMSURL
representing a MetadataURL at the given index.int
Returns the number ofTLcdWMSURL
objects representing MetadataURLs.double
Returns the min scale denominator range value.getName()
Returns the name of this layer.getProperty
(String aKey) Searches the property with the specified key.getProperty
(String aKey, Object aDefaultValue) Searches the property with the specified key.Returns the source name of the data for this layer.getTitle()
Returns the title of this layer.Returns the bounding box of this layer in WGS84.getWMSLayerStyle
(int aIndex) Returns one of the new styles defined by this layer (for the specific index).int
Returns the number of new styles this layer defines.boolean
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
Returns the value of the 'noSubsets' parameter of this layer.isOpaque()
Returns whether the layer represents map data that is mostly or completely opaque.boolean
Returns if the layer has extra (meta) information available.void
moveLayerAt
(ALcdWMSLayer aChildWMSLayer, int aIndex) Moves a child layer to a different position in the list.void
putProperty
(String aKey, Object aObject) Maps the specified key to the specified object.void
removeChildWMSLayer
(ALcdWMSLayer aChildWMSLayer) Removes a child from this layer.void
removeDimension
(ALcdWMSDimension aDimension) Removes the givenALcdWMSDimension
from thisALcdWMSLayer
.void
setAbstract
(String aAbstract) Sets the abstract for this layer.void
setFixedHeight
(int aFixedHeight) Sets the fixed height of this layer.void
setFixedWidth
(int aFixedWidth) Sets the fixed width of this layer.void
setLatLonBoundingBox
(ILcdBounds aLatLonBoundingBox) Sets the lonlatbounds (WGS 84) of the layer.void
setMaxScaleDenominator
(double aMaxScaleDenominator) Sets the maximum scale denominator value.void
setMinScaleDenominator
(double aMinScaleDenominator) Sets the minimum scale denominator value.void
Sets the name of the layer.void
setNameVisible
(boolean aNameVisible) Sets if the name is visible or not.void
setNoSubsets
(boolean aNoSubsets) Sets the value of the 'noSubsets' parameter of this layer.void
Sets whether the layer is opaque or not.void
setQueryable
(boolean aQueryable) Sets whether the layer is queryable or not.void
setSourceName
(String aSourceName) Sets the sourcename of the layer.void
Sets the title of the layer.Methods inherited from class com.luciad.wms.server.model.ALcdWMSLayer
getCascadeCount, getExpiryDate, getModificationDate, getParentWMSLayer, getUpdateSequence, setExpiryDate, setModificationDate, setParentLayer, setUpdateSequence
-
Constructor Details
-
TLcdWMSLayer
public TLcdWMSLayer()
-
-
Method Details
-
getTitle
Description copied from class:ALcdWMSLayer
Returns the title of this layer.- Specified by:
getTitle
in classALcdWMSLayer
- Returns:
- the title of this layer.
-
getName
Description copied from class:ALcdWMSLayer
Returns the name of this layer. This name has to be unique !- Specified by:
getName
in classALcdWMSLayer
- Returns:
- the name of this layer.
-
isNameVisible
public boolean isNameVisible()Description copied from class:ALcdWMSLayer
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).- Specified by:
isNameVisible
in classALcdWMSLayer
- Returns:
- true if the name is visible, else false .
-
getWGS84LonLatBounds
Description copied from class:ALcdWMSLayer
Returns the bounding box of this layer in WGS84.- Specified by:
getWGS84LonLatBounds
in classALcdWMSLayer
- Returns:
- a
ILcdBounds
containing the lon lat bounding box.
-
isQueryable
public boolean isQueryable()Description copied from class:ALcdWMSLayer
Returns if the layer has extra (meta) information available. If thequeryable
property has the valuefalse
client applications cannot makeGetFeatureInfo
requests on this WMS layer.- Specified by:
isQueryable
in classALcdWMSLayer
- Returns:
- true if the layer is queryable.
-
isOpaque
Description copied from class:ALcdWMSLayer
Returns whether the layer represents map data that is mostly or completely opaque. If false, the layer typically represents vector data that does not completely fills space. By default,null
is returned.- Overrides:
isOpaque
in classALcdWMSLayer
- Returns:
Boolean.TRUE
if the layer represents map data that is mostly or completely opaque.
-
getChildWMSLayerCount
public int getChildWMSLayerCount()Description copied from class:ALcdWMSLayer
Returns the number of sub-layers this layer is composed of.- Specified by:
getChildWMSLayerCount
in classALcdWMSLayer
- Returns:
- the number of sub-layers this layer is composed of.
-
getChildWMSLayer
Description copied from class:ALcdWMSLayer
Returns the sub-layer at an index.- Specified by:
getChildWMSLayer
in classALcdWMSLayer
- Parameters:
aIndex
- the index of the sub-layer.- Returns:
- the sub-layer at an index.
- Throws:
IndexOutOfBoundsException
- in case of an invalid index.
-
getSourceName
Description copied from class:ALcdWMSLayer
Returns the source name of the data for this layer. This is OPTIONAL: the value returned may be null.- Specified by:
getSourceName
in classALcdWMSLayer
- Returns:
- the source name of the data for this layer.
-
getAuthorityURLCount
public int getAuthorityURLCount()Description copied from class:ALcdWMSLayer
Returns the number ofALcdWMSAuthorityURL
objects specified within thisALcdWMSLayer
.- Specified by:
getAuthorityURLCount
in classALcdWMSLayer
- Returns:
- the number of
ALcdWMSAuthorityURL
objects specified within thisALcdWMSLayer
.
-
getAuthorityURL
Description copied from class:ALcdWMSLayer
Returns theALcdWMSAuthorityURL
at a given index.- Specified by:
getAuthorityURL
in classALcdWMSLayer
- Parameters:
aIndex
- the index of theALcdWMSAuthorityURL
.- Returns:
- the
ALcdWMSAuthorityURL
at a given index. - Throws:
IndexOutOfBoundsException
- if the index value is invalid.
-
addAuthorityURL
Adds a newALcdWMSAuthorityURL
to thisALcdWMSLayer
. It can be referred to by thisALcdWMSLayer
and its children.- Parameters:
aAuthorityURL
- the authority URL to add.
-
getMetadataURLCount
public int getMetadataURLCount()Description copied from class:ALcdWMSLayer
Returns the number ofTLcdWMSURL
objects representing MetadataURLs. By default, 0 is returned.- Overrides:
getMetadataURLCount
in classALcdWMSLayer
- Returns:
- the number of
TLcdWMSURL
objects representing MetadataURLs.
-
getMetadataURL
Description copied from class:ALcdWMSLayer
Returns theTLcdWMSURL
representing a MetadataURL at the given index. By default, no MetaDataURLs are available and anIndexOutOfBoundsException
will be thrown.- Overrides:
getMetadataURL
in classALcdWMSLayer
- Parameters:
aIndex
- the index of theTLcdWMSURL
representing a MetadataURL.- Returns:
- the
TLcdWMSURL
representing a MetadataURL at the given index. - Throws:
IndexOutOfBoundsException
- if the index value is invalid.
-
addMetadataURL
Adds a newTLcdWMSURL
representing a MetadataURL to thisALcdWMSLayer
. It can be referred to by thisALcdWMSLayer
and its children.- Parameters:
aMetadataURL
- theTLcdWMSURL
representing a MetadataURL to add.
-
getDataURLCount
public int getDataURLCount()Description copied from class:ALcdWMSLayer
Returns the number ofTLcdWMSURL
objects representing DataURLs. By default, 0 is returned.- Overrides:
getDataURLCount
in classALcdWMSLayer
- Returns:
- the number of
TLcdWMSURL
objects representing DataURLs.
-
getDataURL
Description copied from class:ALcdWMSLayer
Returns theTLcdWMSURL
representing a DataURL at the given index. By default, no DataURLs are available and anIndexOutOfBoundsException
will be thrown.- Overrides:
getDataURL
in classALcdWMSLayer
- Parameters:
aIndex
- the index of theTLcdWMSURL
representing a DataURL.- Returns:
- the
TLcdWMSURL
representing a DataURL at the given index. - Throws:
IndexOutOfBoundsException
- if the index value is invalid.
-
addDataURL
Adds a newTLcdWMSURL
representing a DataURL to thisALcdWMSLayer
. It can be referred to by thisALcdWMSLayer
and its children.- Parameters:
aDataURL
- theTLcdWMSURL
representing a DataURL to add.
-
getFeatureListURLCount
public int getFeatureListURLCount()Description copied from class:ALcdWMSLayer
Returns the number ofTLcdWMSURL
objects representing FeatureListURLs. By default, 0 is returned.- Overrides:
getFeatureListURLCount
in classALcdWMSLayer
- Returns:
- the number of
TLcdWMSURL
objects representing FeatureListURLs.
-
getFeatureListURL
Description copied from class:ALcdWMSLayer
Returns theTLcdWMSURL
representing a FeatureListURL at the given index. By default, no FeatureListURLs are available and anIndexOutOfBoundsException
will be thrown.- Overrides:
getFeatureListURL
in classALcdWMSLayer
- Parameters:
aIndex
- the index of theTLcdWMSURL
representing a FeatureListURL.- Returns:
- the
TLcdWMSURL
representing a FeatureListURL at the given index. - Throws:
IndexOutOfBoundsException
- if the index value is invalid.
-
addFeatureListURL
Adds a newTLcdWMSURL
representing a FeatureListURL to thisALcdWMSLayer
. It can be referred to by thisALcdWMSLayer
and its children.- Parameters:
aFeatureListURL
- theTLcdWMSURL
representing a FeatureListURL to add.
-
getIdentifierCount
public int getIdentifierCount()Description copied from class:ALcdWMSLayer
Returns the number ofTLcdWMSIdentifier
of thisALcdWMSLayer
.- Specified by:
getIdentifierCount
in classALcdWMSLayer
- Returns:
- the number of
TLcdWMSIdentifier
of thisALcdWMSLayer
.
-
getIdentifier
Description copied from class:ALcdWMSLayer
Returns theTLcdWMSIdentifier
at a given index.- Specified by:
getIdentifier
in classALcdWMSLayer
- Parameters:
aIndex
- the index of theTLcdWMSIdentifier
.- Returns:
- the
TLcdWMSIdentifier
at a given index. - Throws:
IndexOutOfBoundsException
- if the index value is invalid.
-
addIdentifier
Adds aTLcdWMSIdentifier
to thisALcdWMSLayer
. It is not inherited from the parentALcdWMSLayer
. The authority name of the Identifier should be defined within thisALcdWMSLayer
or one of its ancestors.- Parameters:
aIdentifier
- the identifier object.
-
getDimensionCount
public int getDimensionCount()Description copied from class:ALcdWMSLayer
Returns the number of dimensional parameters associated with this layer (and child layers). By default, 0 is returned.- Overrides:
getDimensionCount
in classALcdWMSLayer
- Returns:
- the number of dimensional parameters associated with this layer (and child layers).
-
getDimension
Description copied from class:ALcdWMSLayer
Returns the dimensional parameter definition at the given index. By default, no dimensional parameters are available and anIndexOutOfBoundsException
will be thrown.- Overrides:
getDimension
in classALcdWMSLayer
- Parameters:
aIndex
- The index of the dimensional parameter to be retrieved.- Returns:
- the dimensional parameter definition at the given index.
- Throws:
IndexOutOfBoundsException
- if invalid index.
-
addDimension
Adds aALcdWMSDimension
to thisALcdWMSLayer
.- Parameters:
aDimension
- the dimensional parameter to add.
-
removeDimension
Removes the givenALcdWMSDimension
from thisALcdWMSLayer
.- Parameters:
aDimension
- the dimensional parameter to remove.
-
setTitle
Sets the title of the layer.- Parameters:
aTitle
- aString
containing the title.- See Also:
-
setName
Sets the name of the layer.- Parameters:
aName
- aString
containing the name.- See Also:
-
setNameVisible
public void setNameVisible(boolean aNameVisible) Sets if the name is visible or not.- Parameters:
aNameVisible
- aboolean
changing the name visibility.
-
getAbstract
Description copied from class:ALcdWMSLayer
Returns an abstract for this layer. Value may be null.- Specified by:
getAbstract
in classALcdWMSLayer
- Returns:
- an abstract for this layer.
-
setAbstract
Sets the abstract for this layer.- Parameters:
aAbstract
- the abstract of this layer.- See Also:
-
setLatLonBoundingBox
Sets the lonlatbounds (WGS 84) of the layer.- Parameters:
aLatLonBoundingBox
- aILcdBounds
containing the lonlatbounds.- See Also:
-
setQueryable
public void setQueryable(boolean aQueryable) Sets whether the layer is queryable or not.- Parameters:
aQueryable
- aboolean
indicating whether the layer is queryable or not.
-
setOpaque
Sets whether the layer is opaque or not.- Parameters:
aOpaque
- aBoolean
indicating whether the layer is opaque or not.
-
addChildWMSLayer
Adds a child to this layer. This layer will automatically be registered as the parent layer of the child.- Parameters:
aChildWMSLayer
- anALcdWMSLayer
that is a child of this layer.
-
removeChildWMSLayer
Removes a child from this layer. This layer will automatically be removed as parent layer of the child.- Parameters:
aChildWMSLayer
- anALcdWMSLayer
that is a child of this layer.
-
moveLayerAt
Moves a child layer to a different position in the list.- Parameters:
aChildWMSLayer
- anALcdWMSLayer
that is a child of this layer.aIndex
- the new list index to which the child layer should be moved.
-
getChildWMSLayerIndex
Returns the index of a child layer in the list.- Parameters:
aLayer
- anALcdWMSLayer
.- Returns:
- the index of the specified layer in the list, or -1 if the layer is not found.
-
setSourceName
Sets the sourcename of the layer.- Parameters:
aSourceName
- aString
containing the source name.- See Also:
-
getWMSLayerStyleCount
public int getWMSLayerStyleCount()Description copied from class:ALcdWMSLayer
Returns the number of new styles this layer defines.- Specified by:
getWMSLayerStyleCount
in classALcdWMSLayer
- Returns:
- the number of new styles this layer defines.
-
getWMSLayerStyle
Description copied from class:ALcdWMSLayer
Returns one of the new styles defined by this layer (for the specific index).- Specified by:
getWMSLayerStyle
in classALcdWMSLayer
- Parameters:
aIndex
- index of the new style to return.- Returns:
- one of the new styles defined by this layer (for the specific index).
- Throws:
IndexOutOfBoundsException
- in case of an invalid index.
-
addStyle
Adds a style for thisALcdWMSLayer
and its children.- Parameters:
aWMSStyle
- an additional style for thisALcdWMSLayer
and its children.
-
putProperty
Description copied from class:ALcdWMSLayer
Maps the specified key to the specified object.- Specified by:
putProperty
in classALcdWMSLayer
- Parameters:
aKey
- the key to use for the property list.aObject
- the value corresponding to the key.
-
getProperty
Description copied from class:ALcdWMSLayer
Searches the property with the specified key. If not found null is returned.- Specified by:
getProperty
in classALcdWMSLayer
- Parameters:
aKey
- the key to search for.- Returns:
- the value of the property with the specified key, null if not found.
-
getProperty
Description copied from class:ALcdWMSLayer
Searches the property with the specified key. If not found the default value is returned.- Specified by:
getProperty
in classALcdWMSLayer
- Parameters:
aKey
- the key to search for.aDefaultValue
- the default value to return if no property is found with the specified key.- Returns:
- the value of the property with the specified key. The default specified value if not found.
-
getCoordinateReferenceSystemCount
public int getCoordinateReferenceSystemCount()Description copied from class:ALcdWMSLayer
Returns the number of extra coordinate reference systems in which this layer can be displayed.- Specified by:
getCoordinateReferenceSystemCount
in classALcdWMSLayer
- Returns:
- the number of extra coordinate reference systems in which this layer can be displayed.
-
getCoordinateReferenceSystem
Description copied from class:ALcdWMSLayer
Returns the extra coordinate reference system in which this layer can be displayed.- Specified by:
getCoordinateReferenceSystem
in classALcdWMSLayer
- Parameters:
aIndex
- the index of the extra coordinate reference system.- Returns:
- the extra coordinate reference system in which this layer can be displayed.
- Throws:
IndexOutOfBoundsException
- if the index value is invalid.
-
addCoordinateReferenceSystem
Adds an extra coordinate reference system in which this layer can be visualized.- Parameters:
aCoordinateReferenceSystem
- the coordinate reference system to add (formatted as a string).
-
getMinScaleDenominator
public double getMinScaleDenominator()Description copied from class:ALcdWMSLayer
Returns the min scale denominator range value. If there is no such minimum scale condition, the default value has to be 0.- Specified by:
getMinScaleDenominator
in classALcdWMSLayer
- Returns:
- the min scale denominator range value.
-
setMinScaleDenominator
public void setMinScaleDenominator(double aMinScaleDenominator) Sets the minimum scale denominator value.- Parameters:
aMinScaleDenominator
- the new min scale denominator value.- See Also:
-
getMaxScaleDenominator
public double getMaxScaleDenominator()Description copied from class:ALcdWMSLayer
Returns the max scale denominator range value. If there is no such maximum scale condition, the default value has to be Double.POSITIVE_INFINITY.- Specified by:
getMaxScaleDenominator
in classALcdWMSLayer
- Returns:
- the max scale denominator range value.
-
setMaxScaleDenominator
public void setMaxScaleDenominator(double aMaxScaleDenominator) Sets the maximum scale denominator value.- Parameters:
aMaxScaleDenominator
- the new max scale denominator value.- See Also:
-
getKeywordCount
public int getKeywordCount()Description copied from class:ALcdWMSLayer
Returns the number of keywords.- Specified by:
getKeywordCount
in classALcdWMSLayer
- Returns:
- the number of keywords.
-
getKeyword
Description copied from class:ALcdWMSLayer
Returns the keyword at the given index.- Specified by:
getKeyword
in classALcdWMSLayer
- Parameters:
aIndex
- the index of the keyword to return.- Returns:
- the keyword at the given index.
- Throws:
IndexOutOfBoundsException
- if invalid index.
-
addKeyword
Adds a keyword for this layer.- Parameters:
aKeyword
- A keyword for this layer.
-
setNoSubsets
public void setNoSubsets(boolean aNoSubsets) Sets the value of the 'noSubsets' parameter of this layer. If 'noSubsets' is set, the server is not able to make a map of a geographic area other than this layer's bounding box.- Parameters:
aNoSubsets
- the new boolean value for the 'noSubsets' parameter.
-
setFixedWidth
public void setFixedWidth(int aFixedWidth) Sets the fixed width of this layer. If this value is different from 0, the server can only produce maps with the given width for this layer.- Parameters:
aFixedWidth
- A positive value for the fixed width, 0 if the layer has no fixed width.
-
setFixedHeight
public void setFixedHeight(int aFixedHeight) Sets the fixed height of this layer. If this value is different from 0, the server can only produce maps with the given height for this layer.- Parameters:
aFixedHeight
- A positive value for the fixed height, 0 if the layer has no fixed height.
-
isNoSubsets
public boolean isNoSubsets()Description copied from class:ALcdWMSLayer
Returns the value of the 'noSubsets' parameter of this layer. If 'noSubsets' is set, the server is not able to make a map of a geographic area other than this layer's bounding box.- Overrides:
isNoSubsets
in classALcdWMSLayer
- Returns:
- The value of the 'noSubsets' parameter. Defaults to false.
-
getFixedWidth
public int getFixedWidth()Description copied from class:ALcdWMSLayer
Returns the fixed width of this layer. If this value is different from 0, the server can only produce maps with the given width for this layer.- Overrides:
getFixedWidth
in classALcdWMSLayer
- Returns:
- The fixed width of this layer if it is set, 0 otherwise.
-
getFixedHeight
public int getFixedHeight()Description copied from class:ALcdWMSLayer
Returns the fixed height of this layer. If this value is different from 0, the server can only produce maps with the given height for this layer.- Overrides:
getFixedHeight
in classALcdWMSLayer
- Returns:
- The fixed height of this layer if it is set, 0 otherwise.
-
findWMSLayer
Description copied from class:ALcdWMSLayer
Search for a layer in the hierarchy with the requested layer name.- Overrides:
findWMSLayer
in classALcdWMSLayer
- Parameters:
aLayerName
- the name of the layer searched for.- Returns:
- The layer if found,
null
otherwise.
-