Tagset#

class Tagset(project_uuid, tagset_uuid)#

Bases: object

Class which represents a CATMA tagset.

Parameters
  • project_uuid (str) – Name of a CATMA project directory.

  • tagset_uuid (str) – Tagset UUID. Corresponds to the directory name in the “tagsets” directory.

Raises

FileNotFoundError – If the path of the tagset’s header.json does not exist.

uuid: str#

The tagsets UUID.

path: str#

The path of the tagset within the project’s folder structure.

name: str#

The tagset’s name

tags: List[gitma.tag.Tag]#

List of tags as gitma.Tag objects.

tag_dict: Dict[str, gitma.tag.Tag]#

Dictionary of tags with UUIDs as keys and gitma.Tag objects as values.

edit_property_names(tag_names, old_prop, new_prop)#

Renames a property for all tags given as tag_names.

Parameters
  • tag_names (list) – List of names of the tags that hold the property to be renamed.

  • old_prop (str) – Property’s name that will be changed.

  • new_prop (str) – The new property’s name.

edit_possible_property_values(tag_names, prop, old_value, new_value)#

Replace an old property value with a new one. The possible property values will be listed in CATMA’s property annotation window.

Parameters
  • tag_names (list) – The list of tags with the given property.

  • prop (str) – The property that holds the given old property value.

  • old_value (str) – The old property value.

  • new_value (str) – The new property value.