com.moximedia.aims
Class WmsLayer

java.lang.Object
  extended bycom.moximedia.aims.WmsLayer
All Implemented Interfaces:
AimsLayer, AimsObject, java.lang.Cloneable, java.io.Serializable

public class WmsLayer
extends java.lang.Object
implements AimsObject, AimsLayer, java.io.Serializable, java.lang.Cloneable

The WmsLayer class is used to display a WMS layer as a background on an otherwise ArcIMS map. At this time, only one WmsLayer object may be added to the map. Later, support will be added for multiple WMS layers. Note that the layer object may be made up of multiple WMS layers.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.moximedia.aims.AimsObject
OBJECT_TYPE_ACETATE_LAYER, OBJECT_TYPE_FEATURE_LAYER, OBJECT_TYPE_FOLDER, OBJECT_TYPE_FOLDERS, OBJECT_TYPE_GROUP, OBJECT_TYPE_GROUPS, OBJECT_TYPE_IMAGE_LAYER, OBJECT_TYPE_WMS_LAYER
 
Fields inherited from interface com.moximedia.aims.AimsLayer
LAYER_TYPE_ACETATE, LAYER_TYPE_FEATURE, LAYER_TYPE_IMAGE, LAYER_TYPE_WMS
 
Constructor Summary
  WmsLayer()
          Do not use.
protected WmsLayer(AimsMap map)
          Creates an image layer object and associates it to a map.
 
Method Summary
 void addLayerListLegend(AimsLayerListLegend legend)
          Adds a layer list legend.
 void adjustScaleFactors(double multiplier)
          Adjusts the scale factors for this layer.
 void adjustScaleFactors(java.lang.String inUnits, java.lang.String outUnits)
          Adjusts the scale factors for this layer.
 boolean canEdit()
          Gets a boolean value indicating whether a layer can be edited.
 boolean canFindByAttribute()
          Gets a boolean value indicating whether a layer can be queried using the find location by attribute tool.
 boolean canHideLabels()
          Returns a boolean value indicating whether labels can be hidden.
 boolean canHideLayerListLegend()
          Gets and indicator of whether the legend could be shown, true regardless of whether or not it is turned off.
 boolean canSelectByAttribute()
          Gets a boolean value indicating whether a layer can be queried using the select location by attribute tool.
 boolean canShowLayerListLegend()
          Gets and indicator of whether the legend could be shown, true regardless of whether or not it is turned off.
 java.lang.Object clone()
           
 java.lang.String getAlias()
          get alias of the layer
 java.lang.String getAuthenticationId()
           
 boolean getCanDrillIdentify()
          Gets a boolean value indicating whether the layer can be identified using the drill down identify tool.
 boolean getCanIdentify()
          Gets a boolean value indicating whether the layer can be identified.
 boolean getCanSelect()
          Returns true if the layer is selectable.
 boolean getCanSetVisibility()
          Gets a boolean value indicating whether the layer can be turned on and off by the user.
 boolean getCanSetVisibilityBeyondScale()
          Gets a boolean value indicating whether the layer can be turned on and off by the user when the layer is beyond scale.
 boolean getCanSymbolize()
          Gets an indicator of whether the layer can be symbolized.
 boolean getCanZoomToLayer()
          Returns a boolean indicator of whether the zoom to layer extent function should be enabled for this layer.
 AimsEnvelope getExtent()
          Returns the extent of the layer.
 java.lang.String getForwardedImage(java.lang.String imageUrl)
           
 java.lang.String getId()
          Get ID of the layer.
 boolean getImmediateRefresh()
          Returns whether the map should immediately refresh when the map layer visibility is changed.
 AimsLayerListLegend getLayerListLegend()
          Gets and indicator of whether a layer list legend exists at this scale.
 AimsLayerListLegends getLayerListLegends()
          Gets the array of layer list legends for this group.
 int getLayerType()
          Gets the layer type, AimsLayer.LAYER_TYPE_WMS
 boolean getLegendVisible()
          Returns whether the layer should be visible in the legend.
 AimsMap getMap()
          Interface element only.
 java.lang.String getMapRequestUrlString()
           
 double getMaxScale()
          Get the maximum scale that the layer is visible
 java.lang.String getMetadataHandler()
          Returns the URL of the metadata handler page for this layer, or null if no metatata handler is defined.
 java.lang.String getMetadataUrl()
          Returns the URL to the metadata page for this layer, or null if no metatata URL is defined.
 double getMinScale()
          Get the minimum scale that the layer is visible
 java.lang.String getName()
          get name of the layer
 int getObjectId()
          Returns the IMF internal id for this layer.
 int getObjectType()
          Gets the type of object this is.
 java.lang.String getProperty(java.lang.String name)
          Gets the value of a property set in the configuration XML using a <property> element.
 AimsRecordset getRecordset()
           
 AimsRenderer getRenderer()
           
 boolean getShowSymbolizeIcon()
          Gets an indicator of whether the symbolize icon shows up in the layer list.
 java.lang.Object getTag()
          Gets the user defined object tag assosciated with this object.
 java.lang.String getType()
          Returns the layer type.
 boolean getVisible()
          Determine if the layer is visible
 boolean hasAuthentication()
           
 boolean hasLayerListLegend()
          Gets and indicator of whether a layer list legend exists at this scale.
 boolean isAfterArcImsLayers()
           
 boolean isBeforeArcImsLayers()
           
 boolean isBufferLayer()
           
 boolean isClone()
           
 boolean isDynamic()
           
 boolean isForwarded()
           
 boolean isHighlightLayer()
          Returns true if the layer is a highlight layer.
 boolean isLayerWithinThreshold()
          Returns whether this layer is within threshold tolerance.
 boolean isServiceLayer()
          Returns a flag indicating whether this layer was loaded from a map service.
 boolean isVisible()
          Determine if the layer is visible
 boolean labelsHidden()
          Returns a boolean value indicating whether labels are currently hidden.
 void setAuthentication(java.lang.String userpass)
           
 void setAxlAttribute(java.lang.String tag, java.lang.String name, java.lang.String value)
           
 void setCanDrillIdentify(boolean canDrillIdentify)
          Sets whether the layer can be identified using the drill down identify tool.
 void setCanIdentify(boolean canIdentify)
          Sets whether the layer can be identified.
 void setCanSetVisibility(boolean canSetVisibility)
          Sets whether the layer can be turned on and off by the user.
 void setCanSetVisibilityBeyondScale(boolean canSetVisibility)
          Sets whether the layer can be turned on and off by the user.
 void setExtent(AimsEnvelope envelope)
          Sets the envelope (extent) of the layer.
