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 Details

  • Constructor Details

    • AbstractContrastMethodStrategy

      public AbstractContrastMethodStrategy()
  • Method Details

    • setOptions

      public void setOptions(Map<String,Expression> options)
      set the map of VendorOptions to control this method.
      Specified by:
      setOptions in interface ContrastMethodStrategy
      Parameters:
      options - a map of Expressions keyed by name.
    • getAlgorithm

      public Expression getAlgorithm()
      Find out the algorithm used by this method.
      Returns:
      an Expression which evaluates to the algorithm name, may be null;
    • getParameters

      public Map<String,Expression> 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

      public String name()
      the name of the ContrastMethod Currently one of Normalize, Histogram, Exponential & Logarithmic

      More methods may be added in future releases.

      Returns:
      A string containing the name of the method.
    • getFilterFactory

      public FilterFactory getFilterFactory()
      Fetch the filter factory used by the method.
      Returns:
      the filter factory.
    • addParameter

      public void addParameter(String key, Expression value)
      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 parameter
      value - the expression that is it's value.
    • setAlgorithm

      public void setAlgorithm(Expression name)
      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

      public Map<String,Expression> getOptions()
      The map of VendorOptions to write into an SLD or CSS file.
      Specified by:
      getOptions in interface ContrastMethodStrategy
      Returns:
      options a map containing the algorithm name and any parameters that have been set.
    • getMethod

      public ContrastMethod getMethod()
      Description copied from interface: ContrastMethodStrategy
      Get the constant that defines the method that this strategy uses.
      Specified by:
      getMethod in interface ContrastMethodStrategy
      Returns:
      the method that these values relate to.
    • addOption

      public void addOption(String key, Expression value)
      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 interface ContrastMethodStrategy
      Parameters:
      key - the name of the Vendor Option
      value - an expression that evaluates to the value of the option.
    • setMethod

      public void setMethod(ContrastMethod method)
      Description copied from interface: ContrastMethodStrategy
      Set the constant that defines the method that this strategy uses.
      Specified by:
      setMethod in interface ContrastMethodStrategy
      Parameters:
      method - the method to set