Skip to content

karlnicholas/HdfJavaLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Considerations for Creating HDF Data Types

  1. HDF Metadata-Based Constructors

    • Include constructors that accept HDF-specific metadata (e.g., size, type, null-termination) to construct objects from data read directly from an HDF file.
  2. Default HDF-Compliant Constructors

    • Provide constructors that default missing parameters to HDF-specified default values, simplifying the creation process when full metadata is not required.
  3. Application Value-Based Constructors

    • Implement constructors that take application-level values (e.g., String, int, BigDecimal) and convert them to HDF-compliant internal representations while setting the appropriate metadata.
  4. Getters for HDF Byte Arrays

    • Ensure methods exist to retrieve the HDF-compliant byte[] representation of the value, with support for specifying additional metadata like desired endianess.
  5. Application-Friendly Value Getters

    • Provide methods to access the value in a format suitable for application use (e.g., String, BigInteger, float, double).
  6. Validation of Inputs

    • Perform internal validation to ensure inputs comply with HDF constraints (e.g., bit length, type compatibility, metadata correctness).
    • Throw meaningful exceptions for invalid or incompatible inputs.
  7. Immutability

    • Ensure the immutability of data type objects by making fields final and using defensive copying for mutable inputs like byte[].
  8. String Representation

    • Override toString() to provide a clear, human-readable representation of the value, metadata, and internal state.
  9. HDF Specification Compliance

    • Implement internal handling and features that adhere to HDF specifications, ensuring compatibility with storage and retrieval requirements for all HDF data types.
  10. Testing and Compatibility

    • Develop comprehensive unit tests for all constructors and methods to validate functionality against HDF specifications and typical application scenarios.

About

HdfJavaLib

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published