com.esri.aims.mtier.model.map
Class Layers

java.lang.Object
  extended by com.esri.aims.mtier.model.map.Layers
All Implemented Interfaces:
Serializable

public class Layers
extends Object
implements Serializable

The Layers object is a collection of individual layers associated with the Map objects service. This class supports methods for adding, removing, retrieving, and manipulating layer objects in the collection.

See Also:
Serialized Form

Constructor Summary
Layers()
          Constructs an instance of the Layers object.
 
Method Summary
 boolean add(Object layer)
          Adds the given Layer object to the Layers collection.
 boolean clear()
          Clears all Layers from the Layers collection.
 int getCount()
          Returns the count of all Layer objects in this Layers collection.
 ExtractOutput getExtractOutput()
          Returns the ExtractOutput object containing information on the extraction.
 Vector getLayersCollection()
          Returns the collection of layers.
 boolean insert(Object layer, int index)
          Inserts a Layer at specified location in the Layers collection.
 boolean isDynamicFirst()
          Returns 'True' if the setDynamicFirst method is set to 'True'.
 boolean isGeometry()
          Returns 'True' if geometry has been set.
 boolean isNodeDefault()
          Returns 'True' if the setNodeDefault method is set to 'True'.
 boolean isOrder()
          Returns 'True' if the setOrder method is set to 'True'.
 Layer item(int index)
          Returns a Layer at given index from the Layers collection.
 boolean moveTo(int fromIndex, int toIndex)
          Moves the specified Layer in this Layers collection to another location in the collection.
 boolean moveToBottom(int index)
          Moves the specified Layer in this Layers collection to the end of collection.
 boolean moveToTop(int index)
          Moves the specified Layer in this Layers collection to be the first item in the collection.
 boolean remove(int index)
          Removes a Layer at given index from the Layers collection.
 void setDynamicFirst(boolean value)
          When set to 'True', draws all dynamic layers before any layers defined in the service.
 void setGeometry(boolean value)
          Enables feature geometry information to be returned from the Spatial Server.
 void setNodeDefault(boolean value)
          When set to 'True', only Map service and dynamic layers in the layerlist are displayed on the Map.
 void setOrder(boolean value)
          When set to 'True', draws all the Layers in order of their IDs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Layers

public Layers()
Constructs an instance of the Layers object.

Example:

Layers layers = new Layers();

Method Detail

add

public boolean add(Object layer)
Adds the given Layer object to the Layers collection. The Layer objects can be a FeatureLayer, an ImageLayer or an AcetateLayer. Example:
layers.add(acetateLayer);

Parameters:
layer - the layer object to be added.
See Also:
item(int)

item

public Layer item(int index)
Returns a Layer at given index from the Layers collection. Example:
String name = layers.item(0).getName();

Parameters:
index - the index value in the layers collection.
Returns:
the Layer object
See Also:
add(java.lang.Object)

insert

public boolean insert(Object layer,
                      int index)
Inserts a Layer at specified location in the Layers collection. Example:
layers.insert(featureLayer, 2);

Parameters:
layer - the layer object.
index - the collection location.
See Also:
remove(int), clear()

clear

public boolean clear()
Clears all Layers from the Layers collection. Example:
layers.clear();

Returns:
a boolean value - True, if successful, False otherwise.
See Also:
remove(int), add(java.lang.Object)

remove

public boolean remove(int index)
Removes a Layer at given index from the Layers collection. Example:
layers.remove(2);

Parameters:
index - the index of the Layer to be removed.
Returns:
a boolean value - True, if successful, False otherwise.
See Also:
clear(), add(java.lang.Object)

getCount

public int getCount()
Returns the count of all Layer objects in this Layers collection. Example:
int count = layers.getCount();

Returns:
the count of Layer objects in this Layers collection.

moveTo

public boolean moveTo(int fromIndex,
                      int toIndex)
Moves the specified Layer in this Layers collection to another location in the collection. Example:
layers.moveTo(0, 3);

Parameters:
fromIndex - the from location of the object to move.
toIndex - the location where to place the from location object.
See Also:
moveToBottom(int), moveToTop(int), insert(java.lang.Object, int)

moveToBottom

public boolean moveToBottom(int index)
Moves the specified Layer in this Layers collection to the end of collection. Example:
layers.moveToBottom(2);

Parameters:
index - the location of the Layer to be moved.
See Also:
moveTo(int, int), moveToTop(int), insert(java.lang.Object, int)

moveToTop

public boolean moveToTop(int index)
Moves the specified Layer in this Layers collection to be the first item in the collection. Example:
layers.moveToTop(3);

Parameters:
index - the location of the Layer to be moved.
See Also:
moveToBottom(int), moveTo(int, int), insert(java.lang.Object, int)

getExtractOutput

public ExtractOutput getExtractOutput()
Returns the ExtractOutput object containing information on the extraction. Example:
String url = layers.getExtractOutput().getURL();

Returns:
ExtractOutput

setDynamicFirst

public void setDynamicFirst(boolean value)
When set to 'True', draws all dynamic layers before any layers defined in the service. Example:
layers.setDynamicFirst(true);

Parameters:
value - the dynamicfirst value.
See Also:
isDynamicFirst()

isDynamicFirst

public boolean isDynamicFirst()
Returns 'True' if the setDynamicFirst method is set to 'True'. Example:
if(layers.isDynamicFirst() == true){ layers.setDynamicFirst(false); } 

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

setOrder

public void setOrder(boolean value)
When set to 'True', draws all the Layers in order of their IDs. Example:
layers.setOrder(true);

Parameters:
value - the order value.
See Also:
isOrder()

isOrder

public boolean isOrder()
Returns 'True' if the setOrder method is set to 'True'. Example:
if(layers.isOrder() == true){ layers.setOrder(false); }

Returns:
boolean
See Also:
setOrder(boolean)

setNodeDefault

public void setNodeDefault(boolean value)
When set to 'True', only Map service and dynamic layers in the layerlist are displayed on the Map. Example:
layers.setNodeDefault(true);

Parameters:
value - the nodedefault value.
See Also:
isNodeDefault()

isNodeDefault

public boolean isNodeDefault()
Returns 'True' if the setNodeDefault method is set to 'True'. Example:
if(layers.isNodeDefault() == true){ layers.setNodeDefault(false); }

Returns:
the nodedefault value.
See Also:
setNodeDefault(boolean)

setGeometry

public void setGeometry(boolean value)
Enables feature geometry information to be returned from the Spatial Server. Example:
layers.setGeometry(true);

Parameters:
value - the boolean value.
See Also:
isGeometry()

isGeometry

public boolean isGeometry()
Returns 'True' if geometry has been set. Example:
if(layers.isGeometry() == true){layers.setGeometry(false); }

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

getLayersCollection

public Vector getLayersCollection()
Returns the collection of layers. Example:
Vector myLayers = layers.getLayersCollection();

Returns:
the collection of layers as a Vector.