cocina-models 0.36.0 → 0.37.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/maps/DRO.json +4 -0
- data/lib/cocina/models/file.rb +1 -1
- data/lib/cocina/models/file_access.rb +16 -0
- data/lib/cocina/models/request_file.rb +1 -1
- data/lib/cocina/models/version.rb +1 -1
- data/openapi.yml +41 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bfcf544ee3b4b2a024388b61fae8a9244d7db2e8b2272897b55679d81edbcb4
|
4
|
+
data.tar.gz: 8fb5f5a7a05a1fd070c1b4a8e0b1849d74bb6dc88d8c9e956aef984ae8970bc1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9117e97169200229cd278e261ce211ab3927513705f0be47918d0ea1e9ec2407dc5f4ed0e6eddfd3213129493ca3b9b0b1fff783a431fb6805bc037d42918ead
|
7
|
+
data.tar.gz: 576242ad13d3e63263dc893cfc3e6fa6341391aa21c98735878ce9ca83969710b606987d891fa4d22cafe5899b2ee74ee3c37662afaf2e2661323546a78554cf
|
data/docs/maps/DRO.json
CHANGED
@@ -81,6 +81,10 @@
|
|
81
81
|
"description": "The human readable copyright statement that applies to the DRO.",
|
82
82
|
"type": "string"
|
83
83
|
},
|
84
|
+
"controlledDigitalLending": {
|
85
|
+
"description": "If the object is available for controlled digital lending.",
|
86
|
+
"type": "boolean"
|
87
|
+
},
|
84
88
|
"download": {
|
85
89
|
"description": "Download level for the DRO metadata.",
|
86
90
|
"type": "string",
|
data/lib/cocina/models/file.rb
CHANGED
@@ -24,7 +24,7 @@ module Cocina
|
|
24
24
|
# Use for the File.
|
25
25
|
attribute :use, Types::Strict::String.meta(omittable: true)
|
26
26
|
attribute :hasMessageDigests, Types::Strict::Array.of(MessageDigest).default([].freeze)
|
27
|
-
attribute(:access,
|
27
|
+
attribute(:access, FileAccess.default { FileAccess.new })
|
28
28
|
attribute(:administrative, FileAdministrative.default { FileAdministrative.new })
|
29
29
|
attribute :presentation, Presentation.optional.meta(omittable: true)
|
30
30
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Cocina
|
4
|
+
module Models
|
5
|
+
class FileAccess < Struct
|
6
|
+
# Access level
|
7
|
+
attribute :access, Types::Strict::String.default('dark').enum('world', 'stanford', 'location-based', 'citation-only', 'dark').meta(omittable: true)
|
8
|
+
# Available for controlled digital lending.
|
9
|
+
attribute :controlledDigitalLending, Types::Strict::Bool.meta(omittable: true)
|
10
|
+
# Download access level for a file
|
11
|
+
attribute :download, Types::Strict::String.default('none').enum('world', 'stanford', 'location-based', 'none').meta(omittable: true)
|
12
|
+
# If access is "location-based", which location should have access.
|
13
|
+
attribute :readLocation, Types::Strict::String.enum('spec', 'music', 'ars', 'art', 'hoover', 'm&m').meta(omittable: true)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -16,7 +16,7 @@ module Cocina
|
|
16
16
|
attribute :externalIdentifier, Types::Strict::String.meta(omittable: true)
|
17
17
|
attribute :use, Types::Strict::String.meta(omittable: true)
|
18
18
|
attribute :hasMessageDigests, Types::Strict::Array.of(MessageDigest).default([].freeze)
|
19
|
-
attribute(:access,
|
19
|
+
attribute(:access, FileAccess.default { FileAccess.new })
|
20
20
|
attribute(:administrative, FileAdministrative.default { FileAdministrative.new })
|
21
21
|
attribute :presentation, Presentation.optional.meta(omittable: true)
|
22
22
|
end
|
data/openapi.yml
CHANGED
@@ -94,7 +94,7 @@ paths:
|
|
94
94
|
components:
|
95
95
|
schemas:
|
96
96
|
Access:
|
97
|
-
description: Access metadata
|
97
|
+
description: Access metadata for collections
|
98
98
|
type: object
|
99
99
|
additionalProperties: false
|
100
100
|
properties:
|
@@ -725,7 +725,7 @@ components:
|
|
725
725
|
items:
|
726
726
|
$ref: '#/components/schemas/MessageDigest'
|
727
727
|
access:
|
728
|
-
$ref: '#/components/schemas/
|
728
|
+
$ref: '#/components/schemas/FileAccess'
|
729
729
|
administrative:
|
730
730
|
$ref: '#/components/schemas/FileAdministrative'
|
731
731
|
presentation:
|
@@ -739,6 +739,44 @@ components:
|
|
739
739
|
- access
|
740
740
|
- administrative
|
741
741
|
- hasMessageDigests
|
742
|
+
FileAccess:
|
743
|
+
description: Access metadata for files
|
744
|
+
type: object
|
745
|
+
additionalProperties: false
|
746
|
+
properties:
|
747
|
+
access:
|
748
|
+
description: Access level
|
749
|
+
type: string
|
750
|
+
enum:
|
751
|
+
- 'world'
|
752
|
+
- 'stanford'
|
753
|
+
- 'location-based'
|
754
|
+
- 'citation-only'
|
755
|
+
- 'dark'
|
756
|
+
default: 'dark'
|
757
|
+
controlledDigitalLending:
|
758
|
+
description: Available for controlled digital lending.
|
759
|
+
type: boolean
|
760
|
+
default: false
|
761
|
+
download:
|
762
|
+
description: Download access level for a file
|
763
|
+
type: string
|
764
|
+
enum:
|
765
|
+
- 'world'
|
766
|
+
- 'stanford'
|
767
|
+
- 'location-based'
|
768
|
+
- 'none'
|
769
|
+
default: 'none'
|
770
|
+
readLocation:
|
771
|
+
description: If access is "location-based", which location should have access.
|
772
|
+
type: string
|
773
|
+
enum:
|
774
|
+
- 'spec'
|
775
|
+
- 'music'
|
776
|
+
- 'ars'
|
777
|
+
- 'art'
|
778
|
+
- 'hoover'
|
779
|
+
- 'm&m'
|
742
780
|
FileAdministrative:
|
743
781
|
type: object
|
744
782
|
additionalProperties: false
|
@@ -1088,7 +1126,7 @@ components:
|
|
1088
1126
|
items:
|
1089
1127
|
$ref: '#/components/schemas/MessageDigest'
|
1090
1128
|
access:
|
1091
|
-
$ref: '#/components/schemas/
|
1129
|
+
$ref: '#/components/schemas/FileAccess'
|
1092
1130
|
administrative:
|
1093
1131
|
$ref: '#/components/schemas/FileAdministrative'
|
1094
1132
|
presentation:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocina-models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.37.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -276,6 +276,7 @@ files:
|
|
276
276
|
- lib/cocina/models/embargo.rb
|
277
277
|
- lib/cocina/models/event.rb
|
278
278
|
- lib/cocina/models/file.rb
|
279
|
+
- lib/cocina/models/file_access.rb
|
279
280
|
- lib/cocina/models/file_administrative.rb
|
280
281
|
- lib/cocina/models/file_set.rb
|
281
282
|
- lib/cocina/models/file_set_structural.rb
|