Class LayerDetails
java.lang.Object
org.openstreetmap.josm.data.imagery.LayerDetails
The details of a layer of this WMS server.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringThe layer abstract (WMSAbstract)private Boundsprivate List<LayerDetails>private final Collection<String>private StringThe layer name (WMSName)private final LayerDetailsprivate StringThe layer name (WMSTitle) -
Constructor Summary
ConstructorsConstructorDescriptionLayerDetails(LayerDetails parentLayer) Constructor pointing to parent layer. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd projection supported by this layervoidAdd style to list of styles defined by this layerReturns flattened stream of this layer and its children.Returns abstract of this layer.Returns bounds within layer might be queried.Returns children layers of this layer.getCrs()Returns projections that are supported by this layer.getName()Citation from OGC WMS specification (WMS 1.3.0):Returns parent layer for this layer.Returns styles defined for this layer.getTitle()Returns "Human readable" title of this layerbooleanif user may select this layer (is it possible to request it from server)voidsetAbstract(String abstr) Sets abstract of this layervoidSets bounds of this layervoidsetChildren(List<LayerDetails> children) sets children layers for this layervoidSets the name of this Layer.voidSets title of this layertoString()
-
Field Details
-
styles
-
crs
-
title
The layer name (WMSTitle) -
name
The layer name (WMSName) -
abstr
The layer abstract (WMSAbstract)- Since:
- 13199
-
parentLayer
-
bounds
-
children
-
-
Constructor Details
-
LayerDetails
Constructor pointing to parent layer. Set to null if this is topmost layer. This is needed to properly handle layer attributes inheritance.- Parameters:
parentLayer- parent layer
-
-
Method Details
-
getCrs
Returns projections that are supported by this layer.- Returns:
- projections that are supported by this layer
-
getStyles
Returns styles defined for this layer.- Returns:
- styles defined for this layer
-
getTitle
Returns "Human readable" title of this layer- Returns:
- "Human readable" title of this layer
- See Also:
-
setTitle
Sets title of this layer- Parameters:
title- title of this layer- See Also:
-
getName
Citation from OGC WMS specification (WMS 1.3.0):A number of elements have both a <Name> and a <Title>. The Name is a text string used for machine-to-machine communication while the Title is for the benefit of humans. For example, a dataset might have the descriptive Title “Maximum Atmospheric Temperature” and be requested using the abbreviated Name “ATMAX”.
And second citation: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.
- Returns:
- name of this layer
-
setName
Sets the name of this Layer.- Parameters:
name- the name of this Layer- See Also:
-
addStyle
Add style to list of styles defined by this layer- Parameters:
name- machine-to-machine name of this styletitle- human readable title of this style
-
addCrs
Add projection supported by this layer- Parameters:
crs- projection code
-
getBounds
Returns bounds within layer might be queried.- Returns:
- bounds within layer might be queried
-
setBounds
Sets bounds of this layer- Parameters:
bounds- of this layer
-
toString
-
getParent
Returns parent layer for this layer.- Returns:
- parent layer for this layer
-
setChildren
sets children layers for this layer- Parameters:
children- children of this layer
-
getChildren
Returns children layers of this layer.- Returns:
- children layers of this layer
-
isSelectable
if user may select this layer (is it possible to request it from server)- Returns:
- true if user may select this layer, false if this layer is only grouping other layers
-
getAbstract
Returns abstract of this layer.- Returns:
- "Narrative description of the layer"
-
setAbstract
Sets abstract of this layer- Parameters:
abstr- abstract of this layer
-
flattened
Returns flattened stream of this layer and its children.- Returns:
- flattened stream of this layer and its children (as well as recursively children of its children)
-