@lblod/lib-decision-shapes 0.0.26 → 0.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -28,6 +28,7 @@ module.exports = __toCommonJS(index_exports);
28
28
  var basicAgendaShape = `@prefix sh: <http://www.w3.org/ns/shacl#> .
29
29
  @prefix qb: <http://purl.org/linked-data/cube#> .
30
30
  @prefix lblodBesluit: <http://lblod.data.gift/vocabularies/besluit/> .
31
+ @prefix ext: <http://mu.semte.ch/vocabularies/ext/> .
31
32
 
32
33
  <https://data.vlaanderen.be/shacl/besluit-publicatie#DocumentShape>
33
34
  a sh:NodeShape ;
@@ -185,7 +186,7 @@ var basicAgendaShape = `@prefix sh: <http://www.w3.org/ns/shacl#> .
185
186
  ?this a <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan> ;
186
187
  mandaat:isTijdspecialisatieVan ?bestuursorgaan .
187
188
  }
188
- """ ;
189
+ """ ] ;
189
190
  sh:property [
190
191
  sh:name "isTijdspecialisatieVan (mandaat)" ;
191
192
  sh:description "Duidt de bronentiteit aan waarvan deze entiteit een tijdsgebonden specialisatie is. De specialisatie stelt de bron voor gedurende een bepaalde periode." ;
@@ -319,6 +320,7 @@ var basicAgendaShape = `@prefix sh: <http://www.w3.org/ns/shacl#> .
319
320
  var decisionListShape = `@prefix sh: <http://www.w3.org/ns/shacl#> .
320
321
  @prefix qb: <http://purl.org/linked-data/cube#> .
321
322
  @prefix lblodBesluit: <http://lblod.data.gift/vocabularies/besluit/> .
323
+ @prefix ext: <http://mu.semte.ch/vocabularies/ext/> .
322
324
 
323
325
  <https://data.vlaanderen.be/shacl/besluit-publicatie#DocumentShape>
324
326
  a sh:NodeShape ;
@@ -701,7 +703,7 @@ var decisionListShape = `@prefix sh: <http://www.w3.org/ns/shacl#> .
701
703
  ?this a <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan> ;
702
704
  mandaat:isTijdspecialisatieVan ?bestuursorgaan .
703
705
  }
704
- """ ;
706
+ """ ] ;
705
707
  sh:property [
706
708
  sh:name "isTijdspecialisatieVan (mandaat)" ;
707
709
  sh:description "Duidt de bronentiteit aan waarvan deze entiteit een tijdsgebonden specialisatie is. De specialisatie stelt de bron voor gedurende een bepaalde periode." ;
@@ -1333,12 +1335,17 @@ var notulenShape = `@prefix sh: <http://www.w3.org/ns/shacl#> .
1333
1335
 
1334
1336
  select $this ?value
1335
1337
  where {
1336
- {
1337
- select (count(distinct ?onthouder) as ?onthouderCount) {
1338
- $this besluit:heeftOnthouder ?onthouder .
1338
+ $this besluit:aantalOnthouders ?aantalOnthouders .
1339
+ OPTIONAL {
1340
+ {
1341
+ select ?stemming (count(distinct ?onthouder) as ?onthouderTotal) {
1342
+ ?stemming besluit:heeftOnthouder ?onthouder .
1343
+ }
1344
+ group by ?stemming
1339
1345
  }
1346
+ FILTER (?stemming = $this)
1340
1347
  }
1341
- $this besluit:aantalOnthouders ?aantalOnthouders .
1348
+ BIND(COALESCE(?onthouderTotal, 0) as ?onthouderCount)
1342
1349
  FILTER (?onthouderCount != ?aantalOnthouders)
1343
1350
 
1344
1351
  BIND(concat("Aantal gevonden onthouders (", str(?onthouderCount), ") is niet gelijk aan het opgegeven aantalOnthouders (", str(?aantalOnthouders), "). ") as ?value)
@@ -1377,12 +1384,17 @@ var notulenShape = `@prefix sh: <http://www.w3.org/ns/shacl#> .
1377
1384
 
1378
1385
  select $this ?value
1379
1386
  where {
1380
- {
1381
- select (count(distinct ?tegenstander) as ?tegenstanderCount) {
1382
- $this besluit:heeftTegenstander ?tegenstander .
1387
+ $this besluit:aantalTegenstanders ?aantalTegenstanders .
1388
+ OPTIONAL {
1389
+ {
1390
+ select ?stemming (count(distinct ?tegenstander) as ?tegenstanderTotal) {
1391
+ ?stemming besluit:heeftTegenstander ?tegenstander .
1392
+ }
1393
+ group by ?stemming
1383
1394
  }
1395
+ FILTER (?stemming = $this)
1384
1396
  }
1385
- $this besluit:aantalTegenstanders ?aantalTegenstanders .
1397
+ BIND(COALESCE(?tegenstanderTotal, 0) as ?tegenstanderCount)
1386
1398
  FILTER (?tegenstanderCount != ?aantalTegenstanders)
1387
1399
 
1388
1400
  BIND(concat("Aantal gevonden tegenstanders (", str(?tegenstanderCount), ") is niet gelijk aan het opgegeven aantalTegenstanders (", str(?aantalTegenstanders), "). ") as ?value)
@@ -1405,12 +1417,17 @@ var notulenShape = `@prefix sh: <http://www.w3.org/ns/shacl#> .
1405
1417
 
1406
1418
  select $this ?value
1407
1419
  where {
1408
- {
1409
- select (count(distinct ?voorstander) as ?voorstanderCount) {
1410
- $this besluit:heeftVoorstander ?voorstander .
1420
+ $this besluit:aantalVoorstanders ?aantalVoorstanders .
1421
+ OPTIONAL {
1422
+ {
1423
+ select ?stemming (count(distinct ?voorstander) as ?voorstanderTotal) {
1424
+ ?stemming besluit:heeftVoorstander ?voorstander .
1425
+ }
1426
+ group by ?stemming
1411
1427
  }
1428
+ FILTER (?stemming = $this)
1412
1429
  }
1413
- $this besluit:aantalVoorstanders ?aantalVoorstanders .
1430
+ BIND(COALESCE(?voorstanderTotal, 0) as ?voorstanderCount)
1414
1431
  FILTER (?voorstanderCount != ?aantalVoorstanders)
1415
1432
 
1416
1433
  BIND(concat("Aantal gevonden voorstanders (", str(?voorstanderCount), ") is niet gelijk aan het opgegeven aantalVoorstanders (", str(?aantalVoorstanders), "). ") as ?value)