odrl-ruby 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/examples/build_profile.rb +3 -3
- data/lib/odrl/odrl/version.rb +1 -1
- data/lib/odrl/profile/builder.rb +5 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdcd5bfb5bc052822349146efbc304d7894c89c66fc861f0dae92f19eb6068c2
|
4
|
+
data.tar.gz: 0e7e71025bc4c15a74419618568ba346e563538e9ee4844fd2b6379cf460adab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 267af6ef7ede293eb743b806638caaedc1395a5a485c1f798937be9594e365e83753af1245042734e6c6215d3c57e4d2567d3978d9330326b1794cdec859ccdd
|
7
|
+
data.tar.gz: bfbd3ec7a73ad5cdfd1c64e2f9da17c19bd10aa21c64bead93164ffa55c4367ad5fbb4231f1fc57572f8e817bd3e7d699fff6cae847d22e4c8cabe3655522e95
|
data/Gemfile.lock
CHANGED
data/examples/build_profile.rb
CHANGED
@@ -14,12 +14,12 @@ p.asset_relations << ODRL::Profile::AssetRelation.new(
|
|
14
14
|
definition: "Permission is a special thing in the Nagoya protocol")
|
15
15
|
|
16
16
|
|
17
|
-
p.party_functional_roles << ODRL::Profile::
|
17
|
+
p.party_functional_roles << ODRL::Profile::PartyFunction.new(
|
18
18
|
uri: "https://example.org/myprofiles/ontology#nagoya_assigner",
|
19
19
|
label: "Assigner with Nagoya authority to assign",
|
20
20
|
definition: "Assigners have special responsibilities in the Nagoya protocol")
|
21
21
|
|
22
|
-
p.actions << ODRL::Profile::
|
22
|
+
p.actions << ODRL::Profile::Action.new(
|
23
23
|
uri: "https://example.org/myprofiles/ontology#nagoya_propogate",
|
24
24
|
label: "Plant and Harvest",
|
25
25
|
definition: "the action of planting and harvesting the seed",
|
@@ -37,7 +37,7 @@ p.rightOperands << ODRL::Profile::RightOperand.new(
|
|
37
37
|
label: "On Watchlist",
|
38
38
|
definition: "A species whose risk of extinction is on a watchlist")
|
39
39
|
|
40
|
-
p.
|
40
|
+
p.operators << ODRL::Profile::Operator.new(
|
41
41
|
uri: "https://example.org/myprofiles/ontology#within_risk_boundary",
|
42
42
|
label: "Within Bounds",
|
43
43
|
definition: "comparison of risk boundaries")
|
data/lib/odrl/odrl/version.rb
CHANGED
data/lib/odrl/profile/builder.rb
CHANGED
@@ -16,7 +16,7 @@ module ODRL
|
|
16
16
|
module Profile
|
17
17
|
class Builder
|
18
18
|
attr_accessor :uri, :profile_class, :repository, :title, :description, :author
|
19
|
-
attr_accessor :asset_relations, :party_functional_roles, :actions, :leftOperands, :rightOperands
|
19
|
+
attr_accessor :asset_relations, :party_functional_roles, :actions, :leftOperands, :rightOperands, :operators
|
20
20
|
|
21
21
|
# attr_accessor :logicalConstraints, :conflict_strategies, :rules
|
22
22
|
def initialize(uri:, profile_class:, title:, description:, author:)
|
@@ -31,6 +31,7 @@ module ODRL
|
|
31
31
|
@actions = []
|
32
32
|
@leftOperands = []
|
33
33
|
@rightOperands = []
|
34
|
+
@operators = []
|
34
35
|
@asset_relations = []
|
35
36
|
|
36
37
|
# Required declarations of disjointedness
|
@@ -49,7 +50,7 @@ module ODRL
|
|
49
50
|
description and ODRL::Profile::Builder.triplify(uri, DCT.title, description, repo)
|
50
51
|
author and ODRL::Profile::Builder.triplify(uri, DC.creator, author, repo)
|
51
52
|
|
52
|
-
[asset_relations, party_functional_roles, actions, leftOperands, rightOperands,
|
53
|
+
[asset_relations, party_functional_roles, actions, leftOperands, rightOperands, operators].flatten.each do |elem|
|
53
54
|
elem.build(repo: repo)
|
54
55
|
end
|
55
56
|
end
|
@@ -133,7 +134,7 @@ module ODRL
|
|
133
134
|
end
|
134
135
|
end
|
135
136
|
|
136
|
-
class
|
137
|
+
class Action < ProfileElement
|
137
138
|
# ex:myAction a odrl:Action .
|
138
139
|
# ex:myAction odrl:includedIn odrl:use .
|
139
140
|
# ex:myAction odrl:implies odrl:distribute .
|
@@ -173,7 +174,7 @@ module ODRL
|
|
173
174
|
end
|
174
175
|
end
|
175
176
|
|
176
|
-
class
|
177
|
+
class Operator < ProfileElement
|
177
178
|
# ex:myOperator a odrl:Operator .
|
178
179
|
def build(repo:)
|
179
180
|
ODRL::Profile::Builder.triplify(uri, RDF.type, ODRLV.Operator, repo)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: odrl-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Wilkinson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A builder for ODRL files. Does basic validation against core ODRL vocabularies.
|
14
14
|
Has a Builder that allows you to create ODRL Profiles to extend the core vocabulary. DOES
|