Add Thesaurus#

metacatalog.api.add_thesaurus(session: Session, name: str, title: str, organisation: str, url: str, description: str = None, uuid: str = None) Thesaurus#

New in version 0.1.10.

Add a new thesaurus to reference new keywords.

Warning

If you want to add existing Thesaurii for reference, you have to to add their existing UUID as well, otherwise this function will assign new ones.

metacatalog.api.session#

SQLAlchemy session connected to the database.

Type:

sqlalchemy.Session

metacatalog.api.uuid#

An UUID version 4 to globally identify the keyword list. If you add a new thesaurus, do not set the UUID as a new UUID will be set.

Type:

str

metacatalog.api.name#

Short name of the keyword list. Do not use the full qualified name here, just the short version used for filtering.

Type:

str

metacatalog.api.title#

Full qualified name used by the distributor to identify the keyword list globally.

Type:

str

metacatalog.api.organisation#

The full organisation name to identify the authority maintaining the thesaurus.

Type:

str

metacatalog.api.description#

Optional. Futher details about the thesaurus, like scope or implementation details.

Type:

str

metacatalog.api.url#

The permanent URL at which the full keyword list can be found. Do not link the organisation or an overview page here. Usually, this points to an XML representation of the thesaurus. It may contain a placeholder called UUID to load specific keyword objects only.

Type:

str

Returns:

thesaurus – Thesaurus instance of the added thesaurus entity.

Return type:

metacatalog.models.Thesaurus