h5rdmtoolbox.ld.shacl.validate_hdf#
- h5rdmtoolbox.ld.shacl.validate_hdf(*, hdf_data=None, hdf_source=None, shacl_data=None, shacl_source=None, hdf_file_uri='https://example.org/hdf5file#', shacl_format='turtle', hdf_data_format='turtle', **pyshacl_kwargs)[source]#
Validate an HDF5 file against SHACL shapes.
- Parameters:
hdf_data (
Union[str,rdflib.Graph], optional) – The HDF5 data as a string or rdflib.Graph. If is string is provided it is assumed to be in Turtle format (you may overwrite this by passing hdf_data_format).hdf_source (
Union[h5py.File,pathlib.Path], optional) – The path to the HDF5 file.shacl_data (
Union[str,rdflib.Graph], optional) – The SHACL shapes as a string or rdflib.Graph. If is string is provided it is assumed to be in Turtle format.shacl_source (
Union[str,pathlib.Path], optional) – The path to the SHACL shapes file.shacl_format (
str, optional) – The format of the SHACL shapes string. Default is ‘turtle’.hdf_data_format (
str, optional) – The format of the HDF5 data string. Default is ‘turtle’.**pyshacl_kwargs – Additional keyword arguments to pass to pyshacl.validate().
- Returns:
ValidationResult– The result of the validation containing:conforms: bool
results_graph: rdflib.Graph
results_text: str
messages: List[str]