@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.
@@ -1,6 +1,7 @@
1
1
  export const basicAgendaShape = `@prefix sh: <http://www.w3.org/ns/shacl#> .
2
2
  @prefix qb: <http://purl.org/linked-data/cube#> .
3
3
  @prefix lblodBesluit: <http://lblod.data.gift/vocabularies/besluit/> .
4
+ @prefix ext: <http://mu.semte.ch/vocabularies/ext/> .
4
5
 
5
6
  <https://data.vlaanderen.be/shacl/besluit-publicatie#DocumentShape>
6
7
  a sh:NodeShape ;
@@ -158,7 +159,7 @@ export const basicAgendaShape = `@prefix sh: <http://www.w3.org/ns/shacl#>
158
159
  ?this a <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan> ;
159
160
  mandaat:isTijdspecialisatieVan ?bestuursorgaan .
160
161
  }
161
- """ ;
162
+ """ ] ;
162
163
  sh:property [
163
164
  sh:name "isTijdspecialisatieVan (mandaat)" ;
164
165
  sh:description "Duidt de bronentiteit aan waarvan deze entiteit een tijdsgebonden specialisatie is. De specialisatie stelt de bron voor gedurende een bepaalde periode." ;
@@ -1,6 +1,7 @@
1
1
  export const decisionListShape = `@prefix sh: <http://www.w3.org/ns/shacl#> .
2
2
  @prefix qb: <http://purl.org/linked-data/cube#> .
3
3
  @prefix lblodBesluit: <http://lblod.data.gift/vocabularies/besluit/> .
4
+ @prefix ext: <http://mu.semte.ch/vocabularies/ext/> .
4
5
 
5
6
  <https://data.vlaanderen.be/shacl/besluit-publicatie#DocumentShape>
6
7
  a sh:NodeShape ;
@@ -383,7 +384,7 @@ export const decisionListShape = `@prefix sh: <http://www.w3.org/ns/shacl#>
383
384
  ?this a <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan> ;
384
385
  mandaat:isTijdspecialisatieVan ?bestuursorgaan .
385
386
  }
