com.esri.aims.mtier.model.map.layer
Class Layer

java.lang.Object
  extended by com.esri.aims.mtier.model.map.layer.Layer
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AcetateLayer, FeatureLayer, ImageLayer

public abstract class Layer
extends Object
implements Serializable

Implements an abstract ArcIMS Layer.

See Also:
Serialized Form

Constructor Summary
Layer()
          Constructs an instance of Layer.
Layer(String id, String minScale, String maxScale)
          Constructs an instance of Layer with given values.
 
Method Summary
 String getID()
          Returns the ID asociated with this Layer object.
 String getMaxScale()
          Returns the maximum scale value of the Layer object.
 String getMinScale()
          Returns the minimum scale value of the Layer object.
 String getName()
          Returns the name of the Layer object.
abstract  String getType()
           
 boolean isVisible()
          Returns "True", if the visibility property for this Layer is set.
 void setID(String value)
          Sets the given string as ID for this Layer object.
 void setMaxScale(String value)
          Sets the maximum scale of the Layer object and can be used only for adding dynamic layer.
 void setMinScale(String value)
          Sets the minimum scale of the Layer object and can be used only for adding dynamic layer.
 void setName(String name)
          Sets the name of the Layer object.
 void setVisible(boolean value)
          Sets the visibility property for this Layer object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Layer

public Layer(String id,
             String minScale,
             String maxScale)
Constructs an instance of Layer with given values. Example:
Layer layer = new Layer(1,"1:24000","1:100000");

Parameters:
id - the layer id.
minScale - the minimum scale value.
maxScale - the maximum scale value.

Layer

public Layer()
Constructs an instance of Layer. Example:
Layer layer = new Layer();

Method Detail

getType

public abstract String getType()

setID

public void setID(String value)
Sets the given string as ID for this Layer object. Example:
layer.setID("1");

Parameters:
value - the ID value.
See Also:
getID()

setMaxScale

public void setMaxScale(String value)
Sets the maximum scale of the Layer object and can be used only for adding dynamic layer. Scales can be set using a relative scale or by calculating the number of map units per pixel. Please refer to ArcXML Programmer's Reference Guide LAYER element for more information. Example:
layer.setMaxScale("1:200000");

Parameters:
value - the maximum scale value.
See Also:
getMaxScale()

setMinScale

public void setMinScale(String value)
Sets the minimum scale of the Layer object and can be used only for adding dynamic layer. Example:
layer.setMinScale("1:24000");

Parameters:
value - the minimum scale value.
See Also:
getMinScale()

getMaxScale

public String getMaxScale()
Returns the maximum scale value of the Layer object. See ArcXML documentation <LAYERINFO> for the explanation of maxscale Example:
String maxScale = layer.getMaxScale();

Returns:
the max scale value
See Also:
setMaxScale(java.lang.String)

getMinScale

public String getMinScale()
Returns the minimum scale value of the Layer object. See ArcXML documentation <LAYERINFO> for the explanation of minscale Example:
String minScale = layer.getMinScale();

Returns:
the min scale value
See Also:
setMinScale(java.lang.String)

getID

public String getID()
Returns the ID asociated with this Layer object. Example:
String id = layer.getID();

Returns:
String
See Also:
setID(java.lang.String)

setName

public void setName(String name)
Sets the name of the Layer object. Example: >
layer.setName("Lakes");

Parameters:
name - the name string.
See Also:
getName()

getName

public String getName()
Returns the name of the Layer object. Example:
String name = layer.getName();

Returns:
the name string.
See Also:
setName(java.lang.String)

setVisible

public void setVisible(boolean value)
Sets the visibility property for this Layer object. Example:
layer.setVisible(true);

Parameters:
value - a boolean value - True or False.
See Also:
isVisible()

isVisible

public boolean isVisible()
Returns "True", if the visibility property for this Layer is set. Example:
 if(layer.isVisible() == true){
  layer.setVisible(false);
 }
 

Returns:
a boolean value.
See Also:
setVisible(boolean)