Package org.geotools.renderer.style
Class StyleAttributeExtractor
- Object
-
- DefaultFilterVisitor
-
- FilterAttributeExtractor
-
- StyleAttributeExtractor
-
- All Implemented Interfaces:
ExpressionVisitor,FilterVisitor,StyleVisitor
- Direct Known Subclasses:
StyleAttributeExtractorTruncated
public class StyleAttributeExtractor extends FilterAttributeExtractor implements StyleVisitor
A simple visitor whose purpose is to extract the set of attributes used by a Style, that is, those that the Style expects to find in order to work properly- Author:
- Andrea Aime - OpenGeo
-
-
Field Summary
-
Fields inherited from class FilterAttributeExtractor
attributeNames, featureType, propertyNames, usingDynamicProperties, usingVolatileFunctions
-
-
Constructor Summary
Constructors Constructor Description StyleAttributeExtractor()Default constructor, creates an empty extractor that does not check against a feature typeStyleAttributeExtractor(SimpleFeatureType featureType)Creates an extractor that leverages the provided feature type for more accurate property name extraction (e.g., it will return the property name of the default geometry if the "geometry" function is used
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<PropertyName>getAttributes()Returns PropertyNames rather than strings (includes namespace info)booleangetDefaultGeometryUsed()reads the read-only-property.booleanisSymbolizerGeometriesVisitEnabled()voidsetSymbolizerGeometriesVisitEnabled(boolean symbolizerGeometriesVisitEnabled)Enables/disables visit of the symbolizer geometry property (on by default)Objectvisit(Function expression, Object data)voidvisit(AnchorPoint ap)Called when accept is called on an anchor pointvoidvisit(ChannelSelection cs)Called when accept is called on a rasterChannelSelectionelementvoidvisit(ColorMap map)Called when accept is called on a raster color mapvoidvisit(ColorMapEntry entry)Called when accept is called on a raster color map entryvoidvisit(ContrastEnhancement contrastEnhancement)Called when accept is called on a raster ContrastEnhancement elementvoidvisit(Displacement dis)Called when accept is called on a displacementvoidvisit(ExternalGraphic exgr)Called when accept is called on an external graphicvoidvisit(FeatureTypeConstraint ftc)Called when accept is called on a FeatureTypeConstraint.voidvisit(FeatureTypeStyle fts)Called when accept is called on a fetauretypestylevoidvisit(Fill fill)Called when accept is called on a fillvoidvisit(Graphic gr)Called when accept is called on a graphicvoidvisit(Halo halo)Called when accept is called on a halovoidvisit(ImageOutline outline)Called when accept is called on a rasterImageOutlineelementvoidvisit(LinePlacement lp)Called when accept is called on a Line Placementvoidvisit(LineSymbolizer line)Called when accept is called on a linesymbolizervoidvisit(Mark mark)Called when accept is called on a markvoidvisit(NamedLayer layer)Called when accept is called on a NamedLayer.voidvisit(OverlapBehavior ob)Called when accept is called on a rasterOverlapBehaviorEnumelementvoidvisit(PointPlacement pp)Called when accept is called on a Point Placementvoidvisit(PointSymbolizer ps)Called when accept is called on a pointsymbolizervoidvisit(PolygonSymbolizer poly)Called when accept is called on a polygon symbolizervoidvisit(RasterSymbolizer rs)Called when accept is called on a rastersymbolizervoidvisit(Rule rule)Called when accept is called on a rulevoidvisit(SelectedChannelType sct)Called when accept is called on a rasterSelectedChannelTypeelementvoidvisit(ShadedRelief sr)Called when accept is called on a rasterShadedReliefelementvoidvisit(Stroke stroke)Called when accept is called on a strokevoidvisit(Style style)Called when accept is called on a Style.voidvisit(StyledLayerDescriptor sld)Called when accept is called on a StyledLayerDescriptor.voidvisit(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 textsymbolizervoidvisit(UserLayer layer)Called when accept is called on a UserLayer.-
Methods inherited from class FilterAttributeExtractor
clear, getAttributeNames, getAttributeNameSet, getPropertyNameSet, isConstantExpression, isUsingDynamincProperties, visit
-
Methods inherited from class DefaultFilterVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitNullFilter
-
-
-
-
Constructor Detail
-
StyleAttributeExtractor
public StyleAttributeExtractor()
Default constructor, creates an empty extractor that does not check against a feature type
-
StyleAttributeExtractor
public StyleAttributeExtractor(SimpleFeatureType featureType)
Creates an extractor that leverages the provided feature type for more accurate property name extraction (e.g., it will return the property name of the default geometry if the "geometry" function is used
-
-
Method Detail
-
getAttributes
public Set<PropertyName> getAttributes()
Returns PropertyNames rather than strings (includes namespace info)- Returns:
- an array of the attribute found so far during the visit
-
isSymbolizerGeometriesVisitEnabled
public boolean isSymbolizerGeometriesVisitEnabled()
-
setSymbolizerGeometriesVisitEnabled
public void setSymbolizerGeometriesVisitEnabled(boolean symbolizerGeometriesVisitEnabled)
Enables/disables visit of the symbolizer geometry property (on by default)
-
getDefaultGeometryUsed
public boolean getDefaultGeometryUsed()
reads the read-only-property. See GEOS-469- Returns:
- true if any of the symbolizers visted use the default geometry.
-
visit
public void visit(Style style)
Description copied from interface:StyleVisitorCalled when accept is called on a Style.- Specified by:
visitin interfaceStyleVisitor- Parameters:
style- The style to visit- See Also:
StyleVisitor.visit(org.geotools.api.style.Style)
-
visit
public void visit(Rule rule)
Description copied from interface:StyleVisitorCalled when accept is called on a rule- Specified by:
visitin interfaceStyleVisitor- Parameters:
rule- the rule to visit- See Also:
StyleVisitor.visit(org.geotools.api.style.Rule)
-
visit
public void visit(FeatureTypeStyle fts)
Description copied from interface:StyleVisitorCalled when accept is called on a fetauretypestyle- Specified by:
visitin interfaceStyleVisitor- Parameters:
fts- the feature type styler to visit- See Also:
StyleVisitor.visit(org.geotools.api.style.FeatureTypeStyle)
-
visit
public void visit(Fill fill)
Description copied from interface:StyleVisitorCalled when accept is called on a fill- Specified by:
visitin interfaceStyleVisitor- Parameters:
fill- the fill to be visited- See Also:
StyleVisitor.visit(org.geotools.api.style.Fill)
-
visit
public void visit(Stroke stroke)
Description copied from interface:StyleVisitorCalled when accept is called on a stroke- Specified by:
visitin interfaceStyleVisitor- Parameters:
stroke- the stroke to visit- See Also:
StyleVisitor.visit(org.geotools.api.style.Stroke)
-
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- Parameters:
sym- the symbolizer to visit- See Also:
StyleVisitor.visit(org.geotools.api.style.Symbolizer)
-
visit
public void visit(RasterSymbolizer rs)
Description copied from interface:StyleVisitorCalled when accept is called on a rastersymbolizer- Specified by:
visitin interfaceStyleVisitor- Parameters:
rs- the raster 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- Parameters:
ps- the point symbolizer to visit- See Also:
StyleVisitor.visit(org.geotools.api.style.PointSymbolizer)
-
visit
public void visit(LineSymbolizer line)
Description copied from interface:StyleVisitorCalled when accept is called on a linesymbolizer- Specified by:
visitin interfaceStyleVisitor- Parameters:
line- the line symbolizer to visit- See Also:
StyleVisitor.visit(org.geotools.api.style.LineSymbolizer)
-
visit
public void visit(PolygonSymbolizer poly)
Description copied from interface:StyleVisitorCalled when accept is called on a polygon symbolizer- Specified by:
visitin interfaceStyleVisitor- Parameters:
poly- the polygon symbolizer to visit- See Also:
StyleVisitor.visit(org.geotools.api.style.PolygonSymbolizer)
-
visit
public void visit(TextSymbolizer text)
Description copied from interface:StyleVisitorCalled when accept is called on a textsymbolizer- Specified by:
visitin interfaceStyleVisitor- Parameters:
text- the text symbolizer to visit- See Also:
StyleVisitor.visit(org.geotools.api.style.TextSymbolizer)
-
visit
public void visit(Graphic gr)
Description copied from interface:StyleVisitorCalled when accept is called on a graphic- Specified by:
visitin interfaceStyleVisitor- Parameters:
gr- the graphic to visit- See Also:
StyleVisitor.visit(org.geotools.api.style.Graphic)
-
visit
public void visit(Mark mark)
Description copied from interface:StyleVisitorCalled when accept is called on a mark- Specified by:
visitin interfaceStyleVisitor- Parameters:
mark- the mark to visit- See Also:
StyleVisitor.visit(org.geotools.api.style.Mark)
-
visit
public void visit(ExternalGraphic exgr)
Description copied from interface:StyleVisitorCalled when accept is called on an external graphic- Specified by:
visitin interfaceStyleVisitor- Parameters:
exgr- the external graphic to visit- See Also:
StyleVisitor.visit(org.geotools.api.style.ExternalGraphic)
-
visit
public void visit(PointPlacement pp)
Description copied from interface:StyleVisitorCalled when accept is called on a Point Placement- Specified by:
visitin interfaceStyleVisitor- Parameters:
pp- the point placement to visit- See Also:
StyleVisitor.visit(org.geotools.api.style.PointPlacement)
-
visit
public void visit(AnchorPoint ap)
Description copied from interface:StyleVisitorCalled when accept is called on an anchor point- Specified by:
visitin interfaceStyleVisitor- Parameters:
ap- the anchor point to visit- See Also:
StyleVisitor.visit(org.geotools.api.style.AnchorPoint)
-
visit
public void visit(Displacement dis)
Description copied from interface:StyleVisitorCalled when accept is called on a displacement- Specified by:
visitin interfaceStyleVisitor- Parameters:
dis- the displacement to visit- See Also:
StyleVisitor.visit(org.geotools.api.style.Displacement)
-
visit
public void visit(LinePlacement lp)
Description copied from interface:StyleVisitorCalled when accept is called on a Line Placement- Specified by:
visitin interfaceStyleVisitor- Parameters:
lp- the line placement to visit- See Also:
StyleVisitor.visit(org.geotools.api.style.LinePlacement)
-
visit
public void visit(Halo halo)
Description copied from interface:StyleVisitorCalled when accept is called on a halo- Specified by:
visitin interfaceStyleVisitor- Parameters:
halo- the halo to visit- See Also:
StyleVisitor.visit(org.geotools.api.style.Halo)
-
visit
public void visit(StyledLayerDescriptor sld)
Description copied from interface:StyleVisitorCalled when accept is called on a StyledLayerDescriptor.- Specified by:
visitin interfaceStyleVisitor- Parameters:
sld- The StyledLayerDescriptor to visit
-
visit
public void visit(NamedLayer layer)
Description copied from interface:StyleVisitorCalled when accept is called on a NamedLayer.- Specified by:
visitin interfaceStyleVisitor- Parameters:
layer- The NamedLayer to visit
-
visit
public void visit(UserLayer layer)
Description copied from interface:StyleVisitorCalled when accept is called on a UserLayer.- Specified by:
visitin interfaceStyleVisitor- Parameters:
layer- The UserLayer to visit
-
visit
public void visit(FeatureTypeConstraint ftc)
Description copied from interface:StyleVisitorCalled when accept is called on a FeatureTypeConstraint.- Specified by:
visitin interfaceStyleVisitor- Parameters:
ftc- The FeatureTypeConstraint to visit
-
visit
public void visit(ColorMap map)
Description copied from interface:StyleVisitorCalled when accept is called on a raster color map- Specified by:
visitin interfaceStyleVisitor- Parameters:
map- the color map to visit
-
visit
public void visit(ColorMapEntry entry)
Description copied from interface:StyleVisitorCalled when accept is called on a raster color map entry- Specified by:
visitin interfaceStyleVisitor- Parameters:
entry- the color map to visit
-
visit
public void visit(ContrastEnhancement contrastEnhancement)
Description copied from interface:StyleVisitorCalled when accept is called on a raster ContrastEnhancement element- Specified by:
visitin interfaceStyleVisitor- Parameters:
contrastEnhancement- theContrastEnhancementto visit.
-
visit
public void visit(ImageOutline outline)
Description copied from interface:StyleVisitorCalled when accept is called on a rasterImageOutlineelement- Specified by:
visitin interfaceStyleVisitor- Parameters:
outline- theImageOutlineto visit.
-
visit
public void visit(ChannelSelection cs)
Description copied from interface:StyleVisitorCalled when accept is called on a rasterChannelSelectionelement- Specified by:
visitin interfaceStyleVisitor- Parameters:
cs- theChannelSelectionto visit.
-
visit
public void visit(OverlapBehavior ob)
Description copied from interface:StyleVisitorCalled when accept is called on a rasterOverlapBehaviorEnumelement- Specified by:
visitin interfaceStyleVisitor- Parameters:
ob- theOverlapBehaviorEnumto visit.
-
visit
public void visit(SelectedChannelType sct)
Description copied from interface:StyleVisitorCalled when accept is called on a rasterSelectedChannelTypeelement- Specified by:
visitin interfaceStyleVisitor- Parameters:
sct- theSelectedChannelTypeto visit.
-
visit
public void visit(ShadedRelief sr)
Description copied from interface:StyleVisitorCalled when accept is called on a rasterShadedReliefelement- Specified by:
visitin interfaceStyleVisitor- Parameters:
sr- theShadedReliefto visit.
-
visit
public Object visit(Function expression, Object data)
- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classFilterAttributeExtractor
-
-