h5rdmtoolbox.ld.hdf2ttl#
- h5rdmtoolbox.ld.hdf2ttl(filename, metadata_filename=None, context=None, structural=True, contextual=True, indent=2, file_uri=None, skipND=1)[source]#
Export HDF5 file metadata to Turtle (TTL) format.
Converts HDF5 file metadata to a Turtle RDF 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 Turtle file. If None, uses the HDF5 filename with .ttl extension.context (
Optional[dict], defaultNone) – Additional namespace prefix definitions.structural (
bool, defaultTrue) – Include structural RDF from HDF5 hierarchy.contextual (
bool, defaultTrue) – Include contextual RDF from attribute mappings.indent (
int, default2) – Turtle 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 Turtle file.