com.esri.wms.client
Class Layer

java.lang.Object
  extended by com.esri.wms.client.Layer
All Implemented Interfaces:
Serializable

public class Layer
extends Object
implements Serializable

Defines a WMS Layer with name, style, SRS, and bounding box.

See Also:
Serialized Form

Field Summary
protected  String abstractInfo
          The abstract information of the layer.
protected  boolean cascaded
          True if the layer has not been retransmitted by a Cascading Map Server.
protected  List<Envelope> extents
          The BoundingBoxs of the layer.
protected  Integer fixedHeight
          0: WMS can produce map of arbitrary height.
protected  Integer fixedWidth
          0: WMS can produce map of arbitrary width.
protected  Envelope fullExtent
          The full extent of the layer.
protected  List<Layer> layers
          Sub-layers of the layer.
protected  double maxScale
          Defines the upper range of scales for which it is appropriate to display the layer.
protected  double minScale
          Defines the lower range of scales for which it is appropriate to display the layer.
protected  String name
          If, and only if, a layer has a Name, then it is a map layer that can be requested by using that Name in the LAYERS parameter of a GetMap request.
protected  boolean noSubsets
          false: WMS can map a subset of the full bounding box.
protected  boolean opaque
          false: map data represents vector features that probably do not completely fill space.
protected  boolean queryable
          True if the layer supports GetFeatureInfo operation.
protected  List<SpatialReference> spatialReferences
          Supported spatial reference of the layer.
protected  NamedStyle style
          Different than validStyles, this property is the layer style for GetMap operation.
protected  String title
          A Title is mandatory for all layers; it is a human-readable string for presentation in a menu.
protected  List<NamedStyle> validStyles
          Zero or more Styles may be advertised for a Layer or collection of layers using Style elements, each of which shall have Name and Title elements.
protected  boolean visible
          True if the layer is visible.
 
Constructor Summary
Layer()
           
 
Method Summary
 boolean equals(Object obj)
          Compares the specified object with this instance for equality.
 String getAbstract()
          Gets the abstract information of the Layer.
 List<Envelope> getExtents()
          Gets the extents of the layer.
 Integer getFixedHeight()
          Gets the fixed height of the Layer.
 Integer getFixedWidth()
          Gets the fixed width of the Layer.
 Envelope getFullExtent()
          Gets the full extent of the Layer.
 List<Layer> getLayers()
          Gets the sub-layers.
 double getMaxScale()
          Defines the upper range of scales for which it is appropriate to display the layer.
 double getMinScale()
          Defines the lower range of scales for which it is appropriate to display the layer.
 String getName()
          Gets the name of the Layer.
 List<SpatialReference> getSpatialReferences()
          Gets the supported spatial references on the Layer.
 NamedStyle getStyle()
          Gets the style of the Layer for map rendering.
 List<NamedStyle> getStyles()
          Gets the supported styles on the layer.
 String getTitle()
          Gets the title of the layer.
 int hashCode()
          Returns the hash code of the request object.
 boolean isCascaded()
          Returns true if the layer is cascaded.
 boolean isDisabled()
          Returns whether this layer is disabled.
 boolean isLeaf()
          Returns true if the layer has no child.
 boolean isNoSubsets()
          When returns a true value, "noSubsets" indicates that the server is not able to make a map of a geographic area other than the layer's bounding box.
 boolean isOpaque()
          Returns false if maps made from the Layer will generally have significant no-data areas that a client may display as transparent.
 boolean isQueryable()
          Returns true if the layer supports GetFeatureInfo operation.
 boolean isVisible()
          Returns true if the layer is visible.
 void setDisabled(boolean disabled)
          Sets whether the layer should be disabled.
 void setStyle(NamedStyle style)
          Sets the style of the Layer.
 void setVisible(boolean visible)
          Sets to true if the layer is visible.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

layers

protected List<Layer> layers
Sub-layers of the layer.


validStyles

protected List<NamedStyle> validStyles
Zero or more Styles may be advertised for a Layer or collection of layers using Style elements, each of which shall have Name and Title elements. The style's Name is used in the Map request STYLES parameter. The Title is a human-readable string. If only a single style is available, that style is known as the "default" style and need not be advertised by the server.


spatialReferences

protected List<SpatialReference> spatialReferences
Supported spatial reference of the layer.


name

protected String name
If, and only if, a layer has a Name, then it is a map layer that can be requested by using that Name in the LAYERS parameter of a GetMap request. A Layer that contains a Name element is referred to as a "named layer" in this International Standard. If the layer has a Title but no Name, then that layer is only a category title for all the layers nested within.


title

protected String title
A Title is mandatory for all layers; it is a human-readable string for presentation in a menu. The Title is not inherited by child Layers.


abstractInfo

protected String abstractInfo
The abstract information of the layer.


queryable

protected boolean queryable
True if the layer supports GetFeatureInfo operation.


