Package org.geotools.renderer
Class VendorOptionParser
Object
VendorOptionParser
Helper class that provides utility methods to extract and parse elements from the vendor options map, some generic,
other geared to specific contents
- Author:
- Andrea Aime - GeoSolutions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
getBooleanOption
(Symbolizer symbolizer, String optionName, boolean defaultValue) Extracts a boolean from the vendor options map, returns it if found, returns the default value if notint[]
getDisplacementAngles
(Symbolizer symbolizer, String optionName) Returns an array of int in the range [0, 360) which corresponds to the possible displacement angles.double
getDoubleOption
(Symbolizer symbolizer, String optionName, double defaultValue) Extracts a double from the vendor options map, returns it if found, returns the default value if notgetEnumOption
(Symbolizer symbolizer, String optionName, Enum<T> defaultValue) Extracts a enumeration from the vendor options map, returns it if found, returns the default value if notint[]
getGraphicMargin
(Symbolizer symbolizer, String optionName) Returns a CSS margin from the options map.int
getIntOption
(Symbolizer symbolizer, String optionName, int defaultValue) Extracts a integer from the vendor options map, returns it if found, returns the default value if not
-
Constructor Details
-
VendorOptionParser
public VendorOptionParser()
-
-
Method Details
-
getEnumOption
public <T extends Enum<T>> Enum<T> getEnumOption(Symbolizer symbolizer, String optionName, Enum<T> defaultValue) Extracts a enumeration from the vendor options map, returns it if found, returns the default value if not -
getIntOption
Extracts a integer from the vendor options map, returns it if found, returns the default value if not -
getDoubleOption
Extracts a double from the vendor options map, returns it if found, returns the default value if not -
getBooleanOption
Extracts a boolean from the vendor options map, returns it if found, returns the default value if not -
getGraphicMargin
Returns a CSS margin from the options map. The result always has 4 components, in top,right,bottom,left order. The syntax can follow the CSS shorthand, http://www.w3schools.com/css/css_margin.asp -
getDisplacementAngles
Returns an array of int in the range [0, 360) which corresponds to the possible displacement angles.- Parameters:
optionName
- expected a String with DisplacementMode enum values comma separated
-