Coverage for apis_core/apis_entities/rdfconfigs/person.py: 100%
17 statements
« prev ^ index » next coverage.py v7.5.3, created at 2026-02-19 10:33 +0000
« prev ^ index » next coverage.py v7.5.3, created at 2026-02-19 10:33 +0000
1from apis_core.utils.rdf import Attribute, Filter
4class E21_PersonFromDNB:
5 filter_type_is_differentiated_person = Filter(
6 [("rdf:type", "gndo:DifferentiatedPerson")]
7 )
9 forename = Attribute(
10 [
11 "gndo:preferredNameEntityForThePerson/gndo:forename",
12 "gndo:variantNameForThePerson/gndo:forename",
13 "gndo:forename",
14 "gndo:preferredNameForThePerson",
15 ]
16 )
17 surname = Attribute(
18 [
19 "gndo:preferredNameEntityForThePerson/gndo:surname",
20 "gndo:variantNameForThePerson/gndo:surname",
21 "gndo:surname",
22 ]
23 )
24 alternative_names = Attribute("gndo:variantNameForThePerson")
25 date_of_birth = Attribute("gndo:dateOfBirth")
26 date_of_death = Attribute("gndo:dateOfDeath")
27 same_as = Attribute("owl:sameAs")
28 profession = Attribute("gndo:professionOrOccupation")
31class E21_PersonFromWikidata:
32 filter_p31_is_q5 = Filter([("wdt:P31", "wd:Q5")])
34 forename = Attribute("wdt:P735/rdfs:label")
35 surname = Attribute("wdt:P734/rdfs:label")
36 date_of_birth = Attribute("wdt:P569")
37 date_of_death = Attribute("wdt:P570")
38 same_as = Attribute(
39 ["owl:sameAs", "wdtn:P227", "wdtn:P1566", "wdtn:P214", "wdtn:P244"]
40 )