Class NamedStyleImpl

Object
StyleImpl
NamedStyleImpl
All Implemented Interfaces:
Cloneable, NamedStyle, Style, Cloneable

public class NamedStyleImpl extends StyleImpl implements NamedStyle
A NamedStyle is used to refer to a style that has a name in a WMS.

A NamedStyle is a Style that has only Name, so all setters other than setName will throw an UnsupportedOperationException

Author:
jamesm
  • Constructor Details

    • NamedStyleImpl

      public NamedStyleImpl()
  • Method Details

    • getName

      public String getName()
      Style name
      Specified by:
      getName in interface Style
      Overrides:
      getName in class StyleImpl
      Returns:
      style name
    • setName

      public void setName(String name)
      Set name.
      Specified by:
      setName in interface Style
      Overrides:
      setName in class StyleImpl
      Parameters:
      name - style name
    • getTitle

      public String getTitle()
      Human readable title.
      Returns:
      Human readable title, or null
    • setTitle

      public void setTitle(String title)
      Human readable title.
      Parameters:
      title - Human readable title.
      Throws:
      UnsupportedOperationException - Cannot be changed
    • getAbstract

      public String getAbstract()
    • setAbstract

      public void setAbstract(String abstractStr)
    • isDefault

      public boolean isDefault()
      Description copied from interface: Style
      The IsDefault element identifies whether a style is the default style of a layer, for use in SLD ‘library mode’ when rendering or for storing inside of a map server. IsDefault uses “1” or “true” for true and “0” or “false” for false. The default value is “0”.
      Specified by:
      isDefault in interface Style
      Overrides:
      isDefault in class StyleImpl
    • setDefault

      public void setDefault(boolean isDefault)
      Description copied from interface: Style
      Indicates that this is the default style.

      Assume this is kept for GeoServer enabling a WMS to track which style is considered the default. May consider providing a clientProperties mechanism similar to Swing JComponent allowing applications to mark up the Style content for custom uses.

      Specified by:
      setDefault in interface Style
      Overrides:
      setDefault in class StyleImpl
    • getFeatureTypeStyles

      public FeatureTypeStyle[] getFeatureTypeStyles()
      Overrides:
      getFeatureTypeStyles in class StyleImpl
    • setFeatureTypeStyles

      public void setFeatureTypeStyles(FeatureTypeStyle... types)
      Overrides:
      setFeatureTypeStyles in class StyleImpl
    • addFeatureTypeStyle

      public void addFeatureTypeStyle(FeatureTypeStyle type)
      Overrides:
      addFeatureTypeStyle in class StyleImpl
    • accept

      public Object accept(TraversingStyleVisitor visitor, Object data)
      Description copied from interface: Style
      calls the visit method of a StyleVisitor
      Specified by:
      accept in interface Style
      Overrides:
      accept in class StyleImpl
      Parameters:
      visitor - the style visitor