Class NativeHDF5TensorWriter

java.lang.Object
org.episteme.core.io.AbstractResourceWriter<Tensor<?>>
org.episteme.nativ.physics.loaders.hdf5.NativeHDF5TensorWriter
All Implemented Interfaces:
ResourceIO<Tensor<?>>, ResourceWriter<Tensor<?>>

public class NativeHDF5TensorWriter extends AbstractResourceWriter<Tensor<?>>
Adapter to save Tensors to HDF5 files. Currently supports Rank-2 Tensors (Matrices) by converting to NativeRealDoubleMatrixStorage. Future versions will support N-Dimensional arrays directly.
  • Constructor Details

    • NativeHDF5TensorWriter

      public NativeHDF5TensorWriter()
  • Method Details

    • getName

      public String getName()
      Description copied from interface: ResourceIO
      Returns the display name of this resource handler. MUST be implemented with I18N support.
      Specified by:
      getName in interface ResourceIO<Tensor<?>>
      Overrides:
      getName in class AbstractResourceWriter<Tensor<?>>
      Returns:
      the display name
    • getDescription

      public String getDescription()
      Description copied from interface: ResourceIO
      Returns a short description of this resource handler. MUST be implemented with I18N support.
      Specified by:
      getDescription in interface ResourceIO<Tensor<?>>
      Overrides:
      getDescription in class AbstractResourceWriter<Tensor<?>>
      Returns:
      the description
    • getCategory

      public String getCategory()
      Description copied from interface: ResourceIO
      Returns the category for grouping. MUST be implemented with I18N support.
      Specified by:
      getCategory in interface ResourceIO<Tensor<?>>
      Overrides:
      getCategory in class AbstractResourceWriter<Tensor<?>>
      Returns:
      the category name
    • getResourceType

      public Class<Tensor<?>> getResourceType()
      Description copied from interface: ResourceIO
      Returns the type of resource.
    • getResourcePath

      public String getResourcePath()
      Description copied from interface: ResourceIO
      Returns the base path where this resource is located.
    • getLongDescription

      public String getLongDescription()
      Description copied from interface: ResourceIO
      Returns a long description of this resource handler. MUST be implemented with I18N support.
      Specified by:
      getLongDescription in interface ResourceIO<Tensor<?>>
      Overrides:
      getLongDescription in class AbstractResourceWriter<Tensor<?>>
      Returns:
      the long description
    • getSupportedVersions

      public String[] getSupportedVersions()
      Description copied from interface: ResourceIO
      Returns 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

      public String[] getSupportedExtensions()
      Description copied from interface: ResourceIO
      Returns the supported file extensions (e.g., ".h5", ".fits").
    • save

      public void save(Tensor<?> resource, String destination) throws Exception
      Description copied from interface: ResourceWriter
      Saves the resource to a destination.
      Throws:
      Exception