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 concreteMapImage
objects ready to be plotted.- Author:
- Guy Griffiths
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MapImage
getMapImageFromStyle(String styleName, PlottingStyleParameters templateableProperties, VariableMetadata metadata, LayerNameMapper layerNameMapper)
Returns a concreteMapImage
for a given styleList<String>
getScaledRoleForStyle(String styleName)
Collection<String>
getSupportedStyles(VariableMetadata variableMetadata, LayerNameMapper layerNameMapper)
Gets the supported styles for a given variableboolean
styleUsesPalette(String styleName)
-
-
-
Method Detail
-
getSupportedStyles
Collection<String> getSupportedStyles(VariableMetadata variableMetadata, LayerNameMapper layerNameMapper)
Gets the supported styles for a given variable- Parameters:
variableMetadata
- TheVariableMetadata
of the variable to get styles forlayerNameMapper
- TheLayerNameMapper
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 concreteMapImage
for a given style- Parameters:
styleName
- The name of the styletemplateableProperties
- The properties which should be injected into the style template. None of the methods in this object may returnnull
metadata
- TheVariableMetadata
of the variable being plotted. In the case that multiple variables are used for a single plot, this should be the parentVariableMetadata
of all required variableslayerNameMapper
- The associatedLayerNameMapper
. This is used to turnVariableMetadata
objects into concrete layer names for the style template- Returns:
- A
MapImage
, ready to generate images
-
-