Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
68b5c67a16 |
@@ -1,11 +1,72 @@
|
||||
|
||||
const PREFIXES = `
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX lblodlg: <http://data.lblod.info/vocabularies/leidinggevenden/>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>`
|
||||
|
||||
const contextConfig = {
|
||||
addTypes: {
|
||||
scope: 'all', // 'inserts, 'deletes', 'all' or none. To add rdf:type to subjects of inserts, deletes or both
|
||||
exhausitive: false, // true or false: find all types for a subject, even if one is already present in delta
|
||||
},
|
||||
contextQueries: []
|
||||
contextQueries: [
|
||||
// Case Leidnggevenden
|
||||
// They can be triggered when being inserted or when their link to a bestuursfunctie is added
|
||||
{
|
||||
trigger: { // subjectType or predicateValue
|
||||
subjectType: "lblodlg:Functionaris"
|
||||
},
|
||||
queryTemplate: (subject) => `
|
||||
${PREFIXES}
|
||||
CONSTRUCT {
|
||||
?functionaris org:holds ?bestuursfunctie ;
|
||||
?p ?o .
|
||||
?orgaanInTime lblodlg:heeftBestuursfunctie ?bestuursfunctie ;
|
||||
mandaat:isTijdspecialisatieVan ?orgaan .
|
||||
?orgaan besluit:bestuurt ?eenheid .
|
||||
?eenheid besluit:classificatie ?classification .
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/landing-zone/leidinggevenden> {
|
||||
VALUES ?functionaris { ${subject} }
|
||||
?functionaris org:holds ?bestuursfunctie ;
|
||||
?p ?o .
|
||||
?orgaanInTime lblodlg:heeftBestuursfunctie ?bestuursfunctie ;
|
||||
mandaat:isTijdspecialisatieVan ?orgaan .
|
||||
?orgaan besluit:bestuurt ?eenheid .
|
||||
?eenheid besluit:classificatie ?classification .
|
||||
}
|
||||
}`
|
||||
},
|
||||
{
|
||||
trigger: {
|
||||
predicateValue: "org:holds"
|
||||
},
|
||||
queryTemplate: (subject) => `
|
||||
${PREFIXES}
|
||||
CONSTRUCT {
|
||||
?functionaris org:holds ?bestuursfunctie ;
|
||||
?p ?o .
|
||||
?orgaanInTime lblodlg:heeftBestuursfunctie ?bestuursfunctie ;
|
||||
mandaat:isTijdspecialisatieVan ?orgaan .
|
||||
?orgaan besluit:bestuurt ?eenheid .
|
||||
?eenheid besluit:classificatie ?classification .
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/landing-zone/leidinggevenden> {
|
||||
VALUES ?functionaris { ${subject} }
|
||||
?functionaris org:holds ?bestuursfunctie ;
|
||||
?p ?o .
|
||||
?orgaanInTime lblodlg:heeftBestuursfunctie ?bestuursfunctie ;
|
||||
mandaat:isTijdspecialisatieVan ?orgaan .
|
||||
?orgaan besluit:bestuurt ?eenheid .
|
||||
?eenheid besluit:classificatie ?classification .
|
||||
}
|
||||
}`
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
contextConfig
|
||||
contextConfig,
|
||||
PREFIXES
|
||||
};
|
||||
|
||||
@@ -1,11 +1,72 @@
|
||||
|
||||
const PREFIXES = `
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX lblodlg: <http://data.lblod.info/vocabularies/leidinggevenden/>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>`
|
||||
|
||||
const contextConfig = {
|
||||
addTypes: {
|
||||
scope: 'all', // 'inserts, 'deletes', 'all' or none. To add rdf:type to subjects of inserts, deletes or both
|
||||
exhausitive: false, // true or false: find all types for a subject, even if one is already present in delta
|
||||
},
|
||||
contextQueries: []
|
||||
contextQueries: [
|
||||
// Case Mandatarissen
|
||||
// They can be triggered when being inserted or when their link to a mandate is added
|
||||
{
|
||||
trigger: { // subjectType or predicateValue
|
||||
subjectType: "mandaat:Mandataris"
|
||||
},
|
||||
queryTemplate: (subject) => `
|
||||
${PREFIXES}
|
||||
CONSTRUCT {
|
||||
?mandataris org:holds ?mandate ;
|
||||
?p ?o .
|
||||
?orgaanInTime org:hasPost ?mandate ;
|
||||
mandaat:isTijdspecialisatieVan ?orgaan .
|
||||
?orgaan besluit:bestuurt ?eenheid .
|
||||
?eenheid besluit:classificatie ?classification .
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/landing-zone/mandatarissen> {
|
||||
VALUES ?mandataris { ${subject} }
|
||||
?mandataris org:holds ?mandate ;
|
||||
?p ?o .
|
||||
?orgaanInTime org:hasPost ?mandate ;
|
||||
mandaat:isTijdspecialisatieVan ?orgaan .
|
||||
?orgaan besluit:bestuurt ?eenheid .
|
||||
?eenheid besluit:classificatie ?classification .
|
||||
}
|
||||
}`
|
||||
},
|
||||
{
|
||||
trigger: {
|
||||
predicateValue: "org:holds"
|
||||
},
|
||||
queryTemplate: (subject) => `
|
||||
${PREFIXES}
|
||||
CONSTRUCT {
|
||||
?mandataris org:holds ?mandate ;
|
||||
?p ?o .
|
||||
?orgaanInTime org:hasPost ?mandate ;
|
||||
mandaat:isTijdspecialisatieVan ?orgaan .
|
||||
?orgaan besluit:bestuurt ?eenheid .
|
||||
?eenheid besluit:classificatie ?classification .
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/landing-zone/mandatarissen> {
|
||||
VALUES ?mandataris { ${subject} }
|
||||
?mandataris org:holds ?mandate ;
|
||||
?p ?o .
|
||||
?orgaanInTime org:hasPost ?mandate ;
|
||||
mandaat:isTijdspecialisatieVan ?orgaan .
|
||||
?orgaan besluit:bestuurt ?eenheid .
|
||||
?eenheid besluit:classificatie ?classification .
|
||||
}
|
||||
}`
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
contextConfig
|
||||
contextConfig,
|
||||
PREFIXES
|
||||
};
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
|
||||
?functionaris ?pfunctionaris ?ofunctionaris .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
|
||||
?functionaris a <http://data.lblod.info/vocabularies/leidinggevenden/Functionaris> ;
|
||||
<http://www.w3.org/ns/org#holds> ?bestuursfunctie ;
|
||||
?pfunctionaris ?ofunctionaris .
|
||||
}
|
||||
|
||||
?orgaan <http://data.lblod.info/vocabularies/leidinggevenden/heeftBestuursfunctie> ?bestuursfunctie ;
|
||||
<http://data.vlaanderen.be/ns/mandaat#isTijdspecialisatieVan>/<http://data.vlaanderen.be/ns/besluit#bestuurt>/<http://data.vlaanderen.be/ns/besluit#classificatie> ?classification .
|
||||
|
||||
FILTER(?classification NOT IN (
|
||||
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000000>,
|
||||
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001>,
|
||||
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000002>,
|
||||
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000003>
|
||||
))
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
# Filtering classes to ingest
|
||||
|
||||
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
|
||||
|
||||
{
|
||||
?s a <http://www.w3.org/ns/person#Person> ;
|
||||
?p ?o .
|
||||
@@ -24,17 +26,117 @@
|
||||
?p ?o .
|
||||
}.
|
||||
|
||||
# Functionarissen should be linked to a gemeente, district, provincie or ocmw only (FOR NOW)
|
||||
|
||||
{
|
||||
?s a <http://data.lblod.info/vocabularies/leidinggevenden/Functionaris> ;
|
||||
<http://www.w3.org/ns/org#holds> ?bestuursfunctie ;
|
||||
?p ?o .
|
||||
|
||||
?orgaanInTime <http://data.lblod.info/vocabularies/leidinggevenden/heeftBestuursfunctie> ?bestuursfunctie ;
|
||||
<https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan> ?orgaan .
|
||||
?orgaan <http://data.vlaanderen.be/ns/besluit#bestuurt> ?bestuur .
|
||||
?bestuur <http://www.w3.org/ns/org#classification> <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000000> .
|
||||
} => {
|
||||
?s a <http://data.lblod.info/vocabularies/leidinggevenden/Functionaris> ;
|
||||
?p ?o .
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://data.lblod.info/vocabularies/leidinggevenden/Functionaris> ;
|
||||
<http://www.w3.org/ns/org#holds> ?bestuursfunctie ;
|
||||
?p ?o .
|
||||
|
||||
?orgaanInTime <http://data.lblod.info/vocabularies/leidinggevenden/heeftBestuursfunctie> ?bestuursfunctie ;
|
||||
<https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan> ?orgaan .
|
||||
?orgaan <http://data.vlaanderen.be/ns/besluit#bestuurt> ?bestuur .
|
||||
?bestuur <http://www.w3.org/ns/org#classification> <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001> .
|
||||
} => {
|
||||
?s a <http://data.lblod.info/vocabularies/leidinggevenden/Functionaris> ;
|
||||
?p ?o .
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://data.lblod.info/vocabularies/leidinggevenden/Functionaris> ;
|
||||
<http://www.w3.org/ns/org#holds> ?bestuursfunctie ;
|
||||
?p ?o .
|
||||
|
||||
?orgaanInTime <http://data.lblod.info/vocabularies/leidinggevenden/heeftBestuursfunctie> ?bestuursfunctie ;
|
||||
<https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan> ?orgaan .
|
||||
?orgaan <http://data.vlaanderen.be/ns/besluit#bestuurt> ?bestuur .
|
||||
?bestuur <http://www.w3.org/ns/org#classification> <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000002> .
|
||||
} => {
|
||||
?s a <http://data.lblod.info/vocabularies/leidinggevenden/Functionaris> ;
|
||||
?p ?o .
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://data.lblod.info/vocabularies/leidinggevenden/Functionaris> ;
|
||||
<http://www.w3.org/ns/org#holds> ?bestuursfunctie ;
|
||||
?p ?o .
|
||||
|
||||
?orgaanInTime <http://data.lblod.info/vocabularies/leidinggevenden/heeftBestuursfunctie> ?bestuursfunctie ;
|
||||
<https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan> ?orgaan .
|
||||
?orgaan <http://data.vlaanderen.be/ns/besluit#bestuurt> ?bestuur .
|
||||
?bestuur <http://www.w3.org/ns/org#classification> <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000003> .
|
||||
} => {
|
||||
?s a <http://data.lblod.info/vocabularies/leidinggevenden/Functionaris> ;
|
||||
?p ?o .
|
||||
}.
|
||||
|
||||
# Mandatarissen should be linked to a gemeente, district, provincie or ocmw only (FOR NOW)
|
||||
|
||||
{
|
||||
?s a <http://data.vlaanderen.be/ns/mandaat#Mandataris> ;
|
||||
<http://www.w3.org/ns/org#holds> ?mandate ;
|
||||
?p ?o .
|
||||
|
||||
?orgaanInTime <http://www.w3.org/ns/org#hasPost> ?mandate ;
|
||||
<https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan> ?orgaan .
|
||||
?orgaan <http://data.vlaanderen.be/ns/besluit#bestuurt> ?bestuur .
|
||||
?bestuur <http://www.w3.org/ns/org#classification> <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000000> .
|
||||
} => {
|
||||
?s a <http://data.vlaanderen.be/ns/mandaat#Mandataris> ;
|
||||
?p ?o .
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://data.vlaanderen.be/ns/mandaat#Mandataris> ;
|
||||
<http://www.w3.org/ns/org#holds> ?mandate ;
|
||||
?p ?o .
|
||||
|
||||
?orgaanInTime <http://www.w3.org/ns/org#hasPost> ?mandate ;
|
||||
<https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan> ?orgaan .
|
||||
?orgaan <http://data.vlaanderen.be/ns/besluit#bestuurt> ?bestuur .
|
||||
?bestuur <http://www.w3.org/ns/org#classification> <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001> .
|
||||
} => {
|
||||
?s a <http://data.vlaanderen.be/ns/mandaat#Mandataris> ;
|
||||
?p ?o .
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://data.vlaanderen.be/ns/mandaat#Mandataris> ;
|
||||
<http://www.w3.org/ns/org#holds> ?mandate ;
|
||||
?p ?o .
|
||||
|
||||
?orgaanInTime <http://www.w3.org/ns/org#hasPost> ?mandate ;
|
||||
<https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan> ?orgaan .
|
||||
?orgaan <http://data.vlaanderen.be/ns/besluit#bestuurt> ?bestuur .
|
||||
?bestuur <http://www.w3.org/ns/org#classification> <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000002> .
|
||||
} => {
|
||||
?s a <http://data.vlaanderen.be/ns/mandaat#Mandataris> ;
|
||||
?p ?o .
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://data.vlaanderen.be/ns/mandaat#Mandataris> ;
|
||||
<http://www.w3.org/ns/org#holds> ?mandate ;
|
||||
?p ?o .
|
||||
|
||||
?orgaanInTime <http://www.w3.org/ns/org#hasPost> ?mandate ;
|
||||
<https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan> ?orgaan .
|
||||
?orgaan <http://data.vlaanderen.be/ns/besluit#bestuurt> ?bestuur .
|
||||
?bestuur <http://www.w3.org/ns/org#classification> <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000003> .
|
||||
} => {
|
||||
?s a <http://data.vlaanderen.be/ns/mandaat#Mandataris> ;
|
||||
?p ?o .
|
||||
|
||||
@@ -228,7 +228,7 @@ services:
|
||||
restart: always
|
||||
logging: *default-logging
|
||||
reasoner:
|
||||
image: eyereasoner/reasoning-service:1.0.2
|
||||
image: eyereasoner/reasoning-service:increased-stack-limit
|
||||
volumes:
|
||||
- ./config/reasoner:/config
|
||||
################################################################################
|
||||
|
||||
Reference in New Issue
Block a user