fix: do not delete hasSubOrganization and linkedTo triples

Triples for the predicates `org:hasSubgOrganization` and `org:linkedTo` are
produced by OP for other apps to consume. Therefore, they should not be deleted.
This commit is contained in:
mirdono
2024-09-19 13:16:53 +02:00
committed by Alexander van den Berghe
parent 6cc953e4ed
commit 13d8154a9a
2 changed files with 7 additions and 19 deletions

View File

@@ -2,11 +2,6 @@ PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
DELETE {
GRAPH ?g {
?organization org:hasSubOrganization ?subOrganization .
}
}
INSERT {
GRAPH ?g {
?membership a org:Membership ;
@@ -15,8 +10,7 @@ INSERT {
org:member ?subOrganization ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> . # gerelateerd
}
}
WHERE {
} WHERE {
VALUES ?g {
<http://mu.semte.ch/graphs/worship-service>
<http://mu.semte.ch/graphs/administrative-unit>
@@ -29,4 +23,4 @@ WHERE {
BIND(SHA1(CONCAT(STR(?organization), STR(?subOrganization), "sub organization")) as ?uuid)
BIND(IRI(CONCAT("http://data.lblod.info/id/lidmaatschap/", ?uuid)) AS ?membership)
}
}

View File

@@ -3,21 +3,15 @@ PREFIX org: <http://www.w3.org/ns/org#>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
DELETE {
GRAPH ?g {
?org org:linkedTo ?foundedOrg .
}
}
INSERT {
GRAPH ?g {
?membership a org:Membership ;
mu:uuid ?uuid ;
org:organization ?foundedOrg ;
org:organization ?linkedOrg ;
org:member ?org ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> . # gerelateerd
}
}
WHERE {
} WHERE {
VALUES ?g {
<http://mu.semte.ch/graphs/worship-service>
<http://mu.semte.ch/graphs/administrative-unit>
@@ -25,9 +19,9 @@ WHERE {
}
GRAPH ?g {
?org org:linkedTo ?foundedOrg .
?org org:linkedTo ?linkedOrg .
}
BIND(SHA1(CONCAT(STR(?org), STR(?foundedOrg), "associated with")) as ?uuid)
BIND(SHA1(CONCAT(STR(?org), STR(?linkedOrg), "associated with")) as ?uuid)
BIND(IRI(CONCAT("http://data.lblod.info/id/lidmaatschap/", ?uuid)) AS ?membership)
}
}