ibridges.meta.MetaData

class ibridges.meta.MetaData(item)

Irods metadata operations.

This allows for adding and deleting of metadata entries for data objects and collections.

Examples

>>> meta = MetaData(coll)
>>> "Author" in meta
True
>>> for entry in meta:
>>>     print(entry.key, entry.value, entry.units)
Author Ben
Mass 10 kg
>>> meta.add("Author", "Emma")
>>> meta.set("Author", "Alice")
>>> meta.delete("Author")
>>> print(meta)
{Mass, 10, kg}
__init__(item)

Initialize the metadata object.

Parameters:

item (Union[iRODSDataObject, iRODSCollection]) – The data object or collection to attach the metadata object to.

Methods

__init__(item)

Initialize the metadata object.

add(key, value[, units])

Add metadata to an item.

clear()

Delete all metadata belonging to the item.

delete(key, value[, units])

Delete a metadata entry of an item.

set(key, value[, units])

Set the metadata entry.

to_dict([keys])

Convert iRODS metadata (AVUs) and system information to a python dictionary.