From 375865e54824b0c5d38103499828294cee3a42d3 Mon Sep 17 00:00:00 2001 From: mirdono Date: Mon, 20 Nov 2023 08:59:08 +0100 Subject: [PATCH 01/12] Renamed Agent/Agents to Functionary/Functionaries --- config/dispatcher/dispatcher.ex | 4 +- config/resources/domain.json | 74 +++++++++------------------------ config/search/config.json | 30 ++++++------- config/search/dev/config.json | 30 ++++++------- 4 files changed, 52 insertions(+), 86 deletions(-) diff --git a/config/dispatcher/dispatcher.ex b/config/dispatcher/dispatcher.ex index 6e1116c..4ef9420 100644 --- a/config/dispatcher/dispatcher.ex +++ b/config/dispatcher/dispatcher.ex @@ -60,8 +60,8 @@ defmodule Dispatcher do Proxy.forward conn, path, "http://cache/board-position-codes/" end - match "/agents/*path", %{ accept: [:json], layer: :api} do - Proxy.forward conn, path, "http://cache/agents/" + match "/functionaries/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://cache/functionaries/" end match "/agent-status-codes/*path", %{ accept: [:json], layer: :api} do diff --git a/config/resources/domain.json b/config/resources/domain.json index 5a52006..c7bdb42 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -61,9 +61,9 @@ "cardinality": "many", "inverse": true }, - "agents": { + "functionaries": { "predicate": "mandaat:isBestuurlijkeAliasVan", - "target": "agents", + "target": "functionaries", "cardinality": "many", "inverse": true } @@ -125,9 +125,7 @@ }, "mandatories": { "class": "mandaat:Mandataris", - "super": [ - "agents-in-position" - ], + "super": ["agents-in-position"], "attributes": { "start-date": { "type": "date", @@ -170,16 +168,12 @@ "predicate": "skos:prefLabel" } }, - "features": [ - "include-uri" - ], + "features": ["include-uri"], "new-resource-base": "http://data.vlaanderen.be/id/concept/MandatarisStatusCode/" }, "worship-mandatories": { "class": "ere:EredienstMandataris", - "super": [ - "mandatories" - ], + "super": ["mandatories"], "attributes": { "expected-end-date": { "type": "date", @@ -244,9 +238,7 @@ }, "mandates": { "class": "mandaat:Mandaat", - "super": [ - "posts" - ], + "super": ["posts"], "relationships": { "role-board": { "predicate": "org:role", @@ -268,11 +260,9 @@ }, "new-resource-base": "http://data.lblod.info/id/mandaten/" }, - "agents": { + "functionaries": { "class": "lblodlg:Functionaris", - "super": [ - "agents-in-position" - ], + "super": ["agents-in-position"], "attributes": { "start-date": { "type": "datetime", @@ -310,16 +300,12 @@ "predicate": "skos:prefLabel" } }, - "features": [ - "include-uri" - ], + "features": ["include-uri"], "new-resource-base": "http://data.vlaanderen.be/id/concept/functionarisStatusCode/" }, "board-positions": { "class": "lblodlg:Bestuursfunctie", - "super": [ - "posts" - ], + "super": ["posts"], "relationships": { "role-board": { "predicate": "org:role", @@ -490,9 +476,7 @@ }, "administrative-units": { "class": "besluit:Bestuurseenheid", - "super": [ - "organizations" - ], + "super": ["organizations"], "relationships": { "classification": { "predicate": "org:classification", @@ -540,16 +524,12 @@ }, "administrative-unit-classification-codes": { "class": "code:BestuurseenheidClassificatieCode", - "super": [ - "organization-classification-codes" - ], + "super": ["organization-classification-codes"], "new-resource-base": "http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/" }, "worship-administrative-units": { "class": "ere:EredienstBestuurseenheid", - "super": [ - "administrative-units" - ], + "super": ["administrative-units"], "relationships": { "recognized-worship-type": { "predicate": "ere:typeEredienst", @@ -572,9 +552,7 @@ }, "worship-services": { "class": "ere:BestuurVanDeEredienst", - "super": [ - "worship-administrative-units" - ], + "super": ["worship-administrative-units"], "attributes": { "denomination": { "type": "string", @@ -599,16 +577,12 @@ }, "central-worship-services": { "class": "ere:CentraalBestuurVanDeEredienst", - "super": [ - "worship-administrative-units" - ], + "super": ["worship-administrative-units"], "new-resource-base": "http://data.lblod.info/id/centraleBesturenVanDeEredienst/" }, "representative-bodies": { "class": "ere:RepresentatiefOrgaan", - "super": [ - "organizations" - ], + "super": ["organizations"], "relationships": { "classification": { "predicate": "org:classification", @@ -631,9 +605,7 @@ }, "representative-body-classification-codes": { "class": "ext:RepresentatiefOrgaanClassificatieCode", - "super": [ - "organization-classification-codes" - ], + "super": ["organization-classification-codes"], "new-resource-base": "http://data.vlaanderen.be/id/concept/RepresentatiefOrgaanClassificatieCode/" }, "governing-bodies": { @@ -851,9 +823,7 @@ "predicate": "skos:prefLabel" } }, - "features": [ - "include-uri" - ], + "features": ["include-uri"], "new-resource-base": "http://lblod.data.gift/concepts/" }, "locations": { @@ -906,9 +876,7 @@ }, "ministers": { "class": "ere:RolBedienaar", - "super": [ - "agents-in-position" - ], + "super": ["agents-in-position"], "relationships": { "minister-position": { "predicate": "org:holds", @@ -976,9 +944,7 @@ }, "minister-positions": { "class": "ere:PositieBedienaar", - "super": [ - "posts" - ], + "super": ["posts"], "relationships": { "function": { "predicate": "ere:functie", diff --git a/config/search/config.json b/config/search/config.json index 6e56567..db8733f 100644 --- a/config/search/config.json +++ b/config/search/config.json @@ -250,8 +250,8 @@ } }, { - "type": "agent", - "on_path": "agents", + "type": "functionary", + "on_path": "functionaries", "rdf_type": "http://data.lblod.info/vocabularies/leidinggevenden/Functionaris", "properties": { "given_name": [ @@ -568,14 +568,14 @@ }, { "type": "person", - "composite_types": ["minister", "agent", "mandatory"], + "composite_types": ["minister", "functionary", "mandatory"], "on_path": "people", "properties": [ { "name": "given_name", "mappings": { "minister": "given_name", - "agent": "given_name", + "functionary": "given_name", "mandatory": "given_name" } }, @@ -583,7 +583,7 @@ "name": "person_id", "mappings": { "minister": "person_id", - "agent": "person_id", + "functionary": "person_id", "mandatory": "person_id" } }, @@ -591,7 +591,7 @@ "name": "family_name", "mappings": { "minister": "family_name", - "agent": "family_name", + "functionary": "family_name", "mandatory": "family_name" } }, @@ -599,7 +599,7 @@ "name": "first_name_used", "mappings": { "minister": "first_name_used", - "agent": "first_name_used", + "functionary": "first_name_used", "mandatory": "first_name_used" } }, @@ -607,7 +607,7 @@ "name": "end_date", "mappings": { "minister": "end_date", - "agent": "end_date", + "functionary": "end_date", "mandatory": "end_date" } }, @@ -615,7 +615,7 @@ "name": "organization_id", "mappings": { "minister": "organization_id", - "agent": "organization_id", + "functionary": "organization_id", "mandatory": "organization_id" } }, @@ -623,7 +623,7 @@ "name": "organization_classification", "mappings": { "minister": "organization_classification", - "agent": "organization_classification", + "functionary": "organization_classification", "mandatory": "organization_classification" } }, @@ -631,7 +631,7 @@ "name": "organization_name", "mappings": { "minister": "organization_name", - "agent": "organization_name", + "functionary": "organization_name", "mandatory": "organization_name" } }, @@ -639,7 +639,7 @@ "name": "organization_municipality", "mappings": { "minister": "organization_municipality", - "agent": "organization_municipality", + "functionary": "organization_municipality", "mandatory": "organization_municipality" } }, @@ -647,7 +647,7 @@ "name": "organization_province", "mappings": { "minister": "organization_province", - "agent": "organization_province", + "functionary": "organization_province", "mandatory": "organization_province" } }, @@ -655,7 +655,7 @@ "name": "position_id", "mappings": { "minister": "position_id", - "agent": "position_id", + "functionary": "position_id", "mandatory": "position_id" } }, @@ -663,7 +663,7 @@ "name": "position_name", "mappings": { "minister": "position_name", - "agent": "position_name", + "functionary": "position_name", "mandatory": "position_name" } } diff --git a/config/search/dev/config.json b/config/search/dev/config.json index 13890ba..c58fda3 100644 --- a/config/search/dev/config.json +++ b/config/search/dev/config.json @@ -222,8 +222,8 @@ } }, { - "type": "agent", - "on_path": "agents", + "type": "functionary", + "on_path": "functionaries", "rdf_type": "http://data.lblod.info/vocabularies/leidinggevenden/Functionaris", "properties": { "given_name": [ @@ -540,14 +540,14 @@ }, { "type": "person", - "composite_types": ["minister", "agent", "mandatory"], + "composite_types": ["minister", "functionary", "mandatory"], "on_path": "people", "properties": [ { "name": "given_name", "mappings": { "minister": "given_name", - "agent": "given_name", + "functionary": "given_name", "mandatory": "given_name" } }, @@ -555,7 +555,7 @@ "name": "person_id", "mappings": { "minister": "person_id", - "agent": "person_id", + "functionary": "person_id", "mandatory": "person_id" } }, @@ -563,7 +563,7 @@ "name": "family_name", "mappings": { "minister": "family_name", - "agent": "family_name", + "functionary": "family_name", "mandatory": "family_name" } }, @@ -571,7 +571,7 @@ "name": "first_name_used", "mappings": { "minister": "first_name_used", - "agent": "first_name_used", + "functionary": "first_name_used", "mandatory": "first_name_used" } }, @@ -579,7 +579,7 @@ "name": "end_date", "mappings": { "minister": "end_date", - "agent": "end_date", + "functionary": "end_date", "mandatory": "end_date" } }, @@ -587,7 +587,7 @@ "name": "organization_id", "mappings": { "minister": "organization_id", - "agent": "organization_id", + "functionary": "organization_id", "mandatory": "organization_id" } }, @@ -595,7 +595,7 @@ "name": "organization_classification", "mappings": { "minister": "organization_classification", - "agent": "organization_classification", + "functionary": "organization_classification", "mandatory": "organization_classification" } }, @@ -603,7 +603,7 @@ "name": "organization_name", "mappings": { "minister": "organization_name", - "agent": "organization_name", + "functionary": "organization_name", "mandatory": "organization_name" } }, @@ -611,7 +611,7 @@ "name": "organization_municipality", "mappings": { "minister": "organization_municipality", - "agent": "organization_municipality", + "functionary": "organization_municipality", "mandatory": "organization_municipality" } }, @@ -619,7 +619,7 @@ "name": "organization_province", "mappings": { "minister": "organization_province", - "agent": "organization_province", + "functionary": "organization_province", "mandatory": "organization_province" } }, @@ -627,7 +627,7 @@ "name": "position_id", "mappings": { "minister": "position_id", - "agent": "position_id", + "functionary": "position_id", "mandatory": "position_id" } }, @@ -635,7 +635,7 @@ "name": "position_name", "mappings": { "minister": "position_name", - "agent": "position_name", + "functionary": "position_name", "mandatory": "position_name" } } From de9f2f19c18a9468947c0c2c9d6d590360fcc690 Mon Sep 17 00:00:00 2001 From: mirdono Date: Mon, 20 Nov 2023 10:20:28 +0100 Subject: [PATCH 02/12] Added new Agent resource --- config/authorization/config.ex | 1 + config/resources/domain.json | 39 ++++++++++++++++++++-------------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/config/authorization/config.ex b/config/authorization/config.ex index 1dd43ab..805394d 100644 --- a/config/authorization/config.ex +++ b/config/authorization/config.ex @@ -57,6 +57,7 @@ defmodule Acl.UserGroups.Config do ] @org_type [ + "http://purl.org/dc/terms/Agent", "http://www.w3.org/ns/org#Organization", "http://data.vlaanderen.be/ns/besluit#Besluit", "https://data.vlaanderen.be/ns/besluitvorming#Beslissingsactiviteit", diff --git a/config/resources/domain.json b/config/resources/domain.json index c7bdb42..3384f91 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -32,8 +32,25 @@ "nacebel": "http://data.gift/vocabularies/nace-bel/" }, "resources": { + "agents": { + "class": "dc_terms:Agent", + "relationships": { + "position": { + "predicate": "org:holds", + "target": "posts", + "cardinality": "many" + }, + "contacts": { + "predicate": "schema:contactPoint", + "target": "contact-points", + "cardinality": "many" + } + }, + "new-resource-base": "http://data.lblod.info/id/agenten/" + }, "people": { "class": "person:Person", + "super": ["agents"], "attributes": { "given-name": { "type": "string", @@ -55,12 +72,6 @@ "cardinality": "many", "inverse": true }, - "agents-in-position": { - "predicate": "org:heldBy", - "target": "agents-in-position", - "cardinality": "many", - "inverse": true - }, "functionaries": { "predicate": "mandaat:isBestuurlijkeAliasVan", "target": "functionaries", @@ -72,6 +83,7 @@ }, "agents-in-position": { "class": "ch:AgentInPositie", + "super": ["agents"], "attributes": { "agent-start-date": { "type": "date", @@ -83,11 +95,6 @@ } }, "relationships": { - "position": { - "predicate": "org:holds", - "target": "posts", - "cardinality": "one" - }, "person": { "predicate": "org:heldBy", "target": "people", @@ -114,11 +121,10 @@ "target": "organizations", "cardinality": "one" }, - "agents-in-position": { - "predicate": "org:holds", - "target": "agents-in-position", - "cardinality": "many", - "inverse": true + "agent": { + "predicate": "org:heldBy", + "target": "agents", + "cardinality": "one" } }, "new-resource-base": "http://data.lblod.info/id/posities/" @@ -355,6 +361,7 @@ }, "organizations": { "class": "org:Organization", + "super": ["agents"], "attributes": { "name": { "type": "string", From 118c78ce97f66dfa7627a9e3a0865795c1592b63 Mon Sep 17 00:00:00 2001 From: mirdono Date: Mon, 20 Nov 2023 10:24:47 +0100 Subject: [PATCH 03/12] Added migrations to introduce Agent type for people, organisations, and agents-in-position --- .../20231117161502-organisations.sparql | 32 ++++++++++++++++++ .../20231117161517-people.sparql | 33 +++++++++++++++++++ .../20231117161530-agents-in-position.sparql | 32 ++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 config/migrations/2023/20231117161347-add-agent-type/20231117161502-organisations.sparql create mode 100644 config/migrations/2023/20231117161347-add-agent-type/20231117161517-people.sparql create mode 100644 config/migrations/2023/20231117161347-add-agent-type/20231117161530-agents-in-position.sparql diff --git a/config/migrations/2023/20231117161347-add-agent-type/20231117161502-organisations.sparql b/config/migrations/2023/20231117161347-add-agent-type/20231117161502-organisations.sparql new file mode 100644 index 0000000..cf5d261 --- /dev/null +++ b/config/migrations/2023/20231117161347-add-agent-type/20231117161502-organisations.sparql @@ -0,0 +1,32 @@ +PREFIX org: +PREFIX dc_terms: + +INSERT { + GRAPH { + ?org a dc_terms:Agent . + } +} WHERE { + GRAPH { + ?org a org:Organization . + } +} + +INSERT { + GRAPH { + ?org a dc_terms:Agent . + } +} WHERE { + GRAPH { + ?org a org:Organization . + } +} + +INSERT { + GRAPH { + ?org a dc_terms:Agent . + } +} WHERE { + GRAPH { + ?org a org:Organization . + } +} diff --git a/config/migrations/2023/20231117161347-add-agent-type/20231117161517-people.sparql b/config/migrations/2023/20231117161347-add-agent-type/20231117161517-people.sparql new file mode 100644 index 0000000..d164754 --- /dev/null +++ b/config/migrations/2023/20231117161347-add-agent-type/20231117161517-people.sparql @@ -0,0 +1,33 @@ + +PREFIX person: +PREFIX dc_terms: + +INSERT { + GRAPH { + ?person a dc_terms:Agent . + } +} WHERE { + GRAPH { + ?person a person:Person . + } +} + +INSERT { + GRAPH { + ?person a dc_terms:Agent . + } +} WHERE { + GRAPH { + ?person a person:Person . + } +} + +INSERT { + GRAPH { + ?person a dc_terms:Agent . + } +} WHERE { + GRAPH { + ?person a person:Person . + } +} diff --git a/config/migrations/2023/20231117161347-add-agent-type/20231117161530-agents-in-position.sparql b/config/migrations/2023/20231117161347-add-agent-type/20231117161530-agents-in-position.sparql new file mode 100644 index 0000000..5baa48f --- /dev/null +++ b/config/migrations/2023/20231117161347-add-agent-type/20231117161530-agents-in-position.sparql @@ -0,0 +1,32 @@ +PREFIX ch: +PREFIX dc_terms: + +INSERT { + GRAPH { + ?agentInPosition a dc_terms:Agent . + } +} WHERE { + GRAPH { + ?agentInPosition a ch:AgentInPositie . + } +} + +INSERT { + GRAPH { + ?agentInPosition a dc_terms:Agent . + } +} WHERE { + GRAPH { + ?agentInPosition a ch:AgentInPositie . + } +} + +INSERT { + GRAPH { + ?agentInPosition a dc_terms:Agent . + } +} WHERE { + GRAPH { + ?agentInPosition a ch:AgentInPositie . + } +} From a23c81725670e1c82bb4b0f73be168b641dd54e1 Mon Sep 17 00:00:00 2001 From: mirdono Date: Mon, 20 Nov 2023 14:49:47 +0100 Subject: [PATCH 04/12] Fix: added missing relation --- config/resources/domain.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/resources/domain.json b/config/resources/domain.json index 3384f91..3d365bd 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -72,6 +72,12 @@ "cardinality": "many", "inverse": true }, + "agents-in-position": { + "predicate": "org:heldBy", + "target": "agents-in-position", + "cardinality": "many", + "inverse": true + }, "functionaries": { "predicate": "mandaat:isBestuurlijkeAliasVan", "target": "functionaries", From 9a3c0b3dbcf70da223df82c615296a7455791d1f Mon Sep 17 00:00:00 2001 From: mirdono Date: Thu, 23 Nov 2023 16:09:18 +0100 Subject: [PATCH 05/12] Added migration to make functionaries agents-in-position and agent --- .../20231123150643-functionaries.sparql | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 config/migrations/2023/20231117161347-add-agent-type/20231123150643-functionaries.sparql diff --git a/config/migrations/2023/20231117161347-add-agent-type/20231123150643-functionaries.sparql b/config/migrations/2023/20231117161347-add-agent-type/20231123150643-functionaries.sparql new file mode 100644 index 0000000..788fc6c --- /dev/null +++ b/config/migrations/2023/20231117161347-add-agent-type/20231123150643-functionaries.sparql @@ -0,0 +1,36 @@ +PREFIX lblodlg: +PREFIX ch: +PREFIX dc_terms: + +INSERT { + GRAPH { + ?functionary a dc_terms:Agent . + ?functionary a ch:AgentInPositie . + } +} WHERE { + GRAPH { + ?functionary a lblodlg:Functionaris + } +} + +INSERT { + GRAPH { + ?functionary a dc_terms:Agent . + ?functionary a ch:AgentInPositie . + } +} WHERE { + GRAPH { + ?functionary a lblodlg:Functionaris + } +} + +INSERT { + GRAPH { + ?functionary a dc_terms:Agent . + ?functionary a ch:AgentInPositie . + } +} WHERE { + GRAPH { + ?functionary a lblodlg:Functionaris + } +} From 90f8e4b5d1f66ce5bb525085f328f47aba12fbc7 Mon Sep 17 00:00:00 2001 From: mirdono Date: Thu, 23 Nov 2023 16:34:35 +0100 Subject: [PATCH 06/12] Added migration to ensure mandatories are also agents-in-position and agents --- .../20231123152046-mandatories.sparql | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 config/migrations/2023/20231117161347-add-agent-type/20231123152046-mandatories.sparql diff --git a/config/migrations/2023/20231117161347-add-agent-type/20231123152046-mandatories.sparql b/config/migrations/2023/20231117161347-add-agent-type/20231123152046-mandatories.sparql new file mode 100644 index 0000000..0904ae2 --- /dev/null +++ b/config/migrations/2023/20231117161347-add-agent-type/20231123152046-mandatories.sparql @@ -0,0 +1,39 @@ +PREFIX mandaat: +PREFIX ch: +PREFIX dc_terms: + +INSERT { + GRAPH { + ?mandatory a dc_terms:Agent . + ?mandatory a ch:AgentInPositie . + } +} WHERE { + GRAPH { + ?mandatory a mandaat:Mandataris + FILTER NOT EXISTS { ?mandatory a ch:AgentInPositie } + } +} + +INSERT { + GRAPH { + ?mandatory a dc_terms:Agent . + ?mandatory a ch:AgentInPositie . + } +} WHERE { + GRAPH { + ?mandatory a mandaat:Mandataris + FILTER NOT EXISTS { ?mandatory a ch:AgentInPositie } + } +} + +INSERT { + GRAPH { + ?mandatory a dc_terms:Agent . + ?mandatory a ch:AgentInPositie . + } +} WHERE { + GRAPH { + ?mandatory a mandaat:Mandataris + FILTER NOT EXISTS { ?mandatory a ch:AgentInPositie } + } +} From f295f10d008487305508088657ba7db89cdccb9a Mon Sep 17 00:00:00 2001 From: mirdono Date: Fri, 24 Nov 2023 14:01:58 +0100 Subject: [PATCH 07/12] Added rules to add Agent and AgentInPosition types --- config/reasoner/dl2op/main/mapping.n3 | 28 ++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/config/reasoner/dl2op/main/mapping.n3 b/config/reasoner/dl2op/main/mapping.n3 index 1838441..d03978c 100644 --- a/config/reasoner/dl2op/main/mapping.n3 +++ b/config/reasoner/dl2op/main/mapping.n3 @@ -17,6 +17,10 @@ PREFIX persoon_loket: PREFIX skos: PREFIX string: PREFIX xsd: +PREFIX dc_terms: +PREFIX ch: +PREFIX person: +PREFIX lblodlg: # DL and OP both use persoon:gebruikteVoornaam but with different semantics (!) # Hence the mapping is in two steps. @@ -171,4 +175,26 @@ PREFIX xsd: } } => { ?s generiek:isTijdspecialisatieVan ?o. -}. +} . + +# In OP AgentInPositie inherits from Agent +{ + ?s a ch:AgentInPositie . +} => { + ?s a dc_terms:Agent . +} . + +# In OP functionaris inherits from agents-in-position, which inherits from Agent +{ + ?s a lblodlg:Functionaris . +} => { + ?s a ch:AgentInPositie , + dc_terms:Agent . +} . + +# In OP Person inherits from Agent +{ + ?s a person:Person . +} => { + ?s a dc_terms:Agent . +} . From 3259a8008332c1ca1d29dee81228a504527ffcf9 Mon Sep 17 00:00:00 2001 From: mirdono Date: Mon, 27 Nov 2023 10:19:29 +0100 Subject: [PATCH 08/12] Added rule to add AgentInPositie and Agent types for mandatories --- config/reasoner/dl2op/main/mapping.n3 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/reasoner/dl2op/main/mapping.n3 b/config/reasoner/dl2op/main/mapping.n3 index d03978c..294e7c6 100644 --- a/config/reasoner/dl2op/main/mapping.n3 +++ b/config/reasoner/dl2op/main/mapping.n3 @@ -192,6 +192,14 @@ PREFIX lblodlg: dc_terms:Agent . } . +# In OP mandataris inherits from agents-in-position, which inherits from Agent +{ + ?s a mandaat:Mandataris . +} => { + ?s a ch:AgentInPositie , + dc_terms:Agent . +} . + # In OP Person inherits from Agent { ?s a person:Person . From 90012767a2617b2da8214414b64fe16c6f08ce7f Mon Sep 17 00:00:00 2001 From: mirdono Date: Mon, 27 Nov 2023 10:59:04 +0100 Subject: [PATCH 09/12] Added agent-in-position and agent rules to main-info --- config/reasoner/dl2op/main-info/mapping.n3 | 36 +++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/config/reasoner/dl2op/main-info/mapping.n3 b/config/reasoner/dl2op/main-info/mapping.n3 index 82bebd9..7a57298 100644 --- a/config/reasoner/dl2op/main-info/mapping.n3 +++ b/config/reasoner/dl2op/main-info/mapping.n3 @@ -17,7 +17,10 @@ PREFIX persoon_loket: PREFIX skos: PREFIX string: PREFIX xsd: - +PREFIX dc_terms: +PREFIX ch: +PREFIX person: +PREFIX lblodlg: # DL and OP both use persoon:gebruikteVoornaam but with different semantics (!) # Hence the mapping is in two steps. @@ -148,3 +151,34 @@ PREFIX xsd: } => { ?s generiek:isTijdspecialisatieVan ?o. }. + +# In OP functionaris inherits from agents-in-position, which inherits from Agent +{ + ?s a lblodlg:Functionaris . +} => { + ?s a ch:AgentInPositie , + dc_terms:Agent . +} . + +# In OP mandataris inherits from agents-in-position, which inherits from Agent +{ + ?s a mandaat:Mandataris . +} => { + ?s a ch:AgentInPositie , + dc_terms:Agent . +} . + +# In OP minister inherits from agents-in-position, which inherits from Agent +{ + ?s a ere:RolBedienaar . +} => { + ?s a ch:AgentInPositie , + dc_terms:Agent . +} . + +# In OP Person inherits from Agent +{ + ?s a person:Person . +} => { + ?s a dc_terms:Agent . +} . From cc1aa08b3683fbfb96a60b381b75dc8dd8ae8b0e Mon Sep 17 00:00:00 2001 From: mirdono Date: Mon, 27 Nov 2023 10:59:36 +0100 Subject: [PATCH 10/12] Put general rule below specific ones --- config/reasoner/dl2op/main/mapping.n3 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/config/reasoner/dl2op/main/mapping.n3 b/config/reasoner/dl2op/main/mapping.n3 index 294e7c6..0f79ceb 100644 --- a/config/reasoner/dl2op/main/mapping.n3 +++ b/config/reasoner/dl2op/main/mapping.n3 @@ -177,13 +177,6 @@ PREFIX lblodlg: ?s generiek:isTijdspecialisatieVan ?o. } . -# In OP AgentInPositie inherits from Agent -{ - ?s a ch:AgentInPositie . -} => { - ?s a dc_terms:Agent . -} . - # In OP functionaris inherits from agents-in-position, which inherits from Agent { ?s a lblodlg:Functionaris . @@ -200,6 +193,13 @@ PREFIX lblodlg: dc_terms:Agent . } . +# In OP AgentInPositie inherits from Agent +{ + ?s a ch:AgentInPositie . +} => { + ?s a dc_terms:Agent . +} . + # In OP Person inherits from Agent { ?s a person:Person . From 00ca7aded0e4fdc5d5fd9798578f3dbb756b2e5a Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Mon, 27 Nov 2023 15:40:10 +0100 Subject: [PATCH 11/12] Add missing prefix --- config/reasoner/dl2op/main-info/mapping.n3 | 1 + 1 file changed, 1 insertion(+) diff --git a/config/reasoner/dl2op/main-info/mapping.n3 b/config/reasoner/dl2op/main-info/mapping.n3 index 7a57298..ec1a9a1 100644 --- a/config/reasoner/dl2op/main-info/mapping.n3 +++ b/config/reasoner/dl2op/main-info/mapping.n3 @@ -21,6 +21,7 @@ PREFIX dc_terms: PREFIX ch: PREFIX person: PREFIX lblodlg: +PREFIX ere: # DL and OP both use persoon:gebruikteVoornaam but with different semantics (!) # Hence the mapping is in two steps. From a114380a6b2f0496d7fa86ee6e91d89b2bb10e4a Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Mon, 27 Nov 2023 15:40:35 +0100 Subject: [PATCH 12/12] Update main-info config so that added types can flow over --- config/reasoner/dl2op/main-info/query.n3q | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/config/reasoner/dl2op/main-info/query.n3q b/config/reasoner/dl2op/main-info/query.n3q index 3e0781e..2d55202 100644 --- a/config/reasoner/dl2op/main-info/query.n3q +++ b/config/reasoner/dl2op/main-info/query.n3q @@ -127,6 +127,18 @@ ?s a }. +{ + ?s a + } => { + ?s a +}. + +{ + ?s a + } => { + ?s a +}. + { ?s a } => {