Class HDF5Reader
java.lang.Object
org.episteme.core.io.AbstractResourceReader<byte[]>
org.episteme.core.io.loaders.HDF5Reader
- All Implemented Interfaces:
ResourceIO<byte[]>, ResourceReader<byte[]>
Reader for HDF5 (Hierarchical Data Format) files.
Supports compression and parallel I/O.
- Since:
- 1.2
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidenableCompression(String algorithm, int level) Enables compression for the HDF5 writer/reader.voidenableParallelIO(long mpiCommHandle, long mpiInfoHandle) Enables parallel I/O for MPI-based execution.Returns the category for grouping.Returns a short description of this resource handler.Returns a long description of this resource handler.getName()Returns the display name of this resource handler.Returns the base path where this resource is located.Class<byte[]> Returns the type of resource.String[]Returns the supported file extensions (e.g., ".h5", ".fits").String[]Returns the supported versions of the format this reader/writer handles.protected byte[]loadFromInputStream(InputStream is, String id) byte[]loadFromSource(String resourceId) Methods inherited from class AbstractResourceReader
clearCache, getMiniCatalog, getSampleDataPath, isUsingFallback, load, loadAll, loadAllFromSource, loadFromFallback, setCacheEnabledMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ResourceIO
getExpectedResourceFiles, isFileBased, isOutputMethods inherited from interface ResourceReader
isInput
-
Constructor Details
-
HDF5Reader
public HDF5Reader()
-
-
Method Details
-
enableCompression
Enables compression for the HDF5 writer/reader.- Parameters:
algorithm- Compression algorithm: "gzip", "szip", "lzf", "blosc"level- Level (0-9 for gzip)
-
enableParallelIO
public void enableParallelIO(long mpiCommHandle, long mpiInfoHandle) Enables parallel I/O for MPI-based execution.- Parameters:
mpiCommHandle- MPI Communicator handle (long)mpiInfoHandle- MPI Info handle (long)
-
loadFromSource
- Specified by:
loadFromSourcein classAbstractResourceReader<byte[]>- Throws:
Exception
-
loadFromInputStream
- Overrides:
loadFromInputStreamin classAbstractResourceReader<byte[]>- Throws:
Exception
-
getResourcePath
Description copied from interface:ResourceIOReturns the base path where this resource is located. -
getResourceType
Description copied from interface:ResourceIOReturns the type of resource. -
getName
Description copied from interface:ResourceIOReturns the display name of this resource handler. MUST be implemented with I18N support.- Returns:
- the display name
-
getDescription
Description copied from interface:ResourceIOReturns a short description of this resource handler. MUST be implemented with I18N support.- Returns:
- the description
-
getLongDescription
Description copied from interface:ResourceIOReturns a long description of this resource handler. MUST be implemented with I18N support.- Returns:
- the long description
-
getCategory
Description copied from interface:ResourceIOReturns the category for grouping. MUST be implemented with I18N support.- Returns:
- the category name
-
getSupportedVersions
Description copied from interface:ResourceIOReturns the supported versions of the format this reader/writer handles.Each implementation MUST override this method to declare which versions of the underlying format are supported. The returned array should contain version strings in the format's standard notation (e.g., "3.0", "2.1", "Level 3 Version 2").
Examples:
- MathML: {"3.0", "2.0"}
- SBML: {"Level 3 Version 2", "Level 3 Version 1", "Level 2 Version 5"}
- PhyloXML: {"1.10", "1.00"}
- Returns:
- array of supported version strings, never null (empty array if version-agnostic)
-
getSupportedExtensions
Description copied from interface:ResourceIOReturns the supported file extensions (e.g., ".h5", ".fits").
-