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 +4 -4
- data/lib/cocina/models/admin_policy.rb +40 -4
- data/lib/cocina/models/version.rb +1 -1
- 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: 264000241ff6ee50dce7e654983af88509f45c8696aeff3a77e619b8183a9665
|
4
|
+
data.tar.gz: 8011e891f2309e4bddbc8d71bb4f37e7046172a560c090836c762f966fb67942
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
26
|
-
|
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
|
-
|
56
|
-
|
92
|
+
params[:administrative] = Administrative.from_dynamic(dyn['administrative']) if dyn['administrative']
|
57
93
|
AdminPolicy.new(params)
|
58
94
|
end
|
59
95
|
|
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.
|
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.
|
200
|
+
rubygems_version: 3.0.3
|
201
201
|
signing_key:
|
202
202
|
specification_version: 4
|
203
203
|
summary: Data models for the SDR
|