cocina-models 0.9.0 → 0.10.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a9c692cb4e1534e826f25ebe4fc414eb083b0c26a52b7b17a10e01cc36d2323
4
- data.tar.gz: 80fcae220c9fcaf922d836c3dd4383e2ee398a97a476ac40224e73a388ddd44f
3
+ metadata.gz: 264000241ff6ee50dce7e654983af88509f45c8696aeff3a77e619b8183a9665
4
+ data.tar.gz: 8011e891f2309e4bddbc8d71bb4f37e7046172a560c090836c762f966fb67942
5
5
  SHA512:
6
- metadata.gz: 8c92ac509185dd420a3cc78e040a92f9e5938263d456a8ab7355fc82c7ef3d7d9e1f57c612569bc5f8e849c6df6f58f18f5d9cf79ac2b35551c67833dc659c9c
7
- data.tar.gz: fa690254b519dc3e4448e6d17c2fc0709f90db059d73f2a56ef725297b9b9c654abf8aca3b5505d4816bf1710fb8d37b4fcfad5184a01437fac335b97c270e89
6
+ metadata.gz: caa4fc0b233a62abd23e429dcfc330b90544ebb4105cdc85fce3567f94a41b07cf8e4287a517aa537442bd9aedb7345a487389d4e9d1f019b2de2ebd8d1d9e63
7
+ data.tar.gz: 38ad1e726b4d2fa2129b0a1cdf2049654cf811245317911287c6be94d0dde8aec5d29b1c036ce78764db1f61e025c6d5f4fe3ca6b16384d6761ed4612445768e
@@ -22,8 +22,45 @@ module Cocina
22
22
 
23
23
  # Subschema for administrative concerns
24
24
  class Administrative < Dry::Struct
25
- def self.from_dynamic(_dyn)
26
- params = {}
25
+ # This was copied from the ActiveFedora defaults: Dor::AdminPolicyObject.new.defaultObjectRights.content
26
+ DEFAULT_OBJECT_RIGHTS = <<~XML
27
+ <?xml version="1.0" encoding="UTF-8"?>
28
+
29
+ <rightsMetadata>
30
+ <access type="discover">
31
+ <machine>
32
+ <world/>
33
+ </machine>
34
+ </access>
35
+ <access type="read">
36
+ <machine>
37
+ <world/>
38
+ </machine>
39
+ </access>
40
+ <use>
41
+ <human type="useAndReproduction"/>
42
+ <human type="creativeCommons"/>
43
+ <machine type="creativeCommons" uri=""/>
44
+ <human type="openDataCommons"/>
45
+ <machine type="openDataCommons" uri=""/>
46
+ </use>
47
+ <copyright>
48
+ <human/>
49
+ </copyright>
50
+ </rightsMetadata>
51
+ XML
52
+
53
+ # An XML blob that is to be used temporarily until we model rights
54
+ attribute :default_object_rights, Types::Strict::String.optional.default(DEFAULT_OBJECT_RIGHTS)
55
+
56
+ # which workflow to start when registering (used by Web Archive apos to start wasCrawlPreassemblyWF)
57
+ attribute :registration_workflow, Types::String.optional.default(nil)
58
+
59
+ def self.from_dynamic(dyn)
60
+ params = {
61
+ default_object_rights: dyn['default_object_rights'],
62
+ registration_workflow: dyn['registration_workflow']
63
+ }
27
64
  Administrative.new(params)
28
65
  end
29
66
  end
@@ -52,8 +89,7 @@ module Cocina
52
89
  }
53
90
 
54
91
  # params[:access] = Access.from_dynamic(dyn['access']) if dyn['access']
55
- # params[:administrative] = Administrative.from_dynamic(dyn['administrative']) if dyn['administrative']
56
-
92
+ params[:administrative] = Administrative.from_dynamic(dyn['administrative']) if dyn['administrative']
57
93
  AdminPolicy.new(params)
58
94
  end
59
95
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.9.0'
5
+ VERSION = '0.10.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocina-models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
@@ -197,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
197
  - !ruby/object:Gem::Version
198
198
  version: '0'
199
199
  requirements: []
200
- rubygems_version: 3.0.6
200
+ rubygems_version: 3.0.3
201
201
  signing_key:
202
202
  specification_version: 4
203
203
  summary: Data models for the SDR