H5R.get_name

Name of referenced object

Syntax

name = H5R.get_name(loc_id,ref_type,ref)
name = H5R.get_name(loc_id,ref_type,ref,'TextEncoding',encoding)

Description

name = H5R.get_name(loc_id,ref_type,ref) retrieves the name for the object identified by ref. The loc_id argument is the identifier for the dataset containing the reference or for the group containing that dataset. ref_type specifies the type of the reference ref. Valid values for ref_type are 'H5R_OBJECT' or 'H5R_DATASET_REGION'.

name = H5R.get_name(loc_id,ref_type,ref,'TextEncoding',encoding) additionally specifies the text encoding to use to interpret the reference name. Specify encoding as 'system'(default) or 'UTF-8'.

  • 'system' — Use the system default encoding to interpret the reference name.

  • 'UTF-8' — Use UTF-8 encoding to interpret the reference name.

Examples

plist = 'H5P_DEFAULT';
space = 'H5S_ALL';
fid = H5F.open('example.h5');
dset_id = H5D.open(fid,'/g3/reference');
ref_data = H5D.read(dset_id,'H5T_STD_REF_OBJ',space,space,plist);
name = H5R.get_name(dset_id,'H5R_OBJECT',ref_data(:,1));
H5D.close(dset_id);
H5F.close(fid);