Package org.geotools.styling
Class AbstractContrastMethodStrategy
Object
AbstractContrastMethodStrategy
- All Implemented Interfaces:
ContrastMethodStrategy
- Direct Known Subclasses:
ExponentialContrastMethodStrategy
,HistogramContrastMethodStrategy
,LogarithmicContrastMethodStrategy
,NormalizeContrastMethodStrategy
public abstract class AbstractContrastMethodStrategy
extends Object
implements ContrastMethodStrategy
- Author:
- ian
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
ALGORITHMprotected FilterFactory
protected ContrastMethod
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addOption
(String key, Expression value) Add a VendorOption that controls how this strategy operates.void
addParameter
(String key, Expression value) A parameter to be used by this method.Find out the algorithm used by this method.Fetch the filter factory used by the method.Get the constant that defines the method that this strategy uses.The map of VendorOptions to write into an SLD or CSS file.Fetch any parameters which control the method.name()
the name of the ContrastMethod Currently one of Normalize, Histogram, Exponential & Logarithmicvoid
setAlgorithm
(Expression name) The algorithm to be used by this method.void
setMethod
(ContrastMethod method) Set the constant that defines the method that this strategy uses.void
setOptions
(Map<String, Expression> options) set the map of VendorOptions to control this method.
-
Field Details
-
ALGORITHM
ALGORITHM- See Also:
-
filterFactory
-
method
-
-
Constructor Details
-
AbstractContrastMethodStrategy
public AbstractContrastMethodStrategy()
-
-
Method Details
-
setOptions
set the map of VendorOptions to control this method.- Specified by:
setOptions
in interfaceContrastMethodStrategy
- Parameters:
options
- a map of Expressions keyed by name.
-
getAlgorithm
Find out the algorithm used by this method.- Returns:
- an Expression which evaluates to the algorithm name, may be null;
-
getParameters
Fetch any parameters which control the method.Note this does not contain the algorithm value.
- Returns:
- a map of Expressions keyed by parameter name.
-
name
the name of the ContrastMethod Currently one of Normalize, Histogram, Exponential & LogarithmicMore methods may be added in future releases.
- Returns:
- A string containing the name of the method.
-
getFilterFactory
Fetch the filter factory used by the method.- Returns:
- the filter factory.
-
addParameter
A parameter to be used by this method. Subclasses can implement checks for valid parameter names by overriding this method.- Parameters:
key
- the name of the parametervalue
- the expression that is it's value.
-
setAlgorithm
The algorithm to be used by this method. Subclasses can implement checks for valid algorithms by overriding this method.- Parameters:
name
- the expression that evaluates to the algorithm name.
-
getOptions
The map of VendorOptions to write into an SLD or CSS file.- Specified by:
getOptions
in interfaceContrastMethodStrategy
- Returns:
- options a map containing the algorithm name and any parameters that have been set.
-
getMethod
Description copied from interface:ContrastMethodStrategy
Get the constant that defines the method that this strategy uses.- Specified by:
getMethod
in interfaceContrastMethodStrategy
- Returns:
- the method that these values relate to.
-
addOption
Description copied from interface:ContrastMethodStrategy
Add a VendorOption that controls how this strategy operates. All VendorOptions are optional and the strategy will operate using default values if missing.- Specified by:
addOption
in interfaceContrastMethodStrategy
- Parameters:
key
- the name of the Vendor Optionvalue
- an expression that evaluates to the value of the option.
-
setMethod
Description copied from interface:ContrastMethodStrategy
Set the constant that defines the method that this strategy uses.- Specified by:
setMethod
in interfaceContrastMethodStrategy
- Parameters:
method
- the method to set
-