forked from zazuko/cube-link
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbasic-cube-constraint.ttl
49 lines (45 loc) · 1.63 KB
/
basic-cube-constraint.ttl
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
@prefix : <https://cube.link/shape/basic-cube-constraint#> .
@prefix dash: <http://datashapes.org/dash#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix cube: <https://cube.link/> .
#
# This is the bare minimal SHACL shape for validating a cube.
# All cubes should pass this validation.
#
:CubeShape
a sh:NodeShape ;
sh:targetClass cube:Cube ;
sh:property [
sh:path cube:observationSet ;
sh:minCount 1 ;
sh:node :ObservationSetShape ;
sh:message "cube:Cube needs at least one cube:ObservationSet"
] ;
sh:property [
# optional, but recommended
sh:path cube:observationConstraint ;
sh:node :ObservationConstraintShape ;
sh:message "cube:Cube must point to a valid cube:Constraint"
] .
:ObservationSetShape
a sh:NodeShape ;
sh:targetClass cube:ObservationSet ;
sh:property [
sh:path cube:observation ;
sh:minCount 1 ;
sh:message "cube:ObservationSet needs at least one cube:observation"
] .
:ObservationConstraintShape
a sh:NodeShape ;
sh:targetClass cube:Constraint ;
sh:property [
# we assume at least 3 dimensions, otherwise we would have an empty list of dimensions
# one for cube:observedBy, one for rdf:type and at least one cube dimension
sh:path sh:property ;
sh:minCount 3 ;
sh:message "cube:Constraint needs at least a certain amount of sh:properties"
] .