cascaded

protected boolean cascaded
True if the layer has not been retransmitted by a Cascading Map Server.


noSubsets

protected boolean noSubsets
false: WMS can map a subset of the full bounding box. true: WMS can only map the entire bounding box.


fixedWidth

protected Integer fixedWidth
0: WMS can produce map of arbitrary width. nonzero: value is fixed map width that cannot be changed by the WMS.


fixedHeight

protected Integer fixedHeight
0: WMS can produce map of arbitrary height. nonzero: value is fixed map height that cannot be changed by the WMS.


opaque

protected boolean opaque
false: map data represents vector features that probably do not completely fill space. true: map data are mostly or completely opaque.


minScale

protected double minScale
Defines the lower range of scales for which it is appropriate to display the layer.


maxScale

protected double maxScale
Defines the upper range of scales for which it is appropriate to display the layer.


extents

protected List<Envelope> extents
The BoundingBoxs of the layer.


fullExtent

protected Envelope fullExtent
The full extent of the layer.


style

protected NamedStyle style
Different than validStyles, this property is the layer style for GetMap operation. Set it to null to use the default style.


visible

protected boolean visible
True if the layer is visible.

Constructor Detail

Layer

public Layer()
Method Detail

isCascaded

public boolean isCascaded()
Returns true if the layer is cascaded. A Layer is said to have been "cascaded" if it was obtained from an originating server and then included in the service metadata of a different server.


getFixedHeight

public Integer getFixedHeight()
Gets the fixed height of the Layer. When present and nonzero, fixedWidth and fixedHeight indicate that the server is not able to produce a map of the layer at a width and height different from the fixed sizes indicated.

Returns:
Returns the fixed height.

getFixedWidth

public Integer getFixedWidth()
Gets the fixed width of the Layer. When present and nonzero, fixedWidth and fixedHeight indicate that the server is not able to produce a map of the layer at a width and height different from the fixed sizes indicated.

Returns:
Returns the fixedWidth.

getLayers

public List<Layer> getLayers()
Gets the sub-layers.

Returns:
Returns the layers.

getMaxScale

public double getMaxScale()
Defines the upper range of scales for which it is appropriate to display the layer.

Returns:
Returns the scale.

getMinScale

public double getMinScale()
Defines the lower range of scales for which it is appropriate to display the layer.

Returns:
Returns the minScale.

getName

public String getName()
Gets the name of the Layer.

Returns:
Returns the name.

isQueryable

public boolean isQueryable()
Returns true if the layer supports GetFeatureInfo operation.


isNoSubsets

public boolean isNoSubsets()
When returns a true value, "noSubsets" indicates that the server is not able to make a map of a geographic area other than the layer's bounding box.


getTitle

public String getTitle()
Gets the title of the layer.

Returns:
Returns the title.

getSpatialReferences

public List<SpatialReference> getSpatialReferences()
Gets the supported spatial references on the Layer.

Returns:
Returns the spatialReferences.

getStyles

public List<NamedStyle> getStyles()
Gets the supported styles on the layer.

Returns:
Returns the validStyles.

getStyle

public NamedStyle getStyle()
Gets the style of the Layer for map rendering.

Returns:
Returns the style.

setStyle

public void setStyle(NamedStyle style)
Sets the style of the Layer. The style should be one of the supported styles, and will be used for GeMap operation.

Parameters:
style - The style to set.

isVisible

public boolean isVisible()
Returns true if the layer is visible. It is for the GetMap operation.


setVisible

public void setVisible(boolean visible)
Sets to true if the layer is visible.

Parameters:
visible - The visible to set.

getExtents

public List<Envelope> getExtents()
Gets the extents of the layer. A Layer may have multiple extents, but each one shall state a different CRS.


getFullExtent

public Envelope getFullExtent()
Gets the full extent of the Layer.

Returns:
Returns the fullExtent.

isDisabled

public boolean isDisabled()
Returns whether this layer is disabled. When disabled, the layer is excluded from the Map and Table of Contents.

Returns:
Returns the disabled.

setDisabled

public void setDisabled(boolean disabled)
Sets whether the layer should be disabled. When disabled, the layer is excluded from the Map and Table of Contents.

Parameters:
disabled - The disabled to set.

getAbstract

public String getAbstract()
Gets the abstract information of the Layer.

Returns:
Returns the abstractInfo.

isOpaque

public boolean isOpaque()
Returns false if maps made from the Layer will generally have significant no-data areas that a client may display as transparent.


isLeaf

public boolean isLeaf()
Returns true if the layer has no child.

Returns:
true if the layer has no child.

hashCode

public int hashCode()
Returns the hash code of the request object.

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Compares the specified object with this instance for equality. Returns true if all fields of the two Objects are equal.

Overrides:
equals in class Object
Parameters:
obj - object to be compared for equality with this instance.
Returns:
Returns true if the specified object is equal to this instance.