Class StyleImpl

    • Constructor Detail

      • StyleImpl

        protected StyleImpl()
        Creates a new instance of StyleImpl
    • Method Detail

      • getDescription

        public DescriptionImpl getDescription()
        Description copied from interface: Style
        Description for this style.
        Specified by:
        getDescription in interface Style
        Returns:
        Human readable description for use in user interfaces
      • getDefaultSpecification

        public Symbolizer getDefaultSpecification()
        Description copied from interface: Style
        This functionality is from an ISO specificaiton; and conflicts with the idea of an else rule presented by SLD.

        Implementations may choose to look up the first symbolizer of an elseFilter or allow this to be provided?

        Specified by:
        getDefaultSpecification in interface Style
        Returns:
        Symbolizer to use if no rules work out.
      • setDefaultSpecification

        public void setDefaultSpecification​(Symbolizer defaultSymbolizer)
        Specified by:
        setDefaultSpecification in interface Style
        Parameters:
        defaultSymbolizer - To be used if a feature is not rendered by any of the rules
      • setFeatureTypeStyles

        public void setFeatureTypeStyles​(FeatureTypeStyle... styles)
      • addFeatureTypeStyle

        public void addFeatureTypeStyle​(FeatureTypeStyle type)
      • getName

        public String getName()
        Description copied from interface: Style
        Style name (machine readable, don't show to users)
        Specified by:
        getName in interface Style
        Returns:
        String, identification name of this style
      • 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
      • 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
      • setName

        public void setName​(String name)
        Specified by:
        setName in interface Style
      • accept

        public void accept​(StyleVisitor visitor)
        Description copied from interface: Style
        Used to navigate Style information during portrayal.
        Specified by:
        accept in interface Style
      • clone

        public Object clone()
        Clones the Style. Creates deep copy clone of the style.
        Specified by:
        clone in interface Cloneable
        Overrides:
        clone in class Object
        Returns:
        the Clone of the style.
        See Also:
        Style
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public boolean equals​(Object oth)
        Compares this Style with another.

        Two StyleImpl are equal if they have the same properties and the same list of FeatureTypeStyles.

        Overrides:
        equals in class Object
        Parameters:
        oth - The object to compare with this for equality.
        Returns:
        True if this and oth are equal.
      • accept

        public Object accept​(TraversingStyleVisitor visitor,
                             Object extraData)
        Description copied from interface: Style
        calls the visit method of a StyleVisitor
        Specified by:
        accept in interface Style
        Parameters:
        visitor - the style visitor
      • setDescription

        public void setDescription​(Description description)
      • getBackground

        public Fill getBackground()
        Description copied from interface: Style
        The background Fill , if any, null otherwise
        Specified by:
        getBackground in interface Style
      • setBackground

        public void setBackground​(Fill background)
        Specified by:
        setBackground in interface Style