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 void
close()
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:HZTDataSource
Read the underlying data- Specified by:
read
in interfaceHZTDataSource
- Parameters:
variableId
- The variable to readcoordsToRead
- AList
of co-ordinates to read- Returns:
- A
List
of data corresponding to the provided coordinates - Throws:
DataReadingException
- If there is a problem reading the underlying data
-
close
public void close() throws DataReadingException
Description copied from interface:DataSource
Close all resources associated with the underlying data.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceDataSource
- Throws:
DataReadingException
- If the underlying data cannot be closed for some reason
-
-