386
- """ ;
387
+ """ ] ;
387
388
  sh:property [
388
389
  sh:name "isTijdspecialisatieVan (mandaat)" ;
389
390
  sh:description "Duidt de bronentiteit aan waarvan deze entiteit een tijdsgebonden specialisatie is. De specialisatie stelt de bron voor gedurende een bepaalde periode." ;
@@ -499,12 +499,17 @@ export const notulenShape = `@prefix sh: <http://www.w3.org/ns/shacl#> .
499
499
 
500
500
  select $this ?value
501
501
  where {
502
- {
503
- select (count(distinct ?onthouder) as ?onthouderCount) {
504
- $this besluit:heeftOnthouder ?onthouder .
502
+ $this besluit:aantalOnthouders ?aantalOnthouders .
503
+ OPTIONAL {
504
+ {
505
+ select ?stemming (count(distinct ?onthouder) as ?onthouderTotal) {
506
+ ?stemming besluit:heeftOnthouder ?onthouder .
507
+ }
508
+ group by ?stemming
505
509
  }
510
+ FILTER (?stemming = $this)
506
511
  }
507
- $this besluit:aantalOnthouders ?aantalOnthouders .
512
+ BIND(COALESCE(?onthouderTotal, 0) as ?onthouderCount)
508
513
  FILTER (?onthouderCount != ?aantalOnthouders)
509
514
 
510
515
  BIND(concat("Aantal gevonden onthouders (", str(?onthouderCount), ") is niet gelijk aan het opgegeven aantalOnthouders (", str(?aantalOnthouders), "). ") as ?value)
@@ -543,12 +548,17 @@ export const notulenShape = `@prefix sh: <http://www.w3.org/ns/shacl#> .
543
548
 
544
549
  select $this ?value
545
550
  where {
546
- {
547
- select (count(distinct ?tegenstander) as ?tegenstanderCount) {
548
- $this besluit:heeftTegenstander ?tegenstander .
551
+ $this besluit:aantalTegenstanders ?aantalTegenstanders .
552
+ OPTIONAL {
553
+ {
554
+ select ?stemming (count(distinct ?tegenstander) as ?tegenstanderTotal) {
555
+ ?stemming besluit:heeftTegenstander ?tegenstander .
556
+ }
557
+ group by ?stemming
549
558
  }
559
+ FILTER (?stemming = $this)
550
560
  }
551
- $this besluit:aantalTegenstanders ?aantalTegenstanders .
561
+ BIND(COALESCE(?tegenstanderTotal, 0) as ?tegenstanderCount)
552
562
  FILTER (?tegenstanderCount != ?aantalTegenstanders)
553
563
 
554
564
  BIND(concat("Aantal gevonden tegenstanders (", str(?tegenstanderCount), ") is niet gelijk aan het opgegeven aantalTegenstanders (", str(?aantalTegenstanders), "). ") as ?value)
@@ -571,12 +581,17 @@ export const notulenShape = `@prefix sh: <http://www.w3.org/ns/shacl#> .
571
581
 
572
582
  select $this ?value
573
583
  where {
574
- {
575
- select (count(distinct ?voorstander) as ?voorstanderCount) {
576
- $this besluit:heeftVoorstander ?voorstander .
584
+ $this besluit:aantalVoorstanders ?aantalVoorstanders .
585
+ OPTIONAL {
586
+ {
587
+ select ?stemming (count(distinct ?voorstander) as ?voorstanderTotal) {
588
+ ?stemming besluit:heeftVoorstander ?voorstander .
589
+ }
590
+ group by ?stemming
577
591
  }
592
+ FILTER (?stemming = $this)
578
593
  }
579
- $this besluit:aantalVoorstanders ?aantalVoorstanders .
594
+ BIND(COALESCE(?voorstanderTotal, 0) as ?voorstanderCount)
580
595
  FILTER (?voorstanderCount != ?aantalVoorstanders)
581
596
 
582
597
  BIND(concat("Aantal gevonden voorstanders (", str(?voorstanderCount), ") is niet gelijk aan het opgegeven aantalVoorstanders (", str(?aantalVoorstanders), "). ") as ?value)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lblod/lib-decision-shapes",
3
- "version": "0.0.26",
3
+ "version": "0.0.27",
4
4
  "description": "NPM library to retrieve shapes of decisions and examples",
5
5
  "main": "dist/index.js",
6
6
  "browser": "dist/index-browser.js",
@@ -1,6 +1,7 @@
1
1
  export const basicAgendaShape = `@prefix sh: <http://www.w3.org/ns/shacl#> .
2
2
  @prefix qb: <http://purl.org/linked-data/cube#> .
3
3
  @prefix lblodBesluit: <http://lblod.data.gift/vocabularies/besluit/> .
4
+ @prefix ext: <http://mu.semte.ch/vocabularies/ext/> .
4
5
 
5
6
  <https://data.vlaanderen.be/shacl/besluit-publicatie#DocumentShape>
6
7
  a sh:NodeShape ;
@@ -158,7 +159,7 @@ export const basicAgendaShape = `@prefix sh: <http://www.w3.org/ns/shacl#>
158
159
  ?this a <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan> ;
159
160
  mandaat:isTijdspecialisatieVan ?bestuursorgaan .
160
161
  }
161
- """ ;
162
+ """ ] ;
162
163
  sh:property [
163
164
  sh:name "isTijdspecialisatieVan (mandaat)" ;
164
165
  sh:description "Duidt de bronentiteit aan waarvan deze entiteit een tijdsgebonden specialisatie is. De specialisatie stelt de bron voor gedurende een bepaalde periode." ;
@@ -1,6 +1,7 @@
1
1
  export const decisionListShape = `@prefix sh: <http://www.w3.org/ns/shacl#> .
2
2
  @prefix qb: <http://purl.org/linked-data/cube#> .
3
3
  @prefix lblodBesluit: <http://lblod.data.gift/vocabularies/besluit/> .
4
+ @prefix ext: <http://mu.semte.ch/vocabularies/ext/> .
4
5
 
5
6
  <https://data.vlaanderen.be/shacl/besluit-publicatie#DocumentShape>
6
7
  a sh:NodeShape ;
@@ -383,7 +384,7 @@ export const decisionListShape = `@prefix sh: <http://www.w3.org/ns/shacl#>
383
384
  ?this a <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan> ;
384
385
  mandaat:isTijdspecialisatieVan ?bestuursorgaan .
385
386
  }
386
- """ ;
387
+ """ ] ;
387
388
  sh:property [
388
389
  sh:name "isTijdspecialisatieVan (mandaat)" ;
389
390
  sh:description "Duidt de bronentiteit aan waarvan deze entiteit een tijdsgebonden specialisatie is. De specialisatie stelt de bron voor gedurende een bepaalde periode." ;
@@ -499,12 +499,17 @@ export const notulenShape = `@prefix sh: <http://www.w3.org/ns/shacl#> .
499
499
 
500
500
  select $this ?value
501
501
  where {
502
- {
503
- select (count(distinct ?onthouder) as ?onthouderCount) {
504
- $this besluit:heeftOnthouder ?onthouder .
502
+ $this besluit:aantalOnthouders ?aantalOnthouders .
503
+ OPTIONAL {
504
+ {
505
+ select ?stemming (count(distinct ?onthouder) as ?onthouderTotal) {
506
+ ?stemming besluit:heeftOnthouder ?onthouder .
507
+ }
508
+ group by ?stemming
505
509
  }
510
+ FILTER (?stemming = $this)
506
511
  }
507
- $this besluit:aantalOnthouders ?aantalOnthouders .
512
+ BIND(COALESCE(?onthouderTotal, 0) as ?onthouderCount)
508
513
  FILTER (?onthouderCount != ?aantalOnthouders)
509
514
 
510
515
  BIND(concat("Aantal gevonden onthouders (", str(?onthouderCount), ") is niet gelijk aan het opgegeven aantalOnthouders (", str(?aantalOnthouders), "). ") as ?value)
@@ -543,12 +548,17 @@ export const notulenShape = `@prefix sh: <http://www.w3.org/ns/shacl#> .
543
548
 
544
549
  select $this ?value
545
550
  where {
546
- {
547
- select (count(distinct ?tegenstander) as ?tegenstanderCount) {
548
- $this besluit:heeftTegenstander ?tegenstander .
551
+ $this besluit:aantalTegenstanders ?aantalTegenstanders .
552
+ OPTIONAL {
553
+ {
554
+ select ?stemming (count(distinct ?tegenstander) as ?tegenstanderTotal) {
555
+ ?stemming besluit:heeftTegenstander ?tegenstander .
556
+ }
557
+ group by ?stemming
549
558
  }
559
+ FILTER (?stemming = $this)
550
560
  }
551
- $this besluit:aantalTegenstanders ?aantalTegenstanders .
561
+ BIND(COALESCE(?tegenstanderTotal, 0) as ?tegenstanderCount)
552
562
  FILTER (?tegenstanderCount != ?aantalTegenstanders)
553
563
 
554
564
  BIND(concat("Aantal gevonden tegenstanders (", str(?tegenstanderCount), ") is niet gelijk aan het opgegeven aantalTegenstanders (", str(?aantalTegenstanders), "). ") as ?value)
@@ -571,12 +581,17 @@ export const notulenShape = `@prefix sh: <http://www.w3.org/ns/shacl#> .
571
581
 
572
582
  select $this ?value
573
583
  where {
574
- {
575
- select (count(distinct ?voorstander) as ?voorstanderCount) {
576
- $this besluit:heeftVoorstander ?voorstander .
584
+ $this besluit:aantalVoorstanders ?aantalVoorstanders .
585
+ OPTIONAL {
586
+ {
587
+ select ?stemming (count(distinct ?voorstander) as ?voorstanderTotal) {
588
+ ?stemming besluit:heeftVoorstander ?voorstander .
589
+ }
590
+ group by ?stemming
577
591
  }
592
+ FILTER (?stemming = $this)
578
593
  }
579
- $this besluit:aantalVoorstanders ?aantalVoorstanders .
594
+ BIND(COALESCE(?voorstanderTotal, 0) as ?voorstanderCount)
580
595
  FILTER (?voorstanderCount != ?aantalVoorstanders)
581
596
 
582
597
  BIND(concat("Aantal gevonden voorstanders (", str(?voorstanderCount), ") is niet gelijk aan het opgegeven aantalVoorstanders (", str(?aantalVoorstanders), "). ") as ?value)