Class TLcdWMSLayer

java.lang.Object
com.luciad.wms.server.model.ALcdWMSLayer
com.luciad.wms.server.model.TLcdWMSLayer

public class TLcdWMSLayer extends ALcdWMSLayer
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.

Note that you do not want to set the value to 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 Details

    • TLcdWMSLayer

      public TLcdWMSLayer()
  • Method Details

    • getTitle

      public String getTitle()
      Description copied from class: ALcdWMSLayer
      Returns the title of this layer.
      Specified by:
      getTitle in class ALcdWMSLayer
      Returns:
      the title of this layer.
    • getName

      public String getName()
      Description copied from class: ALcdWMSLayer
      Returns the name of this layer. This name has to be unique !
      Specified by:
      getName in class ALcdWMSLayer
      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 class ALcdWMSLayer
      Returns:
      true if the name is visible, else false .
    • getWGS84LonLatBounds

      public ILcdBounds getWGS84LonLatBounds()
      Description copied from class: ALcdWMSLayer
      Returns the bounding box of this layer in WGS84.
      Specified by:
      getWGS84LonLatBounds in class ALcdWMSLayer
      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 the queryable property has the value false client applications cannot make GetFeatureInfo requests on this WMS layer.
      Specified by:
      isQueryable in class ALcdWMSLayer
      Returns:
      true if the layer is queryable.
    • isOpaque

      public Boolean 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 class ALcdWMSLayer
      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 class ALcdWMSLayer
      Returns:
      the number of sub-layers this layer is composed of.
    • getChildWMSLayer

      public ALcdWMSLayer getChildWMSLayer(int aIndex) throws IndexOutOfBoundsException
      Description copied from class: ALcdWMSLayer
      Returns the sub-layer at an index.
      Specified by:
      getChildWMSLayer in class ALcdWMSLayer
      Parameters:
      aIndex - the index of the sub-layer.
      Returns:
      the sub-layer at an index.
      Throws:
      IndexOutOfBoundsException - in case of an invalid index.
    • getSourceName

      public String 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 class ALcdWMSLayer
      Returns:
      the source name of the data for this layer.
    • getAuthorityURLCount

      public int getAuthorityURLCount()
      Description copied from class: ALcdWMSLayer
      Returns the number of ALcdWMSAuthorityURL objects specified within this ALcdWMSLayer.
      Specified by:
      getAuthorityURLCount in class ALcdWMSLayer
      Returns:
      the number of ALcdWMSAuthorityURL objects specified within this ALcdWMSLayer.
    • getAuthorityURL

      public ALcdWMSAuthorityURL getAuthorityURL(int aIndex) throws IndexOutOfBoundsException
      Description copied from class: ALcdWMSLayer
      Returns the ALcdWMSAuthorityURL at a given index.
      Specified by:
      getAuthorityURL in class ALcdWMSLayer
      Parameters:
      aIndex - the index of the ALcdWMSAuthorityURL.
      Returns:
      the ALcdWMSAuthorityURL at a given index.
      Throws:
      IndexOutOfBoundsException - if the index value is invalid.
    • addAuthorityURL

      public void addAuthorityURL(ALcdWMSAuthorityURL aAuthorityURL)
      Adds a new ALcdWMSAuthorityURL to this ALcdWMSLayer. It can be referred to by this ALcdWMSLayer and its children.
      Parameters:
      aAuthorityURL - the authority URL to add.
    • getMetadataURLCount

      public int getMetadataURLCount()
      Description copied from class: ALcdWMSLayer
      Returns the number of TLcdWMSURL objects representing MetadataURLs.

      By default, 0 is returned.

      Overrides:
      getMetadataURLCount in class ALcdWMSLayer
      Returns:
      the number of TLcdWMSURL objects representing MetadataURLs.
    • getMetadataURL

      public TLcdWMSURL getMetadataURL(int aIndex) throws IndexOutOfBoundsException
      Description copied from class: ALcdWMSLayer
      Returns the TLcdWMSURL representing a MetadataURL at the given index.

      By default, no MetaDataURLs are available and an IndexOutOfBoundsException will be thrown.

      Overrides:
      getMetadataURL in class ALcdWMSLayer
      Parameters:
      aIndex - the index of the TLcdWMSURL representing a MetadataURL.
      Returns:
      the TLcdWMSURL representing a MetadataURL at the given index.
      Throws:
      IndexOutOfBoundsException - if the index value is invalid.
    • addMetadataURL

      public void addMetadataURL(TLcdWMSURL aMetadataURL)
      Adds a new TLcdWMSURL representing a MetadataURL to this ALcdWMSLayer. It can be referred to by this ALcdWMSLayer and its children.
      Parameters:
      aMetadataURL - the TLcdWMSURL representing a MetadataURL to add.
    • getDataURLCount

      public int getDataURLCount()
      Description copied from class: ALcdWMSLayer
      Returns the number of TLcdWMSURL objects representing DataURLs.

      By default, 0 is returned.

      Overrides:
      getDataURLCount in class ALcdWMSLayer
      Returns:
      the number of TLcdWMSURL objects representing DataURLs.
    • getDataURL

      public TLcdWMSURL getDataURL(int aIndex) throws IndexOutOfBoundsException
      Description copied from class: ALcdWMSLayer
      Returns the TLcdWMSURL representing a DataURL at the given index.

      By default, no DataURLs are available and an IndexOutOfBoundsException will be thrown.

      Overrides:
      getDataURL in class ALcdWMSLayer
      Parameters:
      aIndex - the index of the TLcdWMSURL representing a DataURL.
      Returns:
      the TLcdWMSURL representing a DataURL at the given index.
      Throws:
      IndexOutOfBoundsException - if the index value is invalid.
    • addDataURL

      public void addDataURL(TLcdWMSURL aDataURL)
      Adds a new TLcdWMSURL representing a DataURL to this ALcdWMSLayer. It can be referred to by this ALcdWMSLayer and its children.
      Parameters:
      aDataURL - the TLcdWMSURL representing a DataURL to add.
    • getFeatureListURLCount

      public int getFeatureListURLCount()
      Description copied from class: ALcdWMSLayer
      Returns the number of TLcdWMSURL objects representing FeatureListURLs.

      By default, 0 is returned.

      Overrides:
      getFeatureListURLCount in class ALcdWMSLayer
      Returns:
      the number of TLcdWMSURL objects representing FeatureListURLs.
    • getFeatureListURL

      public TLcdWMSURL getFeatureListURL(int aIndex) throws IndexOutOfBoundsException
      Description copied from class: ALcdWMSLayer
      Returns the TLcdWMSURL representing a FeatureListURL at the given index.

      By default, no FeatureListURLs are available and an IndexOutOfBoundsException will be thrown.

      Overrides:
      getFeatureListURL in class ALcdWMSLayer
      Parameters:
      aIndex - the index of the TLcdWMSURL representing a FeatureListURL.
      Returns:
      the TLcdWMSURL representing a FeatureListURL at the given index.
      Throws:
      IndexOutOfBoundsException - if the index value is invalid.
    • addFeatureListURL

      public void addFeatureListURL(TLcdWMSURL aFeatureListURL)
      Adds a new TLcdWMSURL representing a FeatureListURL to this ALcdWMSLayer. It can be referred to by this ALcdWMSLayer and its children.
      Parameters:
      aFeatureListURL - the TLcdWMSURL representing a FeatureListURL to add.
    • getIdentifierCount

      public int getIdentifierCount()
      Description copied from class: ALcdWMSLayer
      Returns the number of TLcdWMSIdentifier of this ALcdWMSLayer.
      Specified by:
      getIdentifierCount in class ALcdWMSLayer
      Returns:
      the number of TLcdWMSIdentifier of this ALcdWMSLayer.
    • getIdentifier

      public TLcdWMSIdentifier getIdentifier(int aIndex) throws IndexOutOfBoundsException
      Description copied from class: ALcdWMSLayer
      Returns the TLcdWMSIdentifier at a given index.
      Specified by:
      getIdentifier in class ALcdWMSLayer
      Parameters:
      aIndex - the index of the TLcdWMSIdentifier.
      Returns:
      the TLcdWMSIdentifier at a given index.
      Throws:
      IndexOutOfBoundsException - if the index value is invalid.
    • addIdentifier

      public void addIdentifier(TLcdWMSIdentifier aIdentifier)
      Adds a TLcdWMSIdentifier to this ALcdWMSLayer. It is not inherited from the parent ALcdWMSLayer. The authority name of the Identifier should be defined within this ALcdWMSLayer 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 class ALcdWMSLayer
      Returns:
      the number of dimensional parameters associated with this layer (and child layers).
    • getDimension

      public ALcdWMSDimension getDimension(int aIndex) throws IndexOutOfBoundsException
      Description copied from class: ALcdWMSLayer
      Returns the dimensional parameter definition at the given index.

      By default, no dimensional parameters are available and an IndexOutOfBoundsException will be thrown.

      Overrides:
      getDimension in class ALcdWMSLayer
      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

      public void addDimension(ALcdWMSDimension aDimension)
      Adds a ALcdWMSDimension to this ALcdWMSLayer.
      Parameters:
      aDimension - the dimensional parameter to add.
    • removeDimension

      public void removeDimension(ALcdWMSDimension aDimension)
      Removes the given ALcdWMSDimension from this ALcdWMSLayer.
      Parameters:
      aDimension - the dimensional parameter to remove.
    • setTitle

      public void setTitle(String aTitle)
      Sets the title of the layer.
      Parameters:
      aTitle - a String containing the title.
      See Also:
    • setName

      public void setName(String aName)
      Sets the name of the layer.
      Parameters:
      aName - a String containing the name.
      See Also:
    • setNameVisible

      public void setNameVisible(boolean aNameVisible)
      Sets if the name is visible or not.
      Parameters:
      aNameVisible - a boolean changing the name visibility.
    • getAbstract

      public String getAbstract()
      Description copied from class: ALcdWMSLayer
      Returns an abstract for this layer. Value may be null.
      Specified by:
      getAbstract in class ALcdWMSLayer
      Returns:
      an abstract for this layer.
    • setAbstract

      public void setAbstract(String aAbstract)
      Sets the abstract for this layer.
      Parameters:
      aAbstract - the abstract of this layer.
      See Also:
    • setLatLonBoundingBox

      public void setLatLonBoundingBox(ILcdBounds aLatLonBoundingBox)
      Sets the lonlatbounds (WGS 84) of the layer.
      Parameters:
      aLatLonBoundingBox - a ILcdBounds containing the lonlatbounds.
      See Also:
    • setQueryable

      public void setQueryable(boolean aQueryable)
      Sets whether the layer is queryable or not.
      Parameters:
      aQueryable - a boolean indicating whether the layer is queryable or not.
    • setOpaque

      public void setOpaque(Boolean aOpaque)
      Sets whether the layer is opaque or not.
      Parameters:
      aOpaque - a Boolean indicating whether the layer is opaque or not.
    • addChildWMSLayer

      public void addChildWMSLayer(ALcdWMSLayer aChildWMSLayer)
      Adds a child to this layer. This layer will automatically be registered as the parent layer of the child.
      Parameters:
      aChildWMSLayer - an ALcdWMSLayer that is a child of this layer.
    • removeChildWMSLayer

      public void removeChildWMSLayer(ALcdWMSLayer aChildWMSLayer)
      Removes a child from this layer. This layer will automatically be removed as parent layer of the child.
      Parameters:
      aChildWMSLayer - an ALcdWMSLayer that is a child of this layer.
    • moveLayerAt

      public void moveLayerAt(ALcdWMSLayer aChildWMSLayer, int aIndex)
      Moves a child layer to a different position in the list.
      Parameters:
      aChildWMSLayer - an ALcdWMSLayer that is a child of this layer.
      aIndex - the new list index to which the child layer should be moved.
    • getChildWMSLayerIndex

      public int getChildWMSLayerIndex(ALcdWMSLayer aLayer)
      Returns the index of a child layer in the list.
      Parameters:
      aLayer - an ALcdWMSLayer.
      Returns:
      the index of the specified layer in the list, or -1 if the layer is not found.
    • setSourceName

      public void setSourceName(String aSourceName)
      Sets the sourcename of the layer.
      Parameters:
      aSourceName - a String 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 class ALcdWMSLayer
      Returns:
      the number of new styles this layer defines.
    • getWMSLayerStyle

      public ALcdWMSLayerStyle getWMSLayerStyle(int aIndex) throws IndexOutOfBoundsException
      Description copied from class: ALcdWMSLayer
      Returns one of the new styles defined by this layer (for the specific index).
      Specified by:
      getWMSLayerStyle in class ALcdWMSLayer
      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

      public void addStyle(ALcdWMSLayerStyle aWMSStyle)
      Adds a style for this ALcdWMSLayer and its children.
      Parameters:
      aWMSStyle - an additional style for this ALcdWMSLayer and its children.
    • putProperty

      public void putProperty(String aKey, Object aObject)
      Description copied from class: ALcdWMSLayer
      Maps the specified key to the specified object.
      Specified by:
      putProperty in class ALcdWMSLayer
      Parameters:
      aKey - the key to use for the property list.
      aObject - the value corresponding to the key.
    • getProperty

      public Object getProperty(String aKey)
      Description copied from class: ALcdWMSLayer
      Searches the property with the specified key. If not found null is returned.
      Specified by:
      getProperty in class ALcdWMSLayer
      Parameters:
      aKey - the key to search for.
      Returns:
      the value of the property with the specified key, null if not found.
    • getProperty

      public Object getProperty(String aKey, Object aDefaultValue)
      Description copied from class: ALcdWMSLayer
      Searches the property with the specified key. If not found the default value is returned.
      Specified by:
      getProperty in class ALcdWMSLayer
      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 class ALcdWMSLayer
      Returns:
      the number of extra coordinate reference systems in which this layer can be displayed.
    • getCoordinateReferenceSystem

      public String getCoordinateReferenceSystem(int aIndex) throws IndexOutOfBoundsException
      Description copied from class: ALcdWMSLayer
      Returns the extra coordinate reference system in which this layer can be displayed.
      Specified by:
      getCoordinateReferenceSystem in class ALcdWMSLayer
      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

      public void addCoordinateReferenceSystem(String aCoordinateReferenceSystem)
      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 class ALcdWMSLayer
      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 class ALcdWMSLayer
      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 class ALcdWMSLayer
      Returns:
      the number of keywords.
    • getKeyword

      public String getKeyword(int aIndex) throws IndexOutOfBoundsException
      Description copied from class: ALcdWMSLayer
      Returns the keyword at the given index.
      Specified by:
      getKeyword in class ALcdWMSLayer
      Parameters:
      aIndex - the index of the keyword to return.
      Returns:
      the keyword at the given index.
      Throws:
      IndexOutOfBoundsException - if invalid index.
    • addKeyword

      public void addKeyword(String aKeyword)
      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 class ALcdWMSLayer
      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 class ALcdWMSLayer
      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 class ALcdWMSLayer
      Returns:
      The fixed height of this layer if it is set, 0 otherwise.
    • findWMSLayer

      public ALcdWMSLayer findWMSLayer(String aLayerName)
      Description copied from class: ALcdWMSLayer
      Search for a layer in the hierarchy with the requested layer name.
      Overrides:
      findWMSLayer in class ALcdWMSLayer
      Parameters:
      aLayerName - the name of the layer searched for.
      Returns:
      The layer if found, null otherwise.