-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathch-paf-link.shacl
52 lines (47 loc) · 2.33 KB
/
ch-paf-link.shacl
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
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix paf: <https://paf.link/> .
@prefix chpaf: <https://ch.paf.link/> . # Swiss specific extension
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix schema: <http://schema.org/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix dcterm: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
chpaf:ParliamentaryAffairIdentifierEntityShape
a sh:NodeShape ;
sh:targetClass chpaf:ParliamentaryAffairIdentifierEntity ;
sh:closed true ;
sh:property [
sh:path chpaf:parliamentaryAffairIdentifier ;
sh:datatype xsd:string ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:message "An instance of chpaf:ParliamentaryAffairIdentifierEntity should only have one chpaf:parliamentaryAffairIdentifier and nothing else inside."@en ;
] ;
sh:property [
sh:path sh:self ;
sh:pattern "^https://politics\\.ld\\.admin\\.ch/parliamentary-affair/[0-9]{2}\\.[0-9]{4}$" ;
sh:message "The URI of a chpaf:ParliamentaryAffairIdentifierEntity should be of the form https://politics.ld.admin.ch/parliamentary-affair/YY.MMYY where YY is the legislature number and MMYY is the month and year of the parliamentary affair."@en ;
] .
chpaf:ProceduralRequestReportActivityShape
a sh:NodeShape ;
sh:targetClass chpaf:ProceduralRequestReportActivity ;
# Ensure that at least one prov:used points to a chpaf:ProceduralRequestReportEntity
sh:property [
sh:path prov:used ;
sh:node [
a sh:NodeShape ;
sh:class chpaf:ProceduralRequestReportEntity ; # Must be of this specific class
] ;
sh:minCount 1 ; # At least one such property must exist
sh:message "At least one prov:used property must point to an entity of type chpaf:ProceduralRequestReportEntity." ;
] ;
# Ensure that all prov:used properties point to prov:Entity or its subclasses
sh:property [
sh:path prov:used ;
sh:node [
a sh:NodeShape ;
sh:class prov:Entity ; # Must be of class or subclass of prov:Entity
] ;
sh:message "All prov:used properties must point to entities of type prov:Entity or its subclasses." ;
] .