protected  void setId(java.lang.String id)
          Sets the id for the layer.
 void setLegendVisible(boolean isVisible)
          Interface compliance only.
 void setMap(AimsMap map)
          Sets the map that this layer belongs to if it isn't null,
 void setMaxScale(double scale)
           
 void setMinScale(double scale)
           
 void setModified(boolean isModified)
           
protected  void setName(java.lang.String name)
           
 void setProperty(java.lang.String name, java.lang.String value)
          Sets the value of a property (programmer defined).
 void setTag(java.lang.Object tag)
          Sets the user defined object associated to this object.
 void setVisible(boolean visible)
          turn on/off the layer
 void showLabels(boolean showLabels)
          Sets a layer to show without labels.
 java.lang.String toAxlString(java.lang.String requestType)
          Returns the AXL string to refresh this object.
 java.lang.String toString()
          Returns a text representation of of this class.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WmsLayer

public WmsLayer()
Do not use. For serialization only


WmsLayer

protected WmsLayer(AimsMap map)
Creates an image layer object and associates it to a map.

Parameters:
map - The map object containing this layer.
Method Detail

addLayerListLegend

public void addLayerListLegend(AimsLayerListLegend legend)
Adds a layer list legend.

Specified by:
addLayerListLegend in interface AimsLayer
Parameters:
legend - The legend to add.

hasLayerListLegend

public boolean hasLayerListLegend()
Gets and indicator of whether a layer list legend exists at this scale.

Specified by:
hasLayerListLegend in interface AimsLayer
Returns:
True if the layer has a legend which could be shown.

getLayerListLegend

public AimsLayerListLegend getLayerListLegend()
Gets and indicator of whether a layer list legend exists at this scale.

Specified by:
getLayerListLegend in interface AimsLayer
Returns:
True if the layer has a legend which could be shown.

getLayerListLegends

public AimsLayerListLegends getLayerListLegends()
Gets the array of layer list legends for this group.

Specified by:
getLayerListLegends in interface AimsLayer
Returns:
An AimsLayerListLegends object containing the legends.

canHideLayerListLegend

public boolean canHideLayerListLegend()
Gets and indicator of whether the legend could be shown, true regardless of whether or not it is turned off.

