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 aLayerNameMapperwhich 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 StringgetDatasetIdFromLayerName(String layerName)Returns aDatasetbased on a given image layer nameStringgetLayerName(String datasetId, String variableId)Returns the image layer name based on the dataset and variable IDStringgetVariableIdFromLayerName(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:LayerNameMapperReturns aDatasetbased on a given image layer name- Specified by:
getDatasetIdFromLayerNamein 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:LayerNameMapperReturns a variable ID based on a given image layer name- Specified by:
getVariableIdFromLayerNamein 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:LayerNameMapperReturns the image layer name based on the dataset and variable ID- Specified by:
getLayerNamein 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
-
-