Taxonomy Interface

class korus.database.interface.taxonomy.TaxonomyInterface(backend: TableBackend, label_interface: LabelInterface)[source]

Bases: TableInterface, AcousticTaxonomyManager

Defines the interface of the Taxonomy Table.

Row 0 is used for storing the draft version. The first release is stored in row 1, the second release in row 2, etc.

TODO: consider removing the name field

load()[source]

Load all taxonomy releases - including draft version which should have ID=0 - from the database into memory.

Also load the label mapping.

release(comment: str | None = None)[source]

Release a new version of the taxonomy and save it to the database

Args:
comment: str (optional)

An explanatory note

save(comment: str | None = None)[source]

Save the current draft to the database.

Note: Overwrites the existing draft.

Args:
comment: str (optional)

An explanatory note