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 booleancanRender(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 booleancanRenderInternal(String value)Used by subclass to provide custom logic to check if the SLD element should be included in the copyprotected Symbolizercopy(Symbolizer symbolizer)voidvisit(FeatureTypeStyle fts)Called when accept is called on a fetauretypestylevoidvisit(LineSymbolizer line)Called when accept is called on a linesymbolizervoidvisit(PointSymbolizer ps)Called when accept is called on a pointsymbolizervoidvisit(PolygonSymbolizer poly)Called when accept is called on a polygon symbolizervoidvisit(RasterSymbolizer raster)Called when accept is called on a rastersymbolizervoidvisit(Rule rule)Called when accept is called on a rulevoidvisit(Symbolizer sym)since it is impossible to create a Symbolizer this method should generate an exception or warning.voidvisit(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:StyleVisitorCalled when accept is called on a fetauretypestyle- Specified by:
visitin interfaceStyleVisitor- Overrides:
visitin classDuplicatingStyleVisitor- Parameters:
fts- the feature type styler to visit
-
visit
public void visit(Rule rule)
Description copied from interface:StyleVisitorCalled when accept is called on a rule- Specified by:
visitin interfaceStyleVisitor- Overrides:
visitin classDuplicatingStyleVisitor- Parameters:
rule- the rule to visit
-
visit
public void visit(Symbolizer sym)
Description copied from interface:StyleVisitorsince it is impossible to create a Symbolizer this method should generate an exception or warning.- Specified by:
visitin interfaceStyleVisitor- Overrides:
visitin classDuplicatingStyleVisitor- Parameters:
sym- the symbolizer to visit
-
visit
public void visit(PointSymbolizer ps)
Description copied from interface:StyleVisitorCalled when accept is called on a pointsymbolizer- Specified by:
visitin interfaceStyleVisitor- Overrides:
visitin classDuplicatingStyleVisitor- Parameters:
ps- the point symbolizer to visit
-
visit
public void visit(LineSymbolizer line)
Description copied from interface:StyleVisitorCalled when accept is called on a linesymbolizer- Specified by:
visitin interfaceStyleVisitor- Overrides:
visitin classDuplicatingStyleVisitor- Parameters:
line- the line symbolizer to visit
-
visit
public void visit(PolygonSymbolizer poly)
Description copied from interface:StyleVisitorCalled when accept is called on a polygon symbolizer- Specified by:
visitin interfaceStyleVisitor- Overrides:
visitin classDuplicatingStyleVisitor- Parameters:
poly- the polygon symbolizer to visit
-
visit
public void visit(TextSymbolizer text)
Description copied from interface:StyleVisitorCalled when accept is called on a textsymbolizer- Specified by:
visitin interfaceStyleVisitor- Overrides:
visitin classDuplicatingStyleVisitor- Parameters:
text- the text symbolizer to visit
-
visit
public void visit(RasterSymbolizer raster)
Description copied from interface:StyleVisitorCalled when accept is called on a rastersymbolizer- Specified by:
visitin interfaceStyleVisitor- Overrides:
visitin classDuplicatingStyleVisitor- Parameters:
raster- the raster symbolizer to visit
-
copy
protected Symbolizer copy(Symbolizer symbolizer)
- Overrides:
copyin 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.
-
-