odrl-ruby 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -2
- data/Gemfile +1 -2
- data/Gemfile.lock +98 -84
- data/README.md +1 -3
- data/examples/build_profile.rb +47 -0
- data/examples/create-nagoya-es-offer.rb +54 -0
- data/examples/nagoya-output.ttl +66 -0
- data/lib/odrl/action.rb +91 -99
- data/lib/odrl/asset.rb +63 -76
- data/lib/odrl/base.rb +192 -178
- data/lib/odrl/constraint.rb +95 -89
- data/lib/odrl/odrl/version.rb +1 -1
- data/lib/odrl/party.rb +75 -84
- data/lib/odrl/policy.rb +80 -68
- data/lib/odrl/profile/builder.rb +185 -0
- data/lib/odrl/ruby.rb +12 -13
- data/lib/odrl/rule.rb +89 -101
- metadata +11 -5
- data/examples/builder-translator-output.ttl +0 -0
- /data/examples/{output.ttl → biohackathon-output.ttl} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe2979f7b53376990eda47051aa5eff33f6d67952742b35abb9e650ce5434a09
|
4
|
+
data.tar.gz: 0e9f46bd539435cfe5d601b0d16648850811139fa967f0b948f1984117e6fb6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d209dd7d1ae1e37aa3a655fd9a76c2be59e8dea5439b05ff0f12fe9ded99aabace239b64e56795a619294b531edfc21191531a514892322699e2b607380f2c6
|
7
|
+
data.tar.gz: 8ebd782fb9662a236befa968a2fccd8e8b36dcf789092d1f22398cac2bda6aafc0b375bc0bc9314ecd0826ce6882e26af92527900f7777be026425aac31c5600
|
data/.rubocop.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
AllCops:
|
2
|
-
TargetRubyVersion: 3
|
3
|
-
|
2
|
+
TargetRubyVersion: "3.0.0"
|
3
|
+
NewCops: enable
|
4
4
|
Style/StringLiterals:
|
5
5
|
Enabled: true
|
6
6
|
EnforcedStyle: double_quotes
|
@@ -11,3 +11,6 @@ Style/StringLiteralsInInterpolation:
|
|
11
11
|
|
12
12
|
Layout/LineLength:
|
13
13
|
Max: 120
|
14
|
+
|
15
|
+
Metrics/MethodLength:
|
16
|
+
Max: 40
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,48 +1,49 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
odrl-ruby (0.
|
4
|
+
odrl-ruby (0.2.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
addressable (2.8.
|
10
|
-
public_suffix (>= 2.0.2, <
|
11
|
-
amazing_print (1.4.0)
|
9
|
+
addressable (2.8.4)
|
10
|
+
public_suffix (>= 2.0.2, < 6.0)
|
12
11
|
ast (2.4.2)
|
13
12
|
bcp47 (0.3.3)
|
14
13
|
i18n
|
15
14
|
builder (3.2.4)
|
16
|
-
concurrent-ruby (1.
|
17
|
-
connection_pool (2.
|
15
|
+
concurrent-ruby (1.2.2)
|
16
|
+
connection_pool (2.4.1)
|
18
17
|
diff-lcs (1.5.0)
|
19
|
-
ebnf (2.3.
|
20
|
-
amazing_print (~> 1.4)
|
18
|
+
ebnf (2.3.4)
|
21
19
|
htmlentities (~> 4.3)
|
22
20
|
rdf (~> 3.2)
|
23
21
|
scanf (~> 1.0)
|
24
22
|
sxp (~> 1.2)
|
25
|
-
unicode-types (~> 1.
|
23
|
+
unicode-types (~> 1.8)
|
26
24
|
ffi (1.15.5)
|
27
|
-
haml (
|
28
|
-
temple (>= 0.8.
|
25
|
+
haml (6.1.1)
|
26
|
+
temple (>= 0.8.2)
|
27
|
+
thor
|
29
28
|
tilt
|
30
29
|
hamster (3.0.0)
|
31
30
|
concurrent-ruby (~> 1.0)
|
32
31
|
htmlentities (4.3.4)
|
33
|
-
i18n (1.
|
32
|
+
i18n (1.14.1)
|
34
33
|
concurrent-ruby (~> 1.0)
|
35
|
-
json
|
36
|
-
json-
|
34
|
+
json (2.6.3)
|
35
|
+
json-canonicalization (0.3.2)
|
36
|
+
json-ld (3.2.5)
|
37
37
|
htmlentities (~> 4.3)
|
38
|
-
json-canonicalization (~> 0.3)
|
38
|
+
json-canonicalization (~> 0.3, >= 0.3.2)
|
39
39
|
link_header (~> 0.0, >= 0.0.8)
|
40
40
|
multi_json (~> 1.15)
|
41
|
-
rack (
|
42
|
-
rdf (~> 3.2)
|
43
|
-
json-ld-preloaded (3.2.
|
41
|
+
rack (>= 2.2, < 4)
|
42
|
+
rdf (~> 3.2, >= 3.2.10)
|
43
|
+
json-ld-preloaded (3.2.2)
|
44
44
|
json-ld (~> 3.2)
|
45
45
|
rdf (~> 3.2)
|
46
|
+
language_server-protocol (3.17.0.3)
|
46
47
|
ld-patch (3.2.0)
|
47
48
|
ebnf (~> 2.2)
|
48
49
|
rdf (~> 3.2)
|
@@ -50,51 +51,55 @@ GEM
|
|
50
51
|
sparql (~> 3.2)
|
51
52
|
sxp (~> 1.2)
|
52
53
|
link_header (0.0.8)
|
53
|
-
linkeddata (3.2.
|
54
|
-
json-ld (~> 3.2)
|
54
|
+
linkeddata (3.2.1)
|
55
|
+
json-ld (~> 3.2, >= 3.2.3)
|
55
56
|
json-ld-preloaded (~> 3.2)
|
56
57
|
ld-patch (~> 3.2)
|
57
|
-
nokogiri (~> 1.
|
58
|
-
rdf (~> 3.2)
|
59
|
-
rdf-aggregate-repo (~> 3.2)
|
58
|
+
nokogiri (~> 1.13, >= 1.13.8)
|
59
|
+
rdf (~> 3.2, >= 3.2.9)
|
60
|
+
rdf-aggregate-repo (~> 3.2, >= 3.2.1)
|
60
61
|
rdf-hamster-repo (~> 3.2)
|
61
|
-
rdf-isomorphic (~> 3.2)
|
62
|
+
rdf-isomorphic (~> 3.2, >= 3.2.1)
|
62
63
|
rdf-json (~> 3.2)
|
63
|
-
rdf-microdata (~> 3.2)
|
64
|
-
rdf-n3 (~> 3.2)
|
64
|
+
rdf-microdata (~> 3.2, >= 3.2.1)
|
65
|
+
rdf-n3 (~> 3.2, >= 3.2.1)
|
65
66
|
rdf-normalize (~> 0.5)
|
66
|
-
rdf-ordered-repo (~> 3.2)
|
67
|
+
rdf-ordered-repo (~> 3.2, >= 3.2.1)
|
67
68
|
rdf-rdfa (~> 3.2)
|
68
69
|
rdf-rdfxml (~> 3.2)
|
69
70
|
rdf-reasoner (~> 0.8)
|
70
|
-
rdf-tabular (~> 3.2)
|
71
|
+
rdf-tabular (~> 3.2, >= 3.2.1)
|
71
72
|
rdf-trig (~> 3.2)
|
72
73
|
rdf-trix (~> 3.2)
|
73
|
-
rdf-turtle (~> 3.2)
|
74
|
-
rdf-vocab (~> 3.2)
|
75
|
-
rdf-xsd (~> 3.2)
|
76
|
-
shacl (~> 0.2)
|
77
|
-
shex (~> 0.7)
|
78
|
-
sparql (~> 3.2)
|
79
|
-
sparql-client (~> 3.2)
|
80
|
-
|
74
|
+
rdf-turtle (~> 3.2, >= 3.2.1)
|
75
|
+
rdf-vocab (~> 3.2, >= 3.2.1)
|
76
|
+
rdf-xsd (~> 3.2, >= 3.2.1)
|
77
|
+
shacl (~> 0.2, >= 0.2.1)
|
78
|
+
shex (~> 0.7, >= 0.7.1)
|
79
|
+
sparql (~> 3.2, >= 3.2.4)
|
80
|
+
sparql-client (~> 3.2, >= 3.2.1)
|
81
|
+
yaml-ld (~> 0.0)
|
82
|
+
logger (1.5.3)
|
81
83
|
matrix (0.4.2)
|
82
84
|
multi_json (1.15.0)
|
83
|
-
net-http-persistent (4.0.
|
85
|
+
net-http-persistent (4.0.2)
|
84
86
|
connection_pool (~> 2.2)
|
85
|
-
nokogiri (1.
|
87
|
+
nokogiri (1.15.2-x86_64-linux)
|
86
88
|
racc (~> 1.4)
|
87
|
-
parallel (1.
|
88
|
-
parser (3.
|
89
|
+
parallel (1.23.0)
|
90
|
+
parser (3.2.2.3)
|
89
91
|
ast (~> 2.4.1)
|
90
|
-
|
91
|
-
|
92
|
-
|
92
|
+
racc
|
93
|
+
psych (5.1.0)
|
94
|
+
stringio
|
95
|
+
public_suffix (5.0.1)
|
96
|
+
racc (1.7.1)
|
97
|
+
rack (3.0.8)
|
93
98
|
rainbow (3.1.1)
|
94
99
|
rake (13.0.6)
|
95
|
-
rdf (3.2.
|
100
|
+
rdf (3.2.11)
|
96
101
|
link_header (~> 0.0, >= 0.0.8)
|
97
|
-
rdf-aggregate-repo (3.2.
|
102
|
+
rdf-aggregate-repo (3.2.1)
|
98
103
|
rdf (~> 3.2)
|
99
104
|
rdf-hamster-repo (3.2.1)
|
100
105
|
hamster (~> 3.0)
|
@@ -114,15 +119,15 @@ GEM
|
|
114
119
|
rdf (~> 3.2)
|
115
120
|
sparql (~> 3.2)
|
116
121
|
sxp (~> 1.2)
|
117
|
-
rdf-normalize (0.
|
122
|
+
rdf-normalize (0.6.0)
|
118
123
|
rdf (~> 3.2)
|
119
124
|
rdf-ordered-repo (3.2.1)
|
120
125
|
rdf (~> 3.2, >= 3.2.1)
|
121
126
|
rdf-raptor (3.2.0)
|
122
127
|
ffi (~> 1.15)
|
123
128
|
rdf (~> 3.2)
|
124
|
-
rdf-rdfa (3.2.
|
125
|
-
haml (
|
129
|
+
rdf-rdfa (3.2.2)
|
130
|
+
haml (>= 5.2, < 7)
|
126
131
|
htmlentities (~> 4.3)
|
127
132
|
rdf (~> 3.2)
|
128
133
|
rdf-aggregate-repo (~> 3.2)
|
@@ -136,11 +141,11 @@ GEM
|
|
136
141
|
rdf-reasoner (0.8.0)
|
137
142
|
rdf (~> 3.2)
|
138
143
|
rdf-xsd (~> 3.2)
|
139
|
-
rdf-tabular (3.2.
|
144
|
+
rdf-tabular (3.2.1)
|
140
145
|
addressable (~> 2.8)
|
141
146
|
bcp47 (~> 0.3, >= 0.3.3)
|
142
147
|
json-ld (~> 3.2)
|
143
|
-
rdf (~> 3.2)
|
148
|
+
rdf (~> 3.2, >= 3.2.7)
|
144
149
|
rdf-vocab (~> 3.2)
|
145
150
|
rdf-xsd (~> 3.2)
|
146
151
|
rdf-trig (3.2.0)
|
@@ -150,15 +155,15 @@ GEM
|
|
150
155
|
rdf-trix (3.2.0)
|
151
156
|
rdf (~> 3.2)
|
152
157
|
rdf-xsd (~> 3.2)
|
153
|
-
rdf-turtle (3.2.
|
158
|
+
rdf-turtle (3.2.1)
|
154
159
|
ebnf (~> 2.3)
|
155
160
|
rdf (~> 3.2)
|
156
|
-
rdf-vocab (3.2.
|
161
|
+
rdf-vocab (3.2.6)
|
157
162
|
rdf (~> 3.2, >= 3.2.4)
|
158
163
|
rdf-xsd (3.2.1)
|
159
164
|
rdf (~> 3.2)
|
160
165
|
rexml (~> 3.2)
|
161
|
-
regexp_parser (2.
|
166
|
+
regexp_parser (2.8.1)
|
162
167
|
rexml (3.2.5)
|
163
168
|
rspec (3.11.0)
|
164
169
|
rspec-core (~> 3.11.0)
|
@@ -166,30 +171,32 @@ GEM
|
|
166
171
|
rspec-mocks (~> 3.11.0)
|
167
172
|
rspec-core (3.11.0)
|
168
173
|
rspec-support (~> 3.11.0)
|
169
|
-
rspec-expectations (3.11.
|
174
|
+
rspec-expectations (3.11.1)
|
170
175
|
diff-lcs (>= 1.2.0, < 2.0)
|
171
176
|
rspec-support (~> 3.11.0)
|
172
|
-
rspec-mocks (3.11.
|
177
|
+
rspec-mocks (3.11.2)
|
173
178
|
diff-lcs (>= 1.2.0, < 2.0)
|
174
179
|
rspec-support (~> 3.11.0)
|
175
|
-
rspec-support (3.11.
|
176
|
-
rubocop (1.
|
180
|
+
rspec-support (3.11.1)
|
181
|
+
rubocop (1.53.1)
|
182
|
+
json (~> 2.3)
|
183
|
+
language_server-protocol (>= 3.17.0)
|
177
184
|
parallel (~> 1.10)
|
178
|
-
parser (>= 3.
|
185
|
+
parser (>= 3.2.2.3)
|
179
186
|
rainbow (>= 2.2.2, < 4.0)
|
180
187
|
regexp_parser (>= 1.8, < 3.0)
|
181
|
-
rexml
|
182
|
-
rubocop-ast (>= 1.
|
188
|
+
rexml (>= 3.2.5, < 4.0)
|
189
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
183
190
|
ruby-progressbar (~> 1.7)
|
184
|
-
unicode-display_width (>=
|
185
|
-
rubocop-ast (1.
|
186
|
-
parser (>= 3.
|
187
|
-
ruby-progressbar (1.
|
191
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
192
|
+
rubocop-ast (1.29.0)
|
193
|
+
parser (>= 3.2.1.0)
|
194
|
+
ruby-progressbar (1.13.0)
|
188
195
|
scanf (1.0.0)
|
189
|
-
shacl (0.
|
196
|
+
shacl (0.3.0)
|
190
197
|
json-ld (~> 3.2)
|
191
|
-
rdf (~> 3.2)
|
192
|
-
sparql (~> 3.2)
|
198
|
+
rdf (~> 3.2, >= 3.2.8)
|
199
|
+
sparql (~> 3.2, >= 3.2.4)
|
193
200
|
sxp (~> 1.2)
|
194
201
|
shex (0.7.1)
|
195
202
|
ebnf (~> 2.2)
|
@@ -200,25 +207,32 @@ GEM
|
|
200
207
|
rdf-xsd (~> 3.2)
|
201
208
|
sparql (~> 3.2)
|
202
209
|
sxp (~> 1.2)
|
203
|
-
sparql (3.2.
|
210
|
+
sparql (3.2.5)
|
204
211
|
builder (~> 3.2)
|
205
|
-
ebnf (~> 2.2)
|
206
|
-
logger (~> 1.
|
207
|
-
rdf (~> 3.2, >= 3.2.
|
212
|
+
ebnf (~> 2.2, >= 2.3.1)
|
213
|
+
logger (~> 1.5)
|
214
|
+
rdf (~> 3.2, >= 3.2.8)
|
208
215
|
rdf-aggregate-repo (~> 3.2)
|
209
216
|
rdf-xsd (~> 3.2)
|
210
|
-
sparql-client (~> 3.2)
|
211
|
-
sxp (~> 1.2, >= 1.2.
|
212
|
-
sparql-client (3.2.
|
217
|
+
sparql-client (~> 3.2, >= 3.2.1)
|
218
|
+
sxp (~> 1.2, >= 1.2.2)
|
219
|
+
sparql-client (3.2.1)
|
213
220
|
net-http-persistent (~> 4.0, >= 4.0.1)
|
214
|
-
rdf (~> 3.2)
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
221
|
+
rdf (~> 3.2, >= 3.2.6)
|
222
|
+
stringio (3.0.7)
|
223
|
+
sxp (1.2.4)
|
224
|
+
matrix (~> 0.4)
|
225
|
+
rdf (~> 3.2)
|
226
|
+
temple (0.10.2)
|
227
|
+
thor (1.2.2)
|
228
|
+
tilt (2.2.0)
|
229
|
+
unicode-display_width (2.4.2)
|
230
|
+
unicode-types (1.8.0)
|
231
|
+
yaml-ld (0.0.2)
|
232
|
+
json-ld (~> 3.2, >= 3.2.3)
|
233
|
+
psych (>= 3.3)
|
234
|
+
rdf (~> 3.2, >= 3.2.9)
|
235
|
+
rdf-xsd (~> 3.2)
|
222
236
|
|
223
237
|
PLATFORMS
|
224
238
|
x86_64-linux
|
@@ -229,7 +243,7 @@ DEPENDENCIES
|
|
229
243
|
rake (~> 13.0)
|
230
244
|
rdf-raptor (~> 3.2.0)
|
231
245
|
rspec (~> 3.11.0)
|
232
|
-
rubocop
|
246
|
+
rubocop
|
233
247
|
|
234
248
|
BUNDLED WITH
|
235
|
-
2.
|
249
|
+
2.3.23
|
data/README.md
CHANGED
@@ -0,0 +1,47 @@
|
|
1
|
+
require '../lib/odrl/profile/builder.rb'
|
2
|
+
|
3
|
+
p = ODRL::Profile::Builder.new(
|
4
|
+
uri: 'https://example.org/myprofiles/germplasm_odrl_profile.ttl',
|
5
|
+
title: "ODRL Profile for Germplasm resources",
|
6
|
+
description: "There are some properties and comparisons that only make sense in the Germplasm expert domain",
|
7
|
+
author: "Mark D Wilkinson",
|
8
|
+
profile_class: "https://example.org/myprofiles/ontology#SeedOffer"
|
9
|
+
)
|
10
|
+
|
11
|
+
p.asset_relations << ODRL::Profile::AssetRelation.new(
|
12
|
+
uri: "https://example.org/myprofiles/ontology#nagoya_permission",
|
13
|
+
label: "Permission under Nagoya protocol",
|
14
|
+
definition: "Permission is a special thing in the Nagoya protocol")
|
15
|
+
|
16
|
+
|
17
|
+
p.party_functional_roles << ODRL::Profile::AssetRelation.new(
|
18
|
+
uri: "https://example.org/myprofiles/ontology#nagoya_assigner",
|
19
|
+
label: "Assigner with Nagoya authority to assign",
|
20
|
+
definition: "Assigners have special responsibilities in the Nagoya protocol")
|
21
|
+
|
22
|
+
p.actions << ODRL::Profile::Rule.new(
|
23
|
+
uri: "https://example.org/myprofiles/ontology#nagoya_propogate",
|
24
|
+
label: "Plant and Harvest",
|
25
|
+
definition: "the action of planting and harvesting the seed",
|
26
|
+
included_in: ODRLV.use,
|
27
|
+
implies: ODRLV.distribute)
|
28
|
+
|
29
|
+
|
30
|
+
p.leftOperands << ODRL::Profile::LeftOperand.new(
|
31
|
+
uri: "https://example.org/myprofiles/ontology#at_risk_species",
|
32
|
+
label: "At Risk Species",
|
33
|
+
definition: "A species that has been flagged as at-risk of extinction")
|
34
|
+
|
35
|
+
p.rightOperands << ODRL::Profile::RightOperand.new(
|
36
|
+
uri: "https://example.org/myprofiles/ontology#on_watchlist",
|
37
|
+
label: "On Watchlist",
|
38
|
+
definition: "A species whose risk of extinction is on a watchlist")
|
39
|
+
|
40
|
+
p.rightOperands << ODRL::Profile::Relation.new(
|
41
|
+
uri: "https://example.org/myprofiles/ontology#within_risk_boundary",
|
42
|
+
label: "Within Bounds",
|
43
|
+
definition: "comparison of risk boundaries")
|
44
|
+
|
45
|
+
|
46
|
+
p.build()
|
47
|
+
puts p.serialize
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require "odrl/ruby"
|
2
|
+
|
3
|
+
# an offer to toshiaki from mark to use the polyA resource during the biohackathon
|
4
|
+
|
5
|
+
# core annotatons are: :title, :creator, :description, :subject :baseURI, :uid, :type
|
6
|
+
policy = ODRL::Offer.new(
|
7
|
+
title: "Offer for the use of BGV Germplasm",
|
8
|
+
creator: "https://orcid.org/0000-0001-6960-357X",
|
9
|
+
description: "An offer any non-Commercial entity to use Germplasm from the BGV - UPM",
|
10
|
+
subject: "nagoya-constraint", # this is a tag
|
11
|
+
issued: "2022-06-29"
|
12
|
+
)
|
13
|
+
|
14
|
+
asset = ODRL::Asset.new(uid: "https://fdp.bgv.cbgp.upm.es/dataset/65ffbf3d-bed1-4a9a-abf9-0116cc35b40a",
|
15
|
+
title: "César Gómez Campo Banco de Germoplasma Vegetal de la UPM")
|
16
|
+
|
17
|
+
# you indicate the type of party by assigning the predicate (either assigner or assignee)
|
18
|
+
# ODRLV is the RDF::Vocabulary for ODRL, exported to this namespace
|
19
|
+
ministerio = ODRL::Party.new(
|
20
|
+
uid: "https://absch.cbd.int/en/database/CON/ABSCH-CON-ES-241810/2",
|
21
|
+
predicate: ODRLV.assigner,
|
22
|
+
title: " Ministerio para la Transición Ecológica y el Reto Demográfico",
|
23
|
+
label: " Ministerio para la Transición Ecológica y el Reto Demográfico"
|
24
|
+
)
|
25
|
+
|
26
|
+
# Rules
|
27
|
+
permission = ODRL::Permission.new(title: "Permission to use")
|
28
|
+
|
29
|
+
use = ODRL::Use.new(value: "use") # subclass of action
|
30
|
+
|
31
|
+
# Constraints: :uid, :rightOperand, :leftOperand, :operator, :rightOperandReference, :dataType, :unit, :status
|
32
|
+
constraint_nonprofit = ODRL::Constraint.new(
|
33
|
+
title: "Use by non-profit organization",
|
34
|
+
leftOperand: "industry",
|
35
|
+
operator: "neq",
|
36
|
+
rightOperand: "https://w3id.org/dingo#ForProfitOrganisation"
|
37
|
+
)
|
38
|
+
constraint_noncommercial = ODRL::Constraint.new(
|
39
|
+
title: "Use for non-commercial purposes",
|
40
|
+
leftOperand: "purpose",
|
41
|
+
operator: "neq",
|
42
|
+
rightOperand: "http://purl.obolibrary.org/obo/ExO_0000085"
|
43
|
+
)
|
44
|
+
permission.addConstraint(constraint: constraint_nonprofit)
|
45
|
+
permission.addConstraint(constraint: constraint_noncommercial)
|
46
|
+
permission.addAsset(asset: asset)
|
47
|
+
permission.addAssigner(party: ministerio)
|
48
|
+
permission.addAction(action: use)
|
49
|
+
|
50
|
+
policy.addPermission(rule: permission)
|
51
|
+
|
52
|
+
policy.load_graph
|
53
|
+
result = policy.serialize(format: "turtle")
|
54
|
+
puts result
|
@@ -0,0 +1,66 @@
|
|
1
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
2
|
+
|
3
|
+
<http://example.org#constraint_68801650224698>
|
4
|
+
<http://purl.org/dc/terms/identifier> <http://example.org#constraint_68801650224698> ;
|
5
|
+
<http://purl.org/dc/terms/title> "Use by non-profit organization"@en ;
|
6
|
+
a <http://www.w3.org/ns/odrl/2/Constraint> ;
|
7
|
+
<http://www.w3.org/2000/01/rdf-schema#label> "Use by non-profit organization"@en ;
|
8
|
+
<http://www.w3.org/ns/odrl/2/leftOperand> <http://www.w3.org/ns/odrl/2/industry> ;
|
9
|
+
<http://www.w3.org/ns/odrl/2/operator> <http://www.w3.org/ns/odrl/2/neq> ;
|
10
|
+
<http://www.w3.org/ns/odrl/2/rightOperand> <https://w3id.org/dingo#ForProfitOrganisation> ;
|
11
|
+
<http://www.w3.org/ns/odrl/2/uid> <http://example.org#constraint_68801650224698> .
|
12
|
+
|
13
|
+
<http://example.org#constraint_68801650224712>
|
14
|
+
<http://purl.org/dc/terms/identifier> <http://example.org#constraint_68801650224712> ;
|
15
|
+
<http://purl.org/dc/terms/title> "Use for non-commercial purposes"@en ;
|
16
|
+
a <http://www.w3.org/ns/odrl/2/Constraint> ;
|
17
|
+
<http://www.w3.org/2000/01/rdf-schema#label> "Use for non-commercial purposes"@en ;
|
18
|
+
<http://www.w3.org/ns/odrl/2/leftOperand> <http://www.w3.org/ns/odrl/2/purpose> ;
|
19
|
+
<http://www.w3.org/ns/odrl/2/operator> <http://www.w3.org/ns/odrl/2/neq> ;
|
20
|
+
<http://www.w3.org/ns/odrl/2/rightOperand> <http://purl.obolibrary.org/obo/ExO_0000085> ;
|
21
|
+
<http://www.w3.org/ns/odrl/2/uid> <http://example.org#constraint_68801650224712> .
|
22
|
+
|
23
|
+
<http://example.org#policy_68801650224632>
|
24
|
+
<http://purl.org/dc/terms/creator> <https://orcid.org/0000-0001-6960-357X> ;
|
25
|
+
<http://purl.org/dc/terms/description> "An offer any non-Commercial entity to use Germplasm from the BGV - UPM"@en ;
|
26
|
+
<http://purl.org/dc/terms/identifier> <http://example.org#policy_68801650224632> ;
|
27
|
+
<http://purl.org/dc/terms/issued> "2022-06-29"@en ;
|
28
|
+
<http://purl.org/dc/terms/subject> "nagoya-constraint"@en ;
|
29
|
+
<http://purl.org/dc/terms/title> "Offer for the use of BGV Germplasm"@en ;
|
30
|
+
a <http://www.w3.org/ns/odrl/2/Offer> ;
|
31
|
+
<http://www.w3.org/2000/01/rdf-schema#label> "Offer for the use of BGV Germplasm"@en ;
|
32
|
+
<http://www.w3.org/ns/odrl/2/permission> <http://example.org#rule_68801650224680> ;
|
33
|
+
<http://www.w3.org/ns/odrl/2/uid> <http://example.org#policy_68801650224632> .
|
34
|
+
|
35
|
+
<http://example.org#rule_68801650224680>
|
36
|
+
<http://purl.org/dc/terms/identifier> <http://example.org#rule_68801650224680> ;
|
37
|
+
<http://purl.org/dc/terms/title> "Permission to use"@en ;
|
38
|
+
a <http://www.w3.org/ns/odrl/2/Permission> ;
|
39
|
+
<http://www.w3.org/2000/01/rdf-schema#label> "Permission to use"@en ;
|
40
|
+
<http://www.w3.org/ns/odrl/2/action> <http://www.w3.org/ns/odrl/2/use> ;
|
41
|
+
<http://www.w3.org/ns/odrl/2/assigner> <https://absch.cbd.int/en/database/CON/ABSCH-CON-ES-241810/2> ;
|
42
|
+
<http://www.w3.org/ns/odrl/2/constraint> <http://example.org#constraint_68801650224698>, <http://example.org#constraint_68801650224712> ;
|
43
|
+
<http://www.w3.org/ns/odrl/2/target> <https://fdp.bgv.cbgp.upm.es/dataset/65ffbf3d-bed1-4a9a-abf9-0116cc35b40a> ;
|
44
|
+
<http://www.w3.org/ns/odrl/2/uid> <http://example.org#rule_68801650224680> .
|
45
|
+
|
46
|
+
<http://www.w3.org/ns/odrl/2/use>
|
47
|
+
<http://purl.org/dc/terms/identifier> <http://www.w3.org/ns/odrl/2/use> ;
|
48
|
+
a "type"@en ;
|
49
|
+
<http://www.w3.org/2000/01/rdf-schema#label> ""@en ;
|
50
|
+
<http://www.w3.org/ns/odrl/2/uid> <http://www.w3.org/ns/odrl/2/use> ;
|
51
|
+
<https://schema.org/name> ""@en .
|
52
|
+
|
53
|
+
<https://absch.cbd.int/en/database/CON/ABSCH-CON-ES-241810/2>
|
54
|
+
<http://purl.org/dc/terms/identifier> <https://absch.cbd.int/en/database/CON/ABSCH-CON-ES-241810/2> ;
|
55
|
+
<http://purl.org/dc/terms/title> "Ministerio para la Transición Ecológica y el Reto Demográfico"@en ;
|
56
|
+
a <http://www.w3.org/ns/odrl/2/Party> ;
|
57
|
+
<http://www.w3.org/2000/01/rdf-schema#label> "Ministerio para la Transición Ecológica y el Reto Demográfico"@en ;
|
58
|
+
<http://www.w3.org/ns/odrl/2/uid> <https://absch.cbd.int/en/database/CON/ABSCH-CON-ES-241810/2> .
|
59
|
+
|
60
|
+
<https://fdp.bgv.cbgp.upm.es/dataset/65ffbf3d-bed1-4a9a-abf9-0116cc35b40a>
|
61
|
+
<http://purl.org/dc/terms/identifier> <https://fdp.bgv.cbgp.upm.es/dataset/65ffbf3d-bed1-4a9a-abf9-0116cc35b40a> ;
|
62
|
+
<http://purl.org/dc/terms/title> "César Gómez Campo Banco de Germoplasma Vegetal de la UPM"@en ;
|
63
|
+
a <http://www.w3.org/ns/odrl/2/Asset> ;
|
64
|
+
<http://www.w3.org/2000/01/rdf-schema#label> "César Gómez Campo Banco de Germoplasma Vegetal de la UPM"@en ;
|
65
|
+
<http://www.w3.org/ns/odrl/2/uid> <https://fdp.bgv.cbgp.upm.es/dataset/65ffbf3d-bed1-4a9a-abf9-0116cc35b40a> .
|
66
|
+
|