Repository navigation
Expand file tree
/
Copy pathshapes1.ttl
More file actions
66 lines (58 loc) · 1.78 KB
/
Copy pathshapes1.ttl
File metadata and controls
66 lines (58 loc) · 1.78 KB
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
@prefix : <http://example.com/ns#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix plm: <http://example.com/def/plm/> .
:shape1 a sh:NodeShape ;
sh:targetSubjectsOf plm:containsMaterialClass ;
sh:property [
sh:path plm:qualifiedRelation ;
sh:minCount 1 ;
sh:class plm:ContainsMaterialClassRelation
] , :typeShape , :nameShape , :containsMaterialClassShape .
:typeShape a sh:PropertyShape ;
sh:path rdf:type ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:nodeKind sh:IRI .
:nameShape a sh:PropertyShape ;
sh:path plm:name ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:datatype xsd:string ;
sh:pattern "^[0-9]{4} [0-9]{3} [0-9]{5}$" .
:containsMaterialClassShape a sh:PropertyShape ;
sh:path plm:containsMaterialClass ;
sh:minCount 1 ;
sh:class plm:MaterialClass .
:ContainsMaterialClassRelationShape a sh:NodeShape ;
sh:targetClass plm:ContainsMaterialClassRelation ;
sh:property [
sh:path plm:target ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:class plm:MaterialClass
] , [
sh:path plm:materialGroup ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:datatype xsd:string
] , [
sh:path plm:massPercentage ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:datatype xsd:decimal
] .
:MaterialClassShape a sh:NodeShape ;
sh:targetClass plm:MaterialClass ;
sh:property :typeShape , :nameShape , :descriptionShape , :casNumberShape .
:descriptionShape a sh:PropertyShape ;
sh:path plm:description ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:datatype xsd:string .
:casNumberShape a sh:PropertyShape ;
sh:path plm:casNumber ;
sh:maxCount 1 ;
sh:datatype xsd:string ;
sh:pattern "^[0-9]{2,7}-[0-9]{2}-[0-9]$" . # match pattern "nnnnnNN-NN-N"