com.moximedia.aims
Class AimsImageLayer

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

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

The AimsImageLayer class represents an image based layer. There is no recordset associated with an image layer.

See Also:
Serialized Form

Field Summary
 java.util.HashMap m_properties
           
 
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
AimsImageLayer()
          Do not use.
AimsImageLayer(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
 AimsBands getBands()
          Gets the image pixel information received from a GET_RASTER_INFO request.
 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 getId()
          get ID of the layer
 java.lang.String getIdentifyHandler()
          Gets the identify handler URL for the layer.
 boolean getIdentifyWindow()
          Gets whether a separate identify window is used for 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.
 AimsImageLayer getLayerManagerCopy(AimsMap map)
          Creates a copy of this layer for use in another map.
 int getLayerType()
          Gets the layer type, AimsLayer.LAYER_TYPE_IMAGE
 boolean getLegendVisible()
          Returns whether the layer should be visible in the legend.
 AimsMap getMap()
          Gets the map object containing this layer.
 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 hasLayerListLegend()
          Gets and indicator of whether a layer list legend exists at this scale.
 boolean isBufferLayer()
           
 boolean isClone()
           
 boolean isDynamic()
          returns an indicator of whether a layer is dynamic.
 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.
 boolean query(AimsPoint pt)
          Queries an image layer, returning the image pixel information for the specified location.
 boolean query(double x, double y)
          Queries an image layer, returning the image pixel information for the specified location
 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 setCanZoomToLayer(boolean canZoom)
          Sets whether the zoom to layer extent function should be enabled for this layer.
 void setDataset(AimsDataset ds)
          Sets the dataset, for use with dynamic layers.
 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)
          Sets the visibility of the layer in the legend.
 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)
           
 void setName(java.lang.String name)
          Sets the name of the layer.
 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 setTransparency(double value)
          Sets the opaqueness for the image layer.
 void setTransparencyColor(AimsColor color)
          Sets the transparency color for the image layer.
 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
 

Field Detail

m_properties

public java.util.HashMap m_properties
Constructor Detail

AimsImageLayer

public AimsImageLayer()
Do not use. For serialization only.


AimsImageLayer

public AimsImageLayer(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.

setDataset

public void setDataset(AimsDataset ds)
Sets the dataset, for use with dynamic layers. 2param ds The dataset object.


isDynamic

public boolean isDynamic()
returns an indicator of whether a layer is dynamic.

Specified by:
isDynamic in interface AimsLayer
Returns:
tru if dynamic, otherwise false.

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.

getLayerManagerCopy

public AimsImageLayer getLayerManagerCopy(AimsMap map)
Creates a copy of this layer for use in another map. Intended for the layer manager process.

Parameters:
map - The map where this layer will be copied to.
Returns:
A copy of this layer.

getObjectId

public int getObjectId()
Returns the IMF internal id for this layer. Note that this is not the same as the layer id assigned by the user or ArcIMS.

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

getLayerType

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

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

getMap

public AimsMap getMap()
Gets the map object containing this layer.

Specified by:
getMap in interface AimsLayer
Returns:
The map object containing this layer.

query

public boolean query(AimsPoint pt)
Queries an image layer, returning the image pixel information for the specified location. After this process is run, access the information in the AimsBands object accessed from the getBands() method.

Parameters:
pt - The location.
Returns:
True if the query was successful, otherwise false.

query

public boolean query(double x,
                     double y)
Queries an image layer, returning the image pixel information for the specified location

Parameters:
x - The X coordinate value.
y - The Y coordinate value.
Returns:
True if the query was successful, otherwise false.

getBands

public AimsBands getBands()
Gets the image pixel information received from a GET_RASTER_INFO request.

Returns:
The bands information.

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:
True if the map should immediately refresh, otherwise false.

getLegendVisible

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

Specified by:
getLegendVisible in interface AimsLayer
Returns:
True if the layer is visible, otherwise false.

setLegendVisible

public void setLegendVisible(boolean isVisible)
Sets the visibility of the layer in the legend.

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

getType

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

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

getId

public java.lang.String getId()
get ID of the layer

Specified by:
getId in interface AimsLayer
Returns:
ID of the layer

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:
True if the layer is defined in the map service, otherwise false.

setId

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

Parameters:
id - The id for the layer. Should be numeric.

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.


setName

public void setName(java.lang.String name)
Sets the name of the layer. Don't use this unless the layer is dynamic.

Parameters:
name - The layer 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:
The AXL string to refresh this object.

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 AimsImageLayers.

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

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 on image layers.

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 for image layers.

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:
The extent of the layer.

getIdentifyHandler

public java.lang.String getIdentifyHandler()
Gets the identify handler URL for the layer.

Returns:
The identify handler URL for the layer.

getIdentifyWindow

public boolean getIdentifyWindow()
Gets whether a separate identify window is used for the layer.

Returns:
True if a separate identify window is used for the layer.

getCanIdentify

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

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

setCanIdentify

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


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:
True if the layer can be identified using the drill down identify tool, otherwise false.

setCanDrillIdentify

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


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:
True if the user can zoom to this layer, otherwise false.

setCanZoomToLayer

public void setCanZoomToLayer(boolean canZoom)
Sets whether the zoom to layer extent function should be enabled for this layer.

Parameters:
canZoom - True if the user can zoom to this layer, otherwise false.

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.

setTransparency

public void setTransparency(double value)
Sets the opaqueness for the image layer. Used for dynamic layers only.

Parameters:
value - Value to set percentage of transparency. 1.0 is 0 percent transparent. 0.0 is 100 percent transparent.

setTransparencyColor

public void setTransparencyColor(AimsColor color)
Sets the transparency color for the image layer. Used for dynamic layers only.

Parameters:
color - The transparent color.

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.