Class LayerDetails

    • 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 Collection<StringgetCrs()
        Returns projections that are supported by this layer.
        Returns:
        projections that are supported by this layer
      • getStyles

        public Map<String,​StringgetStyles()
        Returns styles defined for this layer.
        Returns:
        styles defined for this layer
      • getTitle

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

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

        public 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​(String name)
        Sets the name of this Layer.
        Parameters:
        name - the name of this Layer
        See Also:
        getName()
      • addStyle

        public void addStyle​(String name,
                             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​(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
      • getParent

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

        public void setChildren​(List<LayerDetails> children)
        sets children layers for this layer
        Parameters:
        children - children 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 String getAbstract()
        Returns abstract of this layer.
        Returns:
        "Narrative description of the layer"
      • setAbstract

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

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