cocina-models 0.36.0 → 0.37.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: 6f64b937df8c8d8c7bbd64af57d587e27843ebcd7e751ea4caff887aaa78c7a1
4
- data.tar.gz: b697ab2535648dd6d1520f35da839e599756e7c49bbc2803d17a5d6e2db9307d
3
+ metadata.gz: 5bfcf544ee3b4b2a024388b61fae8a9244d7db2e8b2272897b55679d81edbcb4
4
+ data.tar.gz: 8fb5f5a7a05a1fd070c1b4a8e0b1849d74bb6dc88d8c9e956aef984ae8970bc1
5
5
  SHA512:
6
- metadata.gz: c67039d09d1d04e7bba5aaf0199402e5e1e0b9008b56a268735f59d4d61bd92f5c6e17f0edaf8625102f5e7bfd25e7cc66b4e58e51193e811bf2635b43ff21cc
7
- data.tar.gz: d7eeeccbc2a215cdee206b746bda7e38e7c86fca21b5c92f40057c5ffa760494cc539490dd35734314e82506f0ad922ae15f68bcf414034d9ce2fad06375397c
6
+ metadata.gz: 9117e97169200229cd278e261ce211ab3927513705f0be47918d0ea1e9ec2407dc5f4ed0e6eddfd3213129493ca3b9b0b1fff783a431fb6805bc037d42918ead
7
+ data.tar.gz: 576242ad13d3e63263dc893cfc3e6fa6341391aa21c98735878ce9ca83969710b606987d891fa4d22cafe5899b2ee74ee3c37662afaf2e2661323546a78554cf
@@ -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",
@@ -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, Access.default { Access.new })
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, Access.default { Access.new })
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.36.0'
5
+ VERSION = '0.37.0'
6
6
  end
7
7
  end
@@ -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/Access'
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/Access'
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.36.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-20 00:00:00.000000000 Z
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