org.geotools.data.ows
Class Layer

Object
  extended by Layer
All Implemented Interfaces:
Comparable<Layer>

public class Layer
extends Object
implements Comparable<Layer>

Nested list of zero or more map Layers offered by this server. It contains only fields for information that we currently find interesting. Feel free to add your own.

Author:
rgould
Module:

Constructor Summary
Layer()
          Crate a layer with no human readable title.
Layer(String title)
          Create a layer with an optional title
 
Method Summary
 int compareTo(Layer layer)
           
 String get_abstract()
          The abstract contains human-readable information about this layer
 HashMap<Object,CRSEnvelope> getBoundingBoxes()
          Returns every BoundingBox associated with this layer.
 Layer[] getChildren()
           
 GeneralEnvelope getEnvelope(CoordinateReferenceSystem crs)
           
 String[] getKeywords()
          Keywords are Strings to be used in searches
 CRSEnvelope getLatLonBoundingBox()
          Returns the LatLonBoundingBox for this layer.
 String getName()
          Gets the name of the Layer.
 Layer getParent()
          DOCUMENT ME!
 double getScaleDenominatorMax()
          Max scale denominator for which it is appropriate to draw this layer.
 double getScaleDenominatorMin()
          Min scale denominator for which it is appropriate to draw this layer.
 double getScaleHintMax()
          Deprecated. Use getScaleDenomiatorMax() as there is less confusion over meaning
 double getScaleHintMin()
          Deprecated. Use getScaleDenomiatorMin() as there is less confusion over meaning
 Set getSrs()
          Accumulates all of the srs/crs specified for this layer and all srs/crs inherited from its ancestors.
 List getStyles()
          Accumulates all of the styles specified for this layer and all styles inherited from its ancestors.
 String getTitle()
           
 boolean isQueryable()
          Determines if this layer is queryable.
 void set_abstract(String _abstract)
           
 void setBoundingBoxes(HashMap boundingBoxes)
          Sets this layer's bounding boxes.
 void setChildren(Layer[] children)
           
 void setKeywords(String[] keywords)
           
 void setLatLonBoundingBox(CRSEnvelope latLonBoundingBox)
           
 void setName(String name)
          Sets the name of this layer.
 void setParent(Layer parent)
          DOCUMENT ME!
 void setQueryable(boolean queryable)
           
 void setScaleDenominatorMax(double scaleDenominatorMax)
          Max scale denominator for which it is appropriate to draw this layer.
 void setScaleDenominatorMin(double scaleDenominatorMin)
          Min scale denominator for which it is appropriate to draw this layer.
 void setScaleHintMax(double scaleHintMax)
          Deprecated. Use setScaleDenomiatorMax() as there is less confusion over meaning
 void setScaleHintMin(double scaleHintMin)
          Deprecated. Use setScaleDenomiatorMin() as there is less confusion over meaning
 void setSrs(Set srs)
           
 void setStyles(List styles)
           
 void setTitle(String title)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Layer

public Layer()
Crate a layer with no human readable title.

These layers are simply for organization and storage of common settings (like SRS or style settings). These settings will be valid for all children.


Layer

public Layer(String title)
Create a layer with an optional title

Parameters:
title -
Method Detail

getBoundingBoxes

public HashMap<Object,CRSEnvelope> getBoundingBoxes()
Returns every BoundingBox associated with this layer. The HashMap returned has each bounding box's CRS/SRS value as the key, and the value is the BoundingBox object itself. Implements inheritance: if this layer's bounding box is null, query ancestors until the first bounding box is found or no more ancestors

Returns:
a HashMap of all of this layer's bounding boxes or null if no bounding boxes found

setBoundingBoxes

public void setBoundingBoxes(HashMap boundingBoxes)
Sets this layer's bounding boxes. The HashMap must have each BoundingBox's CRS/SRS value as its key, and the BoundingBox object as its value.

Parameters:
boundingBoxes - a HashMap containing bounding boxes

getName

public String getName()
Gets the name of the Layer. It is designed to be machine readable, and if it is present, this layer is determined to be drawable and is a valid candidate for use in a GetMap or GetFeatureInfo request.

Returns:
the machine-readable name of the layer

setName

public void setName(String name)
Sets the name of this layer. Giving the layer name indicates that it can be drawn during a GetMap or GetFeatureInfo request.

Parameters:
name - the layer's new name

getSrs

public Set getSrs()
Accumulates all of the srs/crs specified for this layer and all srs/crs inherited from its ancestors. No duplicates are returned.

Returns:
Set of all srs/crs for this layer and its ancestors

setSrs

public void setSrs(Set srs)

getStyles

public List getStyles()
Accumulates all of the styles specified for this layer and all styles inherited from its ancestors. No duplicates are returned. The List that is returned is of type List. Before 2.2-RC0 it was of type List.

Returns:
List of all styles for this layer and its ancestors

setStyles

public void setStyles(List styles)

getTitle

public String getTitle()

setTitle

public void setTitle(String title)

isQueryable

public boolean isQueryable()
Determines if this layer is queryable. Implements inheritance: if this layer's Queryable attribute is null, check ancestors until the first Queryable attribute is found or no more ancestors. If a Queryable attribute is not found for this layer, it will return the default value of false.

Returns:
true is this layer is Queryable

setQueryable

public void setQueryable(boolean queryable)

compareTo

public int compareTo(Layer layer)
Specified by:
compareTo in interface Comparable<Layer>

getParent

public Layer getParent()
DOCUMENT ME!

Returns:
Returns the parent.

setParent

public void setParent(Layer parent)
DOCUMENT ME!

Parameters:
parent - The parent to set.

getLatLonBoundingBox

public CRSEnvelope getLatLonBoundingBox()
Returns the LatLonBoundingBox for this layer. Implements inheritance: if this layer's bounding box is null, query ancestors until the first bounding box is found or no more ancestors.

Returns:
the LatLonBoundingBox for this layer or null if no lat/lon bounding box is found

setLatLonBoundingBox

public void setLatLonBoundingBox(CRSEnvelope latLonBoundingBox)

getChildren

public Layer[] getChildren()

setChildren

public void setChildren(Layer[] children)

get_abstract

public String get_abstract()
The abstract contains human-readable information about this layer

Returns:
Returns the _abstract.

set_abstract

public void set_abstract(String _abstract)
Parameters:
_abstract - The _abstract to set.

getKeywords

public String[] getKeywords()
Keywords are Strings to be used in searches

Returns:
Returns the keywords.

setKeywords

public void setKeywords(String[] keywords)
Parameters:
keywords - The keywords to set.

setScaleDenominatorMax

public void setScaleDenominatorMax(double scaleDenominatorMax)
Max scale denominator for which it is appropriate to draw this layer.

Scale denominator is calculated based on the bounding box of the central pixel in a request (ie not a scale based on real world size of the entire layer).

Parameters:
Max - scale denominator for which it is approprirate to draw this layer

getScaleDenominatorMax

public double getScaleDenominatorMax()
Max scale denominator for which it is appropriate to draw this layer.

Scale denominator is calculated based on the bounding box of the central pixel in a request (ie not a scale based on real world size of the entire layer).

Some web map servers will refuse to render images at a scale greater than the value provided here.

return Max scale denominator for which it is appropriate to draw this layer.


setScaleDenominatorMin

public void setScaleDenominatorMin(double scaleDenominatorMin)
Min scale denominator for which it is appropriate to draw this layer.

Scale denominator is calculated based on the bounding box of the central pixel in a request (ie not a scale based on real world size of the entire layer).

Parameters:
Min - scale denominator for which it is appropriate to draw this layer

getScaleDenominatorMin

public double getScaleDenominatorMin()
Min scale denominator for which it is appropriate to draw this layer.

Scale denominator is calculated based on the bounding box of the central pixel in a request (ie not a scale based on real world size of the entire layer).

Some web map servers will refuse to render images at a scale less than the value provided here.

return Min scale denominator for which it is appropriate to draw this layer


getScaleHintMax

public double getScaleHintMax()
Deprecated. Use getScaleDenomiatorMax() as there is less confusion over meaning

Maximum scale for which this layer is considered good.

We assume this calculation is done in a similar manner to getScaleDenominatorMax(); but a look at common web services such as JPL show this not to be the case.

Returns:
The second scale hint value (understood to mean the max value)

setScaleHintMax

public void setScaleHintMax(double scaleHintMax)
Deprecated. Use setScaleDenomiatorMax() as there is less confusion over meaning

Maximum scale for which this layer is considered good.

We assume this calculation is done in a similar manner to setScaleDenominatorMax(); but a look at common web services such as JPL show this not to be the case.

Parameters:
The - second scale hint value (understood to mean the max value)

getScaleHintMin

public double getScaleHintMin()
Deprecated. Use getScaleDenomiatorMin() as there is less confusion over meaning

Minimum scale for which this layer is considered good.

We assume this calculation is done in a similar manner to getScaleDenominatorMin(); but a look at common web services such as JPL show this not to be the case.

Returns:
The first scale hint value (understood to mean the min value)

setScaleHintMin

public void setScaleHintMin(double scaleHintMin)
Deprecated. Use setScaleDenomiatorMin() as there is less confusion over meaning

Minimum scale for which this layer is considered good.

We assume this calculation is done in a similar manner to setScaleDenominatorMin(); but a look at common web services such as JPL show this not to be the case.

param The first scale hint value (understood to mean the min value)


getEnvelope

public GeneralEnvelope getEnvelope(CoordinateReferenceSystem crs)


Copyright © 1996-2009 Geotools. All Rights Reserved.