betty.ancestry.date module

Date types with dates.

class betty.ancestry.date.HasDate[source]

Bases: LinkedDataDumpableJsonLdObject

A resource with date information.

__init__(*args: Any, date: Date | DateRange | None = None, **kwargs: Any)[source]
dated_linked_data_contexts() tuple[str | None, str | None, str | None][source]

Get the JSON-LD context term definition IRIs for the possible dates.

Returns:

A 3-tuple with the IRI for a single date, a start date, and an end date, respectively.

async dump_linked_data(project: Project) DumpMapping[Dump][source]

Dump this instance to JSON-LD.

async classmethod linked_data_schema(project: Project) JsonLdObject[source]

Define the JSON Schema for betty.json.linked_data.LinkedDataDumpable.dump_linked_data().