Interface StyleVisitor


  • public interface StyleVisitor
    An interface for classes that want to perform operations on a Style hierarchy. It forms part of a GoF Visitor Pattern implementation.

    A call to style.accept(StyleVisitor) will result in a call to one of the methods in this interface. The responsibility for traversing sub filters is intended to lie with the visitor (this is unusual, but permitted under the Visitor pattern).

    A typical use would be to transcribe a style into a specific format, e.g. XML or SQL. Alternatively it may be to extract specific information from the Style structure, for example a list of all fills. Finally a a style visitor is often used (in conjunction with a factory) in the production of a copy; or slightly modified copy of the original style.

    It is common practice for a StyleVisitor to also implement an ExpressionVisitor in order to traverse both data structures.

    Since:
    GeoAPI 2.2
    See Also:
    ExpressionVisitor, StyleFactory
    • Method Detail

      • visit

        Object visit​(Style style,
                     Object data)
        Called when accept is called on a Style.
        Parameters:
        style - The style to visit
      • visit

        Object visit​(FeatureTypeStyle style,
                     Object data)
        Called when accept is called on a FetaureTypeStyle
        Parameters:
        style - the feature type styler to visit
      • visit

        Object visit​(Rule rule,
                     Object data)
        Called when accept is called on a rule
        Parameters:
        rule - the rule to visit
      • visit

        Object visit​(PointSymbolizer symbolizer,
                     Object data)
        Called when accept is called on a pointsymbolizer
        Parameters:
        symbolizer - the point symbolizer to visit
      • visit

        Object visit​(LineSymbolizer symbolizer,
                     Object data)
        Called when accept is called on a linesymbolizer
        Parameters:
        symbolizer - the line symbolizer to visit
      • visit

        Object visit​(PolygonSymbolizer symbolizer,
                     Object data)
        Called when accept is called on a polygon symbolizer
        Parameters:
        symbolizer - the polygon symbolizer to visit
      • visit

        Object visit​(TextSymbolizer symbolizer,
                     Object data)
        Called when accept is called on a textsymbolizer
        Parameters:
        symbolizer - the text symbolizer to visit
      • visit

        Object visit​(RasterSymbolizer symbolizer,
                     Object data)
        Called when accept is called on a rastersymbolizer
        Parameters:
        symbolizer - the raster symbolizer to visit
      • visit

        Object visit​(ExtensionSymbolizer symbolizer,
                     Object data)
        Called when accept is called on a extension symbolizer
        Parameters:
        symbolizer - the extension symbolizer to visit
      • visit

        Object visit​(Description description,
                     Object data)
        Called when accept is called on a description
        Parameters:
        description - the description to visit
      • visit

        Object visit​(Displacement displacement,
                     Object data)
        Called when accept is called on a displacement
        Parameters:
        displacement - the displacement to visit
      • visit

        Object visit​(Fill fill,
                     Object data)
        Called when accept is called on a fill
        Parameters:
        fill - the fill to be visited
      • visit

        Object visit​(Font font,
                     Object data)
        Called when accept is called on a font
        Parameters:
        font - the font to be visited
      • visit

        Object visit​(Stroke stroke,
                     Object data)
        Called when accept is called on a stroke
        Parameters:
        stroke - the stroke to visit
      • visit

        Object visit​(Graphic graphic,
                     Object data)
        Called when accept is called on a graphic
        Parameters:
        graphic - the graphic to visit
      • visit

        Object visit​(GraphicFill fill,
                     Object data)
        Called when accept is called on a graphic fill
        Parameters:
        fill - the graphic fill to visit
      • visit

        Object visit​(GraphicStroke stroke,
                     Object data)
        Called when accept is called on a graphic stroke
        Parameters:
        stroke - the graphic stroke to visit
      • visit

        Object visit​(Mark mark,
                     Object data)
        Called when accept is called on a mark
        Parameters:
        mark - the mark to visit
      • visit

        Object visit​(ExternalMark mark,
                     Object data)
        Called when accept is called on a external mark
        Parameters:
        mark - the external mark to visit
      • visit

        Object visit​(ExternalGraphic graphic,
                     Object data)
        Called when accept is called on a external graphic
        Parameters:
        graphic - the external graphic to visit
      • visit

        Object visit​(PointPlacement placement,
                     Object data)
        Called when accept is called on a Point Placement
        Parameters:
        placement - the point placement to visit
      • visit

        Object visit​(AnchorPoint anchor,
                     Object data)
        Called when accept is called on a anchor point
        Parameters:
        anchor - the anchor point to visit
      • visit

        Object visit​(LinePlacement placement,
                     Object data)
        Called when accept is called on a Line Placement
        Parameters:
        placement - the line placement to visit
      • visit

        Object visit​(GraphicLegend legend,
                     Object data)
        Called when accept is called on a legend graphic
        Parameters:
        legend - the legend graphic to visit
      • visit

        Object visit​(Halo halo,
                     Object data)
        Called when accept is called on a halo
        Parameters:
        halo - the halo to visit
      • visit

        Object visit​(ColorMap colors,
                     Object data)
        Called when accept is called on a raster color map
        Parameters:
        colors - the color map to visit
      • visit

        Object visit​(ColorReplacement colors,
                     Object data)
        Called when accept is called on a color replacement
        Parameters:
        colors - the color replacement to visit