Class AbstractContrastMethodStrategy

    • Constructor Detail

      • AbstractContrastMethodStrategy

        public AbstractContrastMethodStrategy()
    • Method Detail

      • 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.
      • 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.