-
Notifications
You must be signed in to change notification settings - Fork 4
/
1.4.2.b-mandates-missing-phone-secretaris.rq
119 lines (108 loc) · 3.27 KB
/
1.4.2.b-mandates-missing-phone-secretaris.rq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX locn: <http://www.w3.org/ns/locn#>
PREFIX schema: <http://schema.org/>
PREFIX regorg: <http://www.w3.org/ns/regorg#>
PREFIX person: <http://www.w3.org/ns/person#>
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
PREFIX dbpedia: <http://dbpedia.org/ontology/>
PREFIX adms: <http://www.w3.org/ns/adms#>
PREFIX euro: <http://data.europa.eu/m8g/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX organisatie: <https://data.vlaanderen.be/ns/organisatie#>
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
PREFIX lblodlg: <https://data.lblod.info/vocabularies/leidinggevenden/>
PREFIX dc_terms: <http://purl.org/dc/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX euvoc: <http://publications.europa.eu/ontology/euvoc#>
PREFIX ere: <http://data.lblod.info/vocabularies/erediensten/>
PREFIX ch: <http://data.lblod.info/vocabularies/contacthub/>
PREFIX code: <http://lblod.data.gift/vocabularies/organisatie/>
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?bestuur ?label ?typeEredienst ?provincie ?bestuursOrgaan ?parentBestuursOrgaan ?firstName ?lastName
FROM <http://mu.semte.ch/graphs/organisatieportaal>
WHERE {
?bestuur
a
?type;
regorg:orgStatus/skos:prefLabel
"Actief".
{
?bestuur ^besluit:bestuurt ?bestuursOrgaan.
}
UNION
{
?bestuur ^besluit:bestuurt ?parentBestuursOrgaan.
?bestuursOrgaan generiek:isTijdspecialisatieVan ?parentBestuursOrgaan.
}
?bestuursOrgaan mandaat:bindingEinde ?einde.
FILTER(?einde > now())
?bestuursOrgaan
org:hasPost
?post.
?post
org:role/skos:prefLabel
?role.
FILTER(?role IN ("Secretaris van het centraal bestuur van de eredienst", "Secretaris van het bestuur van de eredienst"))
?mandataris org:holds ?post;
mandaat:isBestuurlijkeAliasVan ?person .
?person foaf:givenName ?firstName ;
foaf:familyName ?lastName .
FILTER NOT EXISTS {
?mandataris
schema:contactPoint
?contactPoint.
?contactPoint
schema:telephone
?telephone.
FILTER (strlen(?telephone) > 0)
}
{
?mandataris mandaat:einde ?endPosition .
FILTER (NOW() < ?endPosition)
}
UNION
{
FILTER NOT EXISTS { ?mandataris mandaat:einde ?endPosition . }
}
OPTIONAL {
?bestuur
skos:prefLabel
?label
}
OPTIONAL {
?bestuur
ere:typeEredienst
?typeEredienstUri.
OPTIONAL {
?typeEredienstUri
skos:prefLabel
?typeEredienst.
}
}
OPTIONAL {
?bestuur
org:hasPrimarySite
?primarySite.
OPTIONAL {
?primarySite
organisatie:bestaatUit
?sa.
OPTIONAL {
?sa
locn:adminUnitL2
?provincie.
}
}
}
FILTER (?type IN (
<http://data.lblod.info/vocabularies/erediensten/CentraalBestuurVanDeEredienst>,
<http://data.lblod.info/vocabularies/erediensten/BestuurVanDeEredienst>
))
}