Class SimpleLayerNameMapper
- java.lang.Object
-
- uk.ac.rdg.resc.edal.graphics.utils.SimpleLayerNameMapper
-
- All Implemented Interfaces:
LayerNameMapper
public class SimpleLayerNameMapper extends Object implements LayerNameMapper
An implementation of aLayerNameMapper
which encodes layer names as datasetId/variableId- Author:
- Guy Griffiths
-
-
Constructor Summary
Constructors Constructor Description SimpleLayerNameMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDatasetIdFromLayerName(String layerName)
Returns aDataset
based on a given image layer nameString
getLayerName(String datasetId, String variableId)
Returns the image layer name based on the dataset and variable IDString
getVariableIdFromLayerName(String layerName)
Returns a variable ID based on a given image layer name
-
-
-
Method Detail
-
getDatasetIdFromLayerName
public String getDatasetIdFromLayerName(String layerName) throws EdalLayerNotFoundException
Description copied from interface:LayerNameMapper
Returns aDataset
based on a given image layer name- Specified by:
getDatasetIdFromLayerName
in interfaceLayerNameMapper
- Parameters:
layerName
- The name of the image layer- Returns:
- The ID of the desired dataset
- Throws:
EdalLayerNotFoundException
-
getVariableIdFromLayerName
public String getVariableIdFromLayerName(String layerName) throws EdalLayerNotFoundException
Description copied from interface:LayerNameMapper
Returns a variable ID based on a given image layer name- Specified by:
getVariableIdFromLayerName
in interfaceLayerNameMapper
- Parameters:
layerName
- The name of the image layer- Returns:
- The ID of the variable (within its
Dataset
) - Throws:
EdalLayerNotFoundException
- if the given layer name does not exist within this catalogue
-
getLayerName
public String getLayerName(String datasetId, String variableId)
Description copied from interface:LayerNameMapper
Returns the image layer name based on the dataset and variable ID- Specified by:
getLayerName
in interfaceLayerNameMapper
- Parameters:
datasetId
- The ID of dataset containing the layervariableId
- The ID of the variable within the dataset- Returns:
- The WMS layer name of this variable
-
-