Skip to main content

MetaConventionClient

add_key

Sends the request to add an allowed key for DID metadata (update the DID Metadata Conventions table with a new key).

Arguments:

key: the name for the new key.

key_type: the type of the key: all(container, dataset, file), collection(dataset or container), file, derived(compute from file for collection).

value_type: the type of the value, if defined.

value_regexp: the regular expression that values should match, if defined.

Raises:

Duplicate: if key already exists.

Returns:

True if key was created successfully.

list_keys

Sends the request to list all keys for DID Metadata Conventions.

Returns:

a list containing the names of all keys.

list_values

Sends the request to lists all allowed values for a DID key (all values for a key in DID Metadata Conventions).

.

:return: a list containing the names of all values for a key.

add_value

Sends the request to add a value for a key in DID Metadata Convention.

Arguments:

key: the name for key.

value: the value.

Raises:

Duplicate: if valid already exists.

Returns:

True if value was created successfully.

del_value

Delete a key in the DID Metadata Conventions table.

Arguments:

key: the name for key.

value: the value.

del_key

Delete an allowed key.

Arguments:

key: the name for key.

update_key

Update a key.

Arguments:

key: the name for key.

type_: the type of the value, if defined.

regexp: the regular expression that values should match, if defined.