Skip to content

entity#

Entity#

Bases: AbstractBaseModel

An entity related to the dataset or provenance.

Source: http://www.w3.org/ns/prov#Entity

Source code in src/apps/core/models/entity.py
class Entity(AbstractBaseModel):
    """An entity related to the dataset or provenance.

    Source: http://www.w3.org/ns/prov#Entity
    """

    copier = ModelCopier(copied_relations=[], parent_relations=["provenance", "relation"])

    title = HStoreField(help_text='example: {"en":"title", "fi":"otsikko"}', blank=True, null=True)
    description = HStoreField(
        help_text='example: {"en":"description", "fi":"kuvaus"}', blank=True, null=True
    )
    entity_identifier = models.CharField(max_length=512, blank=True, null=True)
    type = models.ForeignKey(ResourceType, on_delete=models.CASCADE, blank=True, null=True)
    provenance = models.ForeignKey(
        "Provenance",
        on_delete=models.CASCADE,
        related_name="used_entity",
        null=True,
        blank=True,
    )

    class Meta(AbstractBaseModel.Meta):
        verbose_name_plural = "Entities"