Class LayerDetails


  • public class LayerDetails
    extends java.lang.Object
    The details of a layer of this WMS server.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String abstr
      The layer abstract (WMS Abstract)
      private Bounds bounds  
      private java.util.List<LayerDetails> children  
      private java.util.Collection<java.lang.String> crs  
      private java.lang.String name
      The layer name (WMS Name)
      private LayerDetails parentLayer  
      private java.util.Map<java.lang.String,​java.lang.String> styles  
      private java.lang.String title
      The layer name (WMS Title)
    • Constructor Summary

      Constructors 
      Constructor Description
      LayerDetails​(LayerDetails parentLayer)
      Constructor pointing to parent layer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addCrs​(java.lang.String crs)
      Add projection supported by this layer
      void addStyle​(java.lang.String name, java.lang.String title)
      Add style to list of styles defined by this layer
      java.util.stream.Stream<LayerDetails> flattened()
      Returns flattened stream of this layer and its children.
      java.lang.String getAbstract()
      Returns abstract of this layer.
      Bounds getBounds()
      Returns bounds within layer might be queried.
      java.util.List<LayerDetails> getChildren()
      Returns children layers of this layer.
      java.util.Collection<java.lang.String> getCrs()
      Returns projections that are supported by this layer.
      java.lang.String getName()
      Citation from OGC WMS specification (WMS 1.3.0):
      LayerDetails getParent()
      Returns parent layer for this layer.
      java.util.Map<java.lang.String,​java.lang.String> getStyles()
      Returns styles defined for this layer.
      java.lang.String getTitle()
      Returns "Human readable" title of this layer
      boolean isSelectable()
      if user may select this layer (is it possible to request it from server)
      void setAbstract​(java.lang.String abstr)
      Sets abstract of this layer
      void setBounds​(Bounds bounds)
      Sets bounds of this layer
      void setChildren​(java.util.List<LayerDetails> children)
      sets children layers for this layer
      void setName​(java.lang.String name)
      Sets the name of this Layer.
      void setTitle​(java.lang.String title)
      Sets title of this layer
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • styles

        private final java.util.Map<java.lang.String,​java.lang.String> styles
      • crs

        private final java.util.Collection<java.lang.String> crs
      • title

        private java.lang.String title
        The layer name (WMS Title)
      • name

        private java.lang.String name
        The layer name (WMS Name)
      • abstr

        private java.lang.String abstr
        The layer abstract (WMS Abstract)
        Since:
        13199
    • Constructor Detail

      • LayerDetails

        public LayerDetails​(LayerDetails parentLayer)
        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 Detail

      • getCrs

        public java.util.Collection<java.lang.String> getCrs()
        Returns projections that are supported by this layer.
        Returns:
        projections that are supported by this layer
      • getStyles

        public java.util.Map<java.lang.String,​java.lang.String> getStyles()
        Returns styles defined for this layer.
        Returns:
        styles defined for this layer
      • getTitle

        public java.lang.String getTitle()
        Returns "Human readable" title of this layer
        Returns:
        "Human readable" title of this layer
        See Also:
        getName()
      • setTitle

        public void setTitle​(java.lang.String title)
        Sets title of this layer
        Parameters:
        title - title of this layer
        See Also:
        getName()
      • getName

        public java.lang.String 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

        public void setName​(java.lang.String name)
        Sets the name of this Layer.
        Parameters:
        name - the name of this Layer
        See Also:
        getName()
      • addStyle

        public void addStyle​(java.lang.String name,
                             java.lang.String title)
        Add style to list of styles defined by this layer
        Parameters:
        name - machine-to-machine name of this style
        title - human readable title of this style
      • addCrs

        public void addCrs​(java.lang.String crs)
        Add projection supported by this layer
        Parameters:
        crs - projection code
      • getBounds

        public Bounds getBounds()
        Returns bounds within layer might be queried.
        Returns:
        bounds within layer might be queried
      • setBounds

        public void setBounds​(Bounds bounds)
        Sets bounds of this layer
        Parameters:
        bounds - of this layer
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getParent

        public LayerDetails getParent()
        Returns parent layer for this layer.
        Returns:
        parent layer for this layer
      • setChildren

        public void setChildren​(java.util.List<LayerDetails> children)
        sets children layers for this layer
        Parameters:
        children - children of this layer
      • getChildren

        public java.util.List<LayerDetailsgetChildren()
        Returns children layers of this layer.
        Returns:
        children layers of this layer
      • isSelectable

        public boolean 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

        public java.lang.String getAbstract()
        Returns abstract of this layer.
        Returns:
        "Narrative description of the layer"
      • setAbstract

        public void setAbstract​(java.lang.String abstr)
        Sets abstract of this layer
        Parameters:
        abstr - abstract of this layer
      • flattened

        public java.util.stream.Stream<LayerDetailsflattened()
        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)