Package uk.ac.rdg.resc.edal.dataset
Class InMemoryMeshDataSource
- java.lang.Object
-
- uk.ac.rdg.resc.edal.dataset.InMemoryMeshDataSource
-
- All Implemented Interfaces:
AutoCloseable,DataSource,HZTDataSource
public class InMemoryMeshDataSource extends Object implements HZTDataSource
A simple in-memory implementation of anHZTDataSource.- Author:
- Guy Griffiths
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface uk.ac.rdg.resc.edal.dataset.HZTDataSource
HZTDataSource.MeshCoordinates3D
-
-
Constructor Summary
Constructors Constructor Description InMemoryMeshDataSource(Map<String,Number[][][]> data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close all resources associated with the underlying data.List<Number>read(String variableId, List<HZTDataSource.MeshCoordinates3D> coordsToRead)Read the underlying data
-
-
-
Method Detail
-
read
public List<Number> read(String variableId, List<HZTDataSource.MeshCoordinates3D> coordsToRead) throws DataReadingException
Description copied from interface:HZTDataSourceRead the underlying data- Specified by:
readin interfaceHZTDataSource- Parameters:
variableId- The variable to readcoordsToRead- AListof co-ordinates to read- Returns:
- A
Listof data corresponding to the provided coordinates - Throws:
DataReadingException- If there is a problem reading the underlying data
-
close
public void close() throws DataReadingExceptionDescription copied from interface:DataSourceClose all resources associated with the underlying data.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceDataSource- Throws:
DataReadingException- If the underlying data cannot be closed for some reason
-
-