Class RenderingSelectorStyleVisitor

  • All Implemented Interfaces:
    StyleVisitor
    Direct Known Subclasses:
    LegendRenderingSelectorStyleVisitor, MapRenderingSelectorStyleVisitor

    public abstract class RenderingSelectorStyleVisitor
    extends DuplicatingStyleVisitor
    This abstract class applies the include VendorOptions to a Style eg. mapOnly|legendOnly|normal The visitor provides generic methods to avoid including in the deep copy of the Style being passed to it the FeatureTypeStyle or the Rule or the Symbolizer for which the vendorOptions defined doesn't allow the rendering.
    • Constructor Detail

      • RenderingSelectorStyleVisitor

        public RenderingSelectorStyleVisitor()
    • Method Detail

      • visit

        public void visit​(Symbolizer sym)
        Description copied from interface: StyleVisitor
        since it is impossible to create a Symbolizer this method should generate an exception or warning.
        Specified by:
        visit in interface StyleVisitor
        Overrides:
        visit in class DuplicatingStyleVisitor
        Parameters:
        sym - the symbolizer to visit
      • canRender

        protected boolean canRender​(Map<String,​String> vendorOptions)
        Check if the vendorOptions being passed allows the element they belong to, to be included in the deep copy of the style.
        Parameters:
        vendorOptions - the vendorOptions map
        Returns:
        true if the element can be included false otherwise
      • canRenderInternal

        protected abstract boolean canRenderInternal​(String value)
        Used by subclass to provide custom logic to check if the SLD element should be included in the copy
        Parameters:
        value - the value of the mapOnly|legendOnly|normal
        Returns:
        true if the element should be included in the copy, false otherwise.