org.geotools.renderer
Class VendorOptionParser

Object
  extended by 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
VendorOptionParser()
           
 
Method Summary
 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
 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 not
 int[] 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
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VendorOptionParser

public VendorOptionParser()
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

Parameters:
symbolizer -
optionName -
defaultValue -
Returns:

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

Parameters:
symbolizer -
optionName -
defaultValue -
Returns:

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

Parameters:
symbolizer -
optionName -
defaultValue -
Returns:

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

Parameters:
symbolizer -

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

Parameters:
symbolizer -
Returns:


Copyright © 1996-2014 Geotools. All Rights Reserved.