h5rdmtoolbox.ld.hdf2jsonld#
- h5rdmtoolbox.ld.hdf2jsonld(filename, metadata_filename=None, context=None, structural=True, contextual=True, indent=2, file_uri=None, skipND=1)[source]#
Export HDF5 file metadata to JSON-LD format.
Converts HDF5 file metadata to a JSON-LD file, including both structural RDF (groups, datasets, attributes) and contextual RDF (semantic mappings).
- Parameters:
filename (
Union[str,pathlib.Path]) – Path to the HDF5 file.metadata_filename (
Optional[Union[str,pathlib.Path]], defaultNone) – Output path for the JSON-LD file. If None, uses the HDF5 filename with .jsonld extension.context (
Optional[dict], defaultNone) – Additional JSON-LD context definitions.structural (
bool, defaultTrue) – Include structural RDF from HDF5 hierarchy.contextual (
bool, defaultTrue) – Include contextual RDF from attribute mappings.indent (
int, default2) – JSON indentation level.file_uri (
Optional[str], defaultNone) – Base URI for the file resources.skipND (
Optional[int], default1) – Number of dimensions to skip for nested data.
- Returns:
pathlib.Path– Path to the generated JSON-LD file.