Specified by:
canHideLayerListLegend in interface AimsLayer
Returns:
True if the layer has a legend which could be shown.

canShowLayerListLegend

public boolean canShowLayerListLegend()
Gets and indicator of whether the legend could be shown, true regardless of whether or not it is turned off.

Specified by:
canShowLayerListLegend in interface AimsLayer
Returns:
True if the layer has a legend which could be shown.

getImmediateRefresh

public boolean getImmediateRefresh()
Returns whether the map should immediately refresh when the map layer visibility is changed.

Specified by:
getImmediateRefresh in interface AimsLayer
Returns:
The property setting.

getLayerType

public int getLayerType()
Gets the layer type, AimsLayer.LAYER_TYPE_WMS

Specified by:
getLayerType in interface AimsLayer
Returns:
Always returns AimsLayer.LAYER_TYPE_WMS

getLegendVisible

public boolean getLegendVisible()
Returns whether the layer should be visible in the legend.

Specified by:
getLegendVisible in interface AimsLayer
Returns:
Always returns false.

getMap

public AimsMap getMap()
Interface element only. Not used for thie type of layer.

Specified by:
getMap in interface AimsLayer
Returns:
Always returns null.

getObjectId

public int getObjectId()
Returns the IMF internal id for this layer.

Specified by:
getObjectId in interface AimsLayer
Returns:
The internal id for the layer.

getType

public java.lang.String getType()
Returns the layer type. Always returns "wms".

Specified by:
getType in interface AimsLayer
Returns:
The layer type. Always returns "wms".

getId

public java.lang.String getId()
Get ID of the layer. Note that a WMS layer doesn't have an id, so the string representation of the object id is returned.

Specified by:
getId in interface AimsLayer
Returns:
The object id.

isLayerWithinThreshold

public boolean isLayerWithinThreshold()
Returns whether this layer is within threshold tolerance.

Specified by:
isLayerWithinThreshold in interface AimsLayer
Returns:
True if the layer is shown at the present scale, otherwise false.

isServiceLayer

public boolean isServiceLayer()
Returns a flag indicating whether this layer was loaded from a map service.

Specified by:
isServiceLayer in interface AimsLayer
Returns:
Always returns false.

setId

protected void setId(java.lang.String id)
Sets the id for the layer.

Parameters:
id - The id for the layer.

getName

public java.lang.String getName()
get name of the layer

Specified by:
getName in interface AimsLayer
Returns:
Name of the layer

getAlias

public java.lang.String getAlias()
get alias of the layer

Specified by:
getAlias in interface AimsLayer
Returns:
alias of the layer

getCanSetVisibility

public boolean getCanSetVisibility()
Gets a boolean value indicating whether the layer can be turned on and off by the user.

Specified by:
getCanSetVisibility in interface AimsLayer
Returns:
True if the layer can be controlled, otherwise false.

setCanSetVisibility

public void setCanSetVisibility(boolean canSetVisibility)
Sets whether the layer can be turned on and off by the user.

Parameters:
canSetVisibility - True if the layer can be identified, otherwise false.

getCanSetVisibilityBeyondScale

public boolean getCanSetVisibilityBeyondScale()
Gets a boolean value indicating whether the layer can be turned on and off by the user when the layer is beyond scale.

Specified by:
getCanSetVisibilityBeyondScale in interface AimsLayer
Returns:
True if the layer can be controlled, otherwise false.

setCanSetVisibilityBeyondScale

public void setCanSetVisibilityBeyondScale(boolean canSetVisibility)
Sets whether the layer can be turned on and off by the user.

Parameters:
canSetVisibility - True if the layer can be identified, otherwise false.

setName

protected void setName(java.lang.String name)

setMinScale

public void setMinScale(double scale)
Specified by:
setMinScale in interface AimsLayer

setMaxScale

public void setMaxScale(double scale)
Specified by:
setMaxScale in interface AimsLayer

getRenderer

public AimsRenderer getRenderer()
Specified by:
getRenderer in interface AimsLayer

getRecordset

public AimsRecordset getRecordset()
Specified by:
getRecordset in interface AimsLayer

getMaxScale

public double getMaxScale()
Get the maximum scale that the layer is visible

Specified by:
getMaxScale in interface AimsLayer
Returns:
The miaximum scale that the layer is visible

getMinScale

public double getMinScale()
Get the minimum scale that the layer is visible

Specified by:
getMinScale in interface AimsLayer
Returns:
The minimum scale that the layer is visible

getVisible

public boolean getVisible()
Determine if the layer is visible

Specified by:
getVisible in interface AimsLayer
Returns:
true if visible

isVisible

public boolean isVisible()
Determine if the layer is visible

Returns:
true if visible, otherwise false

setVisible

public void setVisible(boolean visible)
turn on/off the layer

Specified by:
setVisible in interface AimsLayer
Parameters:
visible - true if turn on

setAxlAttribute

public void setAxlAttribute(java.lang.String tag,
                            java.lang.String name,
                            java.lang.String value)

toString

public java.lang.String toString()
Returns a text representation of of this class.

Specified by:
toString in interface AimsLayer
Returns:
A string describing the class

toAxlString

public java.lang.String toAxlString(java.lang.String requestType)
Returns the AXL string to refresh this object.

Specified by:
toAxlString in interface AimsLayer
Parameters:
requestType - The type of AXL requested. Valid values are "LAYER" and "LAYERDEF".
Returns:
Always returns null.

isHighlightLayer

public boolean isHighlightLayer()
Returns true if the layer is a highlight layer. Always returns false.

Specified by:
isHighlightLayer in interface AimsLayer
Returns:
Always returns false for WmsLayer.

getCanSelect

public boolean getCanSelect()
Returns true if the layer is selectable. Always returns false.

Specified by:
getCanSelect in interface AimsLayer
Returns:
Always returns false for AimsImageLayers.

getMetadataHandler

public java.lang.String getMetadataHandler()
Returns the URL of the metadata handler page for this layer, or null if no metatata handler is defined. A metadata handler is a custom script that is passed the object id of the layer which can then be used to calculate a metadata url.

Specified by:
getMetadataHandler in interface AimsLayer
Returns:
The metadata handler for this layer, or null.

getMetadataUrl

public java.lang.String getMetadataUrl()
Returns the URL to the metadata page for this layer, or null if no metatata URL is defined.

Specified by:
getMetadataUrl in interface AimsLayer
Returns:
The URL to the metadata page for this layer, or null if no metatata URL is defined.

setModified

public void setModified(boolean isModified)
Specified by:
setModified in interface AimsLayer

setMap

public void setMap(AimsMap map)
Sets the map that this layer belongs to if it isn't null,

Specified by:
setMap in interface AimsLayer
Parameters:
map - The map that this layer is part of.

isClone

public boolean isClone()
Specified by:
isClone in interface AimsLayer

isDynamic

public boolean isDynamic()
Specified by:
isDynamic in interface AimsLayer

clone

public java.lang.Object clone()
Specified by:
clone in interface AimsLayer

canFindByAttribute

public boolean canFindByAttribute()
Gets a boolean value indicating whether a layer can be queried using the find location by attribute tool.

Specified by:
canFindByAttribute in interface AimsLayer
Returns:
Always returns false for image layers.

canSelectByAttribute

public boolean canSelectByAttribute()
Gets a boolean value indicating whether a layer can be queried using the select location by attribute tool.

Specified by:
canSelectByAttribute in interface AimsLayer
Returns:
Always returns false for acetate layers.

canEdit

public boolean canEdit()
Gets a boolean value indicating whether a layer can be edited. using the editing tools extension.

Specified by:
canEdit in interface AimsLayer
Returns:
Always returns false for image layers.

showLabels

public void showLabels(boolean showLabels)
Sets a layer to show without labels. Has no effect on image layers.

Specified by:
showLabels in interface AimsLayer
Parameters:
showLabels - Has no effect.

canHideLabels

public boolean canHideLabels()
Returns a boolean value indicating whether labels can be hidden.

Specified by:
canHideLabels in interface AimsLayer
Returns:
Always returns false for image layers.

labelsHidden

public boolean labelsHidden()
Returns a boolean value indicating whether labels are currently hidden.

Specified by:
labelsHidden in interface AimsLayer
Returns:
Always returns false.

setExtent

public void setExtent(AimsEnvelope envelope)
Sets the envelope (extent) of the layer.

Specified by:
setExtent in interface AimsLayer
Parameters:
envelope - The envelope (extent) of the layer.

getExtent

public AimsEnvelope getExtent()
Returns the extent of the layer.

Specified by:
getExtent in interface AimsLayer
Returns:
Always returns null.

getCanIdentify

public boolean getCanIdentify()
Gets a boolean value indicating whether the layer can be identified.

Specified by:
getCanIdentify in interface AimsLayer
Returns:
Always returns false.

setCanIdentify

public void setCanIdentify(boolean canIdentify)
Sets whether the layer can be identified.

Parameters:
canIdentify - True if the layer can be identified, otherwise false.

isBufferLayer

public boolean isBufferLayer()
Specified by:
isBufferLayer in interface AimsLayer

getCanDrillIdentify

public boolean getCanDrillIdentify()
Gets a boolean value indicating whether the layer can be identified using the drill down identify tool.

Specified by:
getCanDrillIdentify in interface AimsLayer
Returns:
Always returns false

setCanDrillIdentify

public void setCanDrillIdentify(boolean canDrillIdentify)
Sets whether the layer can be identified using the drill down identify tool.

Parameters:
canDrillIdentify - True if the layer can be identified using the drill down identify tool, otherwise false.

getProperty

public java.lang.String getProperty(java.lang.String name)
Gets the value of a property set in the configuration XML using a <property> element.

Specified by:
getProperty in interface AimsLayer
Parameters:
name - The property name
Returns:
The property value, or null.

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
Sets the value of a property (programmer defined).

Specified by:
setProperty in interface AimsLayer
Parameters:
name - The property name
value - The property value.

getCanZoomToLayer

public boolean getCanZoomToLayer()
Returns a boolean indicator of whether the zoom to layer extent function should be enabled for this layer.

Specified by:
getCanZoomToLayer in interface AimsLayer
Returns:
Always returns false.

setLegendVisible

public void setLegendVisible(boolean isVisible)
Interface compliance only. Not used for thie type of layer.

Specified by:
setLegendVisible in interface AimsLayer
Parameters:
isVisible - A boolean value indicating whether the layer should be visible in the legend.

isAfterArcImsLayers

public boolean isAfterArcImsLayers()

isBeforeArcImsLayers

public boolean isBeforeArcImsLayers()

hasAuthentication

public boolean hasAuthentication()

getAuthenticationId

public java.lang.String getAuthenticationId()

setAuthentication

public void setAuthentication(java.lang.String userpass)

getForwardedImage

public java.lang.String getForwardedImage(java.lang.String imageUrl)

getMapRequestUrlString

public java.lang.String getMapRequestUrlString()

isForwarded

public boolean isForwarded()

getTag

public java.lang.Object getTag()
Gets the user defined object tag assosciated with this object.

Specified by:
getTag in interface AimsLayer
Returns:
A programmer defined object that is associated with this object using the setTag() method. Note that this request returns an Object that must be cast to the appropriate object type before using.

setTag

public void setTag(java.lang.Object tag)
Sets the user defined object associated to this object. The programmer may associate any object to this one using this method, but must cast the object to an Object class before calling this method.

Specified by:
setTag in interface AimsLayer
Parameters:
tag - Any Object.

getCanSymbolize

public boolean getCanSymbolize()
Gets an indicator of whether the layer can be symbolized.

Specified by:
getCanSymbolize in interface AimsLayer
Returns:
Always returns false.

getShowSymbolizeIcon

public boolean getShowSymbolizeIcon()
Gets an indicator of whether the symbolize icon shows up in the layer list.

Specified by:
getShowSymbolizeIcon in interface AimsLayer
Returns:
Always returns false.

adjustScaleFactors

public void adjustScaleFactors(java.lang.String inUnits,
                               java.lang.String outUnits)
Adjusts the scale factors for this layer. Used when changing the units of a map.

Specified by:
adjustScaleFactors in interface AimsLayer
Parameters:
inUnits - The original units, "METERS", FEET" or "DECIMAL_DEGREES".
outUnits - The target units, "METERS", FEET" or "DECIMAL_DEGREES".

adjustScaleFactors

public void adjustScaleFactors(double multiplier)
Adjusts the scale factors for this layer. Used when changing the units of a map.

Specified by:
adjustScaleFactors in interface AimsLayer
Parameters:
multiplier - The multiplication factor for adjusting scale factors.

getObjectType

public int getObjectType()
Gets the type of object this is.

Specified by:
getObjectType in interface AimsObject
Returns:
The enumerated value.


Internet Mapping Framework for ArcIMS Java Object Model API (v5.0.004)
Copyright © 2005 Moxi Media Inc. and Province of British Columbia. All Rights Reserved.