deegree 2.2 (2008/12/22 11:33 build-3038-official)

org.deegree.portal.context
Class LayerList

java.lang.Object
  extended by org.deegree.portal.context.LayerList

public class LayerList
extends Object

Since:
2.0
Version:
$Revision: 9346 $, 1.0. $Revision: 9346 $, $Date: 2007-12-27 17:39:07 +0100 (Do, 27 Dez 2007) $
Author:
Andreas Poth, last edited by: $Author: apoth $

Constructor Summary
LayerList(Layer[] layers)
          Creates a new LayerList object.
 
Method Summary
 void addLayer(Layer layer)
          adds one layer to the the web map context.
 void addLayerToTop(Layer layer)
          adds one layer to the top of the web map context.
 void clear()
          removes all layers from the web map context
 Layer getLayer(String name)
          Deprecated. use @see #getLayer(String, String) instead
 Layer getLayer(String name, String serverAddress)
          returns a layer identifies by its name and service address
 Layer[] getLayers()
          returns all layers of the web map context
 Layer[] getLayersByNodeId(int id)
          returns the layers of a node of the tree of the web map context
 void move(Layer layer, boolean up)
          moves a layer within the layer list up or down
 void move(Layer layer, Layer beforeLayer)
          moves a layer within the layer list before the beforeLayer
 void orderLayerListByLayerTree(Node root)
          TODO: review this changed; it has been introduced as of TreeLayerView Portlet
 Layer removeLayer(String name)
          Deprecated. use @see #removeLayer(String, String) instead
 Layer removeLayer(String name, String serverAddress)
          removes a layer identified by its name from the web map context
 void setLayers(Layer[] layers)
          sets all layers of the web map context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayerList

public LayerList(Layer[] layers)
Creates a new LayerList object.

Parameters:
layers -
Method Detail

getLayer

public Layer getLayer(String name)
Deprecated. use @see #getLayer(String, String) instead

returns a layer identifies by its name

Parameters:
name - name ofthe layer
Returns:
names layer

getLayer

public Layer getLayer(String name,
                      String serverAddress)
returns a layer identifies by its name and service address

Parameters:
name - name ofthe layer
serverAddress - address of the server which servers the layer
Returns:
named layer

getLayers

public Layer[] getLayers()
returns all layers of the web map context

Returns:
array of layers

setLayers

public void setLayers(Layer[] layers)
sets all layers of the web map context

Parameters:
layers -

getLayersByNodeId

public Layer[] getLayersByNodeId(int id)
returns the layers of a node of the tree of the web map context

Returns:
array of layers

orderLayerListByLayerTree

public void orderLayerListByLayerTree(Node root)
TODO: review this changed; it has been introduced as of TreeLayerView Portlet

Parameters:
root -

addLayer

public void addLayer(Layer layer)
adds one layer to the the web map context. If a layer with the same name as the passed layer already exits it will be overwritten

Parameters:
layer -

addLayerToTop

public void addLayerToTop(Layer layer)
adds one layer to the top of the web map context. If a layer with the same name as the passed layer already exits it will be overwritten

Parameters:
layer -

removeLayer

public Layer removeLayer(String name)
Deprecated. use @see #removeLayer(String, String) instead

removes a layer identified by its name from the web map context

Parameters:
name - name of the layer to be removed
Returns:
removed layer

removeLayer

public Layer removeLayer(String name,
                         String serverAddress)
removes a layer identified by its name from the web map context

Parameters:
name - name of the layer to be removed
serverAddress -
Returns:
removed layer

move

public void move(Layer layer,
                 boolean up)
moves a layer within the layer list up or down

Parameters:
layer - layer to be moved
up - if true the layer will be moved up otherwise it will be moved down
Throws:
PortalException - will be thrown if the layer is not known by the layer list.

move

public void move(Layer layer,
                 Layer beforeLayer)
moves a layer within the layer list before the beforeLayer

Parameters:
layer - layer to be moved
beforeLayer -

clear

public void clear()
removes all layers from the web map context


deegree 2.2 (2008/12/22 11:33 build-3038-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net