Vocabularies

In the vocabularies app we store all the controlled vocabularies used for APIS.

Models

class apis_core.apis_vocabularies.models.AbstractRelationType(*args, **kwargs)[source]

Abstract super class which encapsulates common logic between the different relationtypes and provides various methods relating to either all or a specific relationtypes.

Parameters:

entity_field_name – the name of one of several ManyToMany fields created automatically

Returns:

None

Note: this method depends on the ‘generate_relation_fields’ method in apis_entities.models which wires the ManyToMany Fields into the entities and respective relationtypes. It is nevertheless defined here within AbstractRelationType for documentational purpose.

classmethod get_all_relationtype_classes()[source]
Returns:

list of all python classes of the relationtypes defined within this models’ module

classmethod get_all_relationtype_names()[source]
Returns:

list of all class names in lower case of the relationtypes defined within this models’ module

Returns:

a list of names of all ManyToMany field names relating to entities from the respective relationtype class

E.g. for PersonPersonRelation.get_related_entity_field_names() or personpersonrelation_instance.get_related_entity_field_names() -> [‘personB_set’, ‘personA_set’]

Note: this method depends on the ‘generate_relation_fields’ method in apis_entities.models which wires the ManyToMany Fields into the entities and respective relationtypes. It is nevertheless defined here within AbstractRelationType for documentational purpose.

classmethod get_relationtype_class_of_name(relationtype_name)[source]
Parameters:

entity_name – str : The name of an relationtype

Returns:

The model class of the relationtype respective to the given name

class apis_core.apis_vocabularies.models.CollectionType(*args, **kwargs)[source]

e.g. reseachCollection, importCollection

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.EventEventRelation(*args, **kwargs)[source]

Holds controlled vocabularies relation types of Events and Events

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.EventType(*args, **kwargs)[source]

Holds controlled vocabularies about event-types

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.EventWorkRelation(*args, **kwargs)[source]

Holds controlled vocabularies relation types of Events and Works

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.InstitutionEventRelation(*args, **kwargs)[source]

Holds controlled vocabularies relation types of Institutions and Events.

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.InstitutionInstitutionRelation(*args, **kwargs)[source]

Holds controlled vocabularies relation types of Institutions and Institutions.

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.InstitutionPlaceRelation(*args, **kwargs)[source]

Holds controlled vocabularies relation types of Institutions and Places.

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.InstitutionType(*args, **kwargs)[source]

Holds controlled vocabularies about institution-types

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.InstitutionWorkRelation(*args, **kwargs)[source]

Holds controlled vocabularies relation types of Institutions and Works.

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.LabelType(*args, **kwargs)[source]

Holds controlled vocabularies about label-types

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.PersonEventRelation(*args, **kwargs)[source]

Holds controlled vocabularies relation types of Persons and Events

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.PersonInstitutionRelation(*args, **kwargs)[source]

Holds controlled vocabularies relation types of Persons and Persons

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.PersonPersonRelation(*args, **kwargs)[source]

Holds controlled vocabularies relation types of Persons and Persons

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.PersonPlaceRelation(*args, **kwargs)[source]

Holds controlled vocabularies relation types of Persons and Places

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.PersonWorkRelation(*args, **kwargs)[source]

Holds controlled vocabularies relation types of Persons and Works

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.PlaceEventRelation(*args, **kwargs)[source]

Holds controlled vocabularies relation types of Places and Events

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.PlacePlaceRelation(*args, **kwargs)[source]

Holds controlled vocabularies relation types of Places and Places

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.PlaceType(*args, **kwargs)[source]

Holds controlled vocabularies about place-types

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.PlaceWorkRelation(*args, **kwargs)[source]

Holds controlled vocabularies relation types of Places and Works

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.ProfessionType(*args, **kwargs)[source]

Holds controlled vocabularies about profession-types

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.RelationBaseClass(*args, **kwargs)[source]

An abstract base class for other classes which contain so called ‘controlled vocabulary’ to describe the relations between main temporalized entities (’db_’)

exception DoesNotExist
exception MultipleObjectsReturned
save(*args, **kwargs)[source]

Save the current instance. Override this in a subclass if you want to control the saving process.

The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.

class apis_core.apis_vocabularies.models.TextType(*args, **kwargs)[source]

used to store the Text types for the forms

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.Title(*args, **kwargs)[source]

A person´s (academic) title

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.VocabNames(*args, **kwargs)[source]

List of Vocabulary names to allow the easy retrieval of Vovcabulary names and classes from the VocabsBaseClass

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.VocabsBaseClass(*args, **kwargs)[source]

An abstract base class for other classes which contain so called ‘controlled vocabulary’ to describe subtypes of main temporalized entites

exception DoesNotExist
exception MultipleObjectsReturned
save(*args, **kwargs)[source]

Save the current instance. Override this in a subclass if you want to control the saving process.

The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.

class apis_core.apis_vocabularies.models.VocabsUri(*args, **kwargs)[source]

Class to store URIs for imported types. URI class from metainfo is not used in order to keep the vocabularies module/app seperated from the rest of the application.

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.WorkType(*args, **kwargs)[source]

Holds controlled vocabularies about work-types

exception DoesNotExist
exception MultipleObjectsReturned
class apis_core.apis_vocabularies.models.WorkWorkRelation(*args, **kwargs)[source]

Holds controlled vocabularies relation types of Works and Works

exception DoesNotExist
exception MultipleObjectsReturned