-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrades-shapes.ttl
More file actions
50 lines (48 loc) · 1.76 KB
/
Copy pathtrades-shapes.ttl
File metadata and controls
50 lines (48 loc) · 1.76 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
@base <https://mybank.com/> .
@prefix cdm: <https://www.finos.org/common-domain-model#> .
@prefix fibo-fnd-agr-ctr: <https://spec.edmcouncil.org/fibo/ontology/FND/Agreements/Contracts/> .
@prefix fibo-fnd-dt-fd: <https://spec.edmcouncil.org/fibo/ontology/FND/DatesAndTimes/FinancialDates/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
# Shape for Trade
<trade-shape> a sh:NodeShape ;
sh:targetClass fibo-fnd-agr-ctr:Contract, cdm:Trade ;
sh:property [
sh:path cdm:globalKey ;
sh:datatype xsd:string ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:severity sh:Violation ;
sh:message "Trade must have exactly one cdm:globalKey of type xsd:string."
] ;
sh:property [
sh:path fibo-fnd-dt-fd:hasDate ;
sh:datatype xsd:date ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:severity sh:Violation ;
sh:message "Trade must have exactly one fibo-fnd-dt-fd:hasDate of type xsd:date."
] ;
sh:property [
sh:path fibo-fnd-agr-ctr:hasContractParty ;
sh:minCount 1 ;
sh:severity sh:Violation ;
sh:message "Trade must have at least one fibo-fnd-agr-ctr:hasContractParty."
] ;
sh:property [
sh:path cdm:product ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:node <product-shape> ;
sh:severity sh:Violation ;
sh:message "Trade must have exactly one cdm:product with economic terms."
] .
# Shape for Product
<product-shape> a sh:NodeShape ;
sh:property [
sh:path cdm:economicTerms ;
sh:minCount 1 ;
sh:severity sh:Violation ;
sh:message "Product must have at least one cdm:economicTerms."
] .