odrl-ruby 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63cb1e71b635624b49a5ed95f438db8c1dbd93210f454be4d88f1227b487874f
4
- data.tar.gz: 40fa678545058fca0b73de3a89d4c379ae6487c0f7a8a4e778f4642b7250723e
3
+ metadata.gz: 285996251973718c4ba4bea385e1df95bc8b3f23d4e50fc1fa5dd0fc28cb63d4
4
+ data.tar.gz: dbceab1cb4e5003016dd5f8499ae659e382c8be8a4900ec2a58ae6983bdc0263
5
5
  SHA512:
6
- metadata.gz: adc87311982d35fafffc09e54afcadf88ec41e89f5acf6c2925cf346f3f871293b5fcff62c8928a64fdbaec240ee5279336eaacafedfc50c52cea965f65ff0c1
7
- data.tar.gz: 4438e55d750c5792de355aedd3c991506b6446419c031c492dd2eec7c819af81dce00075524b7400af504469248e095e6b2378d44380f4e92f76786ee046407f
6
+ metadata.gz: 3385c5e104219c97354693ea4dbb758d8aa69d3ac48a40600c92cf0f45d724517035664d7824349c1904f309d2f4b2294889fc202801c977e2822e4c3d9fe260
7
+ data.tar.gz: 595f681f2e46d8d506f706fbac63830e4b32b6c05af4c876001420a38662533ac78caee7c7a05b8750588c3120f4689fbfdcd08219eccd13879096cb8fffc76a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- odrl-ruby (0.2.1)
4
+ odrl-ruby (0.2.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -14,7 +14,7 @@ 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::AssetRelation.new(
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")
@@ -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.rightOperands << ODRL::Profile::Relation.new(
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")
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ODRL
4
4
  module ODRL
5
- VERSION = "0.2.1"
5
+ VERSION = "0.2.2"
6
6
  end
7
7
  end
@@ -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, asset_relations].flatten.each do |elem|
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
@@ -173,7 +174,7 @@ module ODRL
173
174
  end
174
175
  end
175
176
 
176
- class Relation < ProfileElement
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.1
4
+ version: 0.2.2
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-06-30 00:00:00.000000000 Z
11
+ date: 2023-07-01 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