Package org.geotools.renderer
Class VendorOptionParser
- Object
-
- VendorOptionParser
-
public class VendorOptionParser extends Object
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 Constructor Description VendorOptionParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
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 not<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 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
-
-
-
Method Detail
-
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
public 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
-
getDoubleOption
public 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 not
-
getBooleanOption
public boolean getBooleanOption(Symbolizer symbolizer, String optionName, boolean defaultValue)
Extracts a boolean from the vendor options map, returns it if found, returns the default value if not
-
getGraphicMargin
public int[] getGraphicMargin(Symbolizer symbolizer, String optionName)
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
public int[] getDisplacementAngles(Symbolizer symbolizer, String optionName)
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
-
-