Package org.geotools.styling.visitor
Class RenderingSelectorStyleVisitor
- Object
-
- DuplicatingStyleVisitor
-
- 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.
-
-
Field Summary
-
Fields inherited from class DuplicatingStyleVisitor
copyFilter, ff, pages, sf, STRICT
-
-
Constructor Summary
Constructors Constructor Description RenderingSelectorStyleVisitor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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.protected abstract boolean
canRenderInternal(String value)
Used by subclass to provide custom logic to check if the SLD element should be included in the copyprotected Symbolizer
copy(Symbolizer symbolizer)
void
visit(FeatureTypeStyle fts)
Called when accept is called on a fetauretypestylevoid
visit(LineSymbolizer line)
Called when accept is called on a linesymbolizervoid
visit(PointSymbolizer ps)
Called when accept is called on a pointsymbolizervoid
visit(PolygonSymbolizer poly)
Called when accept is called on a polygon symbolizervoid
visit(RasterSymbolizer raster)
Called when accept is called on a rastersymbolizervoid
visit(Rule rule)
Called when accept is called on a rulevoid
visit(Symbolizer sym)
since it is impossible to create a Symbolizer this method should generate an exception or warning.void
visit(TextSymbolizer text)
Called when accept is called on a textsymbolizer-
Methods inherited from class DuplicatingStyleVisitor
copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copyExpressions, copyFonts, getCopy, setStrict, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
-
-
-
Method Detail
-
visit
public void visit(FeatureTypeStyle fts)
Description copied from interface:StyleVisitor
Called when accept is called on a fetauretypestyle- Specified by:
visit
in interfaceStyleVisitor
- Overrides:
visit
in classDuplicatingStyleVisitor
- Parameters:
fts
- the feature type styler to visit
-
visit
public void visit(Rule rule)
Description copied from interface:StyleVisitor
Called when accept is called on a rule- Specified by:
visit
in interfaceStyleVisitor
- Overrides:
visit
in classDuplicatingStyleVisitor
- Parameters:
rule
- the rule to visit
-
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 interfaceStyleVisitor
- Overrides:
visit
in classDuplicatingStyleVisitor
- Parameters:
sym
- the symbolizer to visit
-
visit
public void visit(PointSymbolizer ps)
Description copied from interface:StyleVisitor
Called when accept is called on a pointsymbolizer- Specified by:
visit
in interfaceStyleVisitor
- Overrides:
visit
in classDuplicatingStyleVisitor
- Parameters:
ps
- the point symbolizer to visit
-
visit
public void visit(LineSymbolizer line)
Description copied from interface:StyleVisitor
Called when accept is called on a linesymbolizer- Specified by:
visit
in interfaceStyleVisitor
- Overrides:
visit
in classDuplicatingStyleVisitor
- Parameters:
line
- the line symbolizer to visit
-
visit
public void visit(PolygonSymbolizer poly)
Description copied from interface:StyleVisitor
Called when accept is called on a polygon symbolizer- Specified by:
visit
in interfaceStyleVisitor
- Overrides:
visit
in classDuplicatingStyleVisitor
- Parameters:
poly
- the polygon symbolizer to visit
-
visit
public void visit(TextSymbolizer text)
Description copied from interface:StyleVisitor
Called when accept is called on a textsymbolizer- Specified by:
visit
in interfaceStyleVisitor
- Overrides:
visit
in classDuplicatingStyleVisitor
- Parameters:
text
- the text symbolizer to visit
-
visit
public void visit(RasterSymbolizer raster)
Description copied from interface:StyleVisitor
Called when accept is called on a rastersymbolizer- Specified by:
visit
in interfaceStyleVisitor
- Overrides:
visit
in classDuplicatingStyleVisitor
- Parameters:
raster
- the raster symbolizer to visit
-
copy
protected Symbolizer copy(Symbolizer symbolizer)
- Overrides:
copy
in classDuplicatingStyleVisitor
-
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 themapOnly|legendOnly|normal - Returns:
- true if the element should be included in the copy, false otherwise.
-
-