feat: replace sub-organization relations by membership relations
- Remove relations based on the `org:hasSubOrganization` predicate. - Migrate triples for the `org:hasSubOrganization` predicate to new, appropriate triples.
This commit is contained in:
committed by
Alexander van den Berghe
parent
2c6d73d389
commit
c7e58abdc3
@@ -0,0 +1,28 @@
|
||||
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/>
|
||||
|
||||
INSERT {
|
||||
GRAPH ?g {
|
||||
?membership
|
||||
a org:Membership;
|
||||
mu:uuid ?uuid;
|
||||
org:organization ?organization;
|
||||
org:member ?memberOrganization;
|
||||
org:role <http://data.lblod.info/id/rollen/2152eb830b1143bfb97a7dd9596d6c63>.
|
||||
}
|
||||
}
|
||||
WHERE {
|
||||
VALUES ?g {
|
||||
<http://mu.semte.ch/graphs/worship-service>
|
||||
<http://mu.semte.ch/graphs/administrative-unit>
|
||||
<http://mu.semte.ch/graphs/shared>
|
||||
}
|
||||
|
||||
GRAPH ?g {
|
||||
?memberOrganization org:memberOf ?organization.
|
||||
}
|
||||
|
||||
BIND(SHA1(CONCAT(STR(?memberOrganization), STR(?organization), "member of")) as ?uuid)
|
||||
BIND(IRI(CONCAT("http://data.lblod.info/id/lidmaatschap/", ?uuid)) AS ?membership)
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
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 {
|
||||
?subOrganization org:memberOf ?organization.
|
||||
|
||||
?membership
|
||||
a org:Membership;
|
||||
mu:uuid ?uuid;
|
||||
org:organization ?organization;
|
||||
org:member ?subOrganization;
|
||||
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8>.
|
||||
}
|
||||
}
|
||||
WHERE {
|
||||
VALUES ?g {
|
||||
<http://mu.semte.ch/graphs/worship-service>
|
||||
<http://mu.semte.ch/graphs/administrative-unit>
|
||||
<http://mu.semte.ch/graphs/shared>
|
||||
}
|
||||
|
||||
GRAPH ?g {
|
||||
?organization org:hasSubOrganization ?subOrganization.
|
||||
}
|
||||
|
||||
BIND(SHA1(CONCAT(STR(?organization), STR(?subOrganization), "sub organization")) as ?uuid)
|
||||
BIND(IRI(CONCAT("http://data.lblod.info/id/lidmaatschap/", ?uuid)) AS ?membership)
|
||||
}
|
||||
@@ -445,23 +445,12 @@
|
||||
"target": "organizations",
|
||||
"cardinality": "many"
|
||||
},
|
||||
"sub-organizations": {
|
||||
"predicate": "org:hasSubOrganization",
|
||||
"target": "organizations",
|
||||
"cardinality": "many"
|
||||
},
|
||||
"is-associated-with": {
|
||||
"predicate": "org:linkedTo",
|
||||
"target": "organizations",
|
||||
"cardinality": "one",
|
||||
"inverse": true
|
||||
},
|
||||
"is-sub-organization-of": {
|
||||
"predicate": "org:hasSubOrganization",
|
||||
"target": "organizations",
|
||||
"cardinality": "one",
|
||||
"inverse": true
|
||||
},
|
||||
"memberships-of-organizations": {
|
||||
"predicate": "org:member",
|
||||
"target": "memberships",
|
||||
@@ -474,11 +463,6 @@
|
||||
"cardinality": "many",
|
||||
"inverse": true
|
||||
},
|
||||
"is-member-of": {
|
||||
"predicate": "org:memberOf",
|
||||
"target": "organizations",
|
||||
"cardinality": "many"
|
||||
},
|
||||
"sector": {
|
||||
"predicate": "dc_terms:isPartOf",
|
||||
"target": "sectors",
|
||||
|
||||
Reference in New Issue
Block a user