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 TypeMethodDescriptionvoidForgets the remembered option results, call it at the start of each rendering.booleangetBooleanOption(Symbolizer symbolizer, String optionName, boolean defaultValue) Extracts a boolean from the vendor options map, returns it if found, returns the default value if notbooleangetBooleanOption(Symbolizer symbolizer, String optionName, boolean defaultValue, Object feature) Extracts a boolean from the vendor options map, evaluating a${cql}value against the given feature first.int[]getDisplacementAngles(Symbolizer symbolizer, String optionName) Returns an array of int in the range [0, 360) which corresponds to the possible displacement angles.doublegetDoubleOption(Symbolizer symbolizer, String optionName, double defaultValue) Extracts a double from the vendor options map, returns it if found, returns the default value if notdoublegetDoubleOption(Symbolizer symbolizer, String optionName, double defaultValue, Object feature) Extracts a double from the vendor options map, evaluating a${cql}value against the given feature first.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.intgetIntOption(Symbolizer symbolizer, String optionName, int defaultValue) Extracts a integer from the vendor options map, returns it if found, returns the default value if notintgetIntOption(Symbolizer symbolizer, String optionName, int defaultValue, Object feature) Extracts an integer from the vendor options map, evaluating a${cql}value against the given feature first.
-
Constructor Details
-
VendorOptionParser
public VendorOptionParser()
-
-
Method Details
-
clearRememberedResults
public void clearRememberedResults()Forgets the remembered option results, call it at the start of each rendering. -
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 -
getIntOption
Extracts an integer from the vendor options map, evaluating a${cql}value against the given feature first. Rounds a fractional result. Returns the default value if the option is missing or does not evaluate to a number. -
getDoubleOption
Extracts a double 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, Object feature) Extracts a double from the vendor options map, evaluating a${cql}value against the given feature first. Returns the default value if the option is missing or does not evaluate to a number. -
getBooleanOption
Extracts a boolean 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, Object feature) Extracts a boolean from the vendor options map, evaluating a${cql}value against the given feature first. Returns the default value if the option is missing or does not evaluate. -
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
-