Interface StyleCatalogue

  • All Known Implementing Classes:
    SldTemplateStyleCatalogue

    public interface StyleCatalogue
    A catalogue of supported styles for plotting. This allows for a catalogue of styles to be defined, and provides a method to turn these styles into concrete MapImage objects ready to be plotted.
    Author:
    Guy Griffiths
    • Method Detail

      • getSupportedStyles

        Collection<String> getSupportedStyles​(VariableMetadata variableMetadata,
                                              LayerNameMapper layerNameMapper)
        Gets the supported styles for a given variable
        Parameters:
        variableMetadata - The VariableMetadata of the variable to get styles for
        layerNameMapper - The LayerNameMapper used to map layer names to dataset/variable pairs.
        Returns:
        A List of the supported style names for this variable
      • styleUsesPalette

        boolean styleUsesPalette​(String styleName)
        Parameters:
        styleName - The style name to test
        Returns:
        true if this style needs a colour palette
      • getScaledRoleForStyle

        List<String> getScaledRoleForStyle​(String styleName)
        Parameters:
        styleName - The style name to test
        Returns:
        The role which the scale range applies to. This is:
      • null if no scaling takes place
      • An empty string if the named layer is scaled
      • The child role which scaling is applied to TODO DOCUMENT MULTIPLE ROLES CASE
      • getMapImageFromStyle

        MapImage getMapImageFromStyle​(String styleName,
                                      PlottingStyleParameters templateableProperties,
                                      VariableMetadata metadata,
                                      LayerNameMapper layerNameMapper)
        Returns a concrete MapImage for a given style
        Parameters:
        styleName - The name of the style
        templateableProperties - The properties which should be injected into the style template. None of the methods in this object may return null
        metadata - The VariableMetadata of the variable being plotted. In the case that multiple variables are used for a single plot, this should be the parent VariableMetadata of all required variables
        layerNameMapper - The associated LayerNameMapper. This is used to turn VariableMetadata objects into concrete layer names for the style template
        Returns:
        A MapImage, ready to generate images