cocina-models 0.56.1 → 0.59.0

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: a52376af9aaa972a14d4519fb0faede24d513fa07398c4c9baee0b3f20905023
4
- data.tar.gz: 14cff19f291851019d791e55851d2b83f0619e8b2814390cc67fad5a1b6865c9
3
+ metadata.gz: d472f28820d79530461986e33333e5992ccb186f49b87a8a1cb72c3ffb86aa3b
4
+ data.tar.gz: 19bb67df011f97b52ec3bdbbe847a2fdebabbacc1dd3a322279eedb1c73aec50
5
5
  SHA512:
6
- metadata.gz: 4c2bf5052432e221e622b4c87164bcc3ae823a74ef589ede8e07054b98159cb60be777f1b905a7b8846bdbc4a678440e09ab1040fcd252cc67215498fa3d438d
7
- data.tar.gz: 39fa183b6da0bd4d1a4ff2766cbbd9ec1a11e0b68f7ce640a8394a13565fc4f310d5992ea4e2371a638e860d0c1595fe18899a63acd9d30b3353aff40870e3ca
6
+ metadata.gz: ac7b48e7ea013bd36fe1dc15f1c1a6826bade90358b7c2c43697af4945d1b5e9fac44acaa08f87233609fcb5e8c53598a85b656157ad33aa96ff8baea20400fe
7
+ data.tar.gz: b260daadd1e73062df358ef214a6d0417d3b0d5f0c493ad22fe0025019822c4386f5e23bedaec6517d4678c3b766050816def14f329ca3b78f6dbca597ac3cbc
data/.rubocop.yml CHANGED
@@ -79,6 +79,8 @@ Metrics/BlockLength:
79
79
 
80
80
  Metrics/MethodLength:
81
81
  Max: 14
82
+ Exclude:
83
+ - 'spec/cocina/models/file_access_spec.rb'
82
84
 
83
85
  # ----- RSpec ------
84
86
 
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2020-09-08 19:05:09 UTC using RuboCop version 0.89.1.
3
+ # on 2021-04-16 17:25:55 UTC using RuboCop version 0.93.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -8,15 +8,15 @@
8
8
 
9
9
  # Offense count: 1
10
10
  # Configuration parameters: AllowedMethods.
11
- # AllowedMethods: present?, blank?, presence, try, try!
11
+ # AllowedMethods: present?, blank?, presence, try, try!, in?
12
12
  Lint/SafeNavigationChain:
13
13
  Exclude:
14
14
  - 'lib/cocina/generator/schema_base.rb'
15
15
 
16
16
  # Offense count: 1
17
- # Configuration parameters: IgnoredMethods.
18
- Metrics/CyclomaticComplexity:
19
- Max: 8
17
+ # Configuration parameters: CountKeywordArgs.
18
+ Metrics/ParameterLists:
19
+ Max: 6
20
20
 
21
21
  # Offense count: 1
22
22
  # Configuration parameters: MinBodyLength.
data/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  This is a Ruby implementation of the SDR data model (named "COCINA"). The data being modeled includes digital repository objects.
10
10
 
11
- Validation is performed by openapi (using OpenAPIParser). Modeling is provided by dry-struct and dry-types. Together, these provide a way for consumers to validate objects against models and to manipulate thos objects.
11
+ Validation is performed by openapi (using OpenAPIParser). Modeling is provided by dry-struct and dry-types. Together, these provide a way for consumers to validate objects against models and to manipulate those objects.
12
12
 
13
13
  This is a work in progress that will ultimately implement the full [COCINA data model](http://sul-dlss.github.io/cocina-models/). See also [architecture documentation](https://sul-dlss.github.io/taco-truck/COCINA.html#cocina-data-models--shapes).
14
14
 
@@ -34,44 +34,53 @@ Beyond what is necessary to test the generator, the Cocina model classes are not
34
34
 
35
35
  ## Releasing
36
36
 
37
+ ### Step 0: Share intent to change the models
38
+
39
+ Send a note to `#dlss-infra-chg-mgmt` on Slack to let people know what is changing and when.
40
+
41
+ ### Step 1: Cut the release
42
+
37
43
  The release process is much like any other gem. First bump the version in `lib/cocina/models/version.rb`, and commit the result. Then run:
38
44
  ```
39
45
  bundle exec rake release
40
46
  ```
41
47
  which pushes the gem to rubygems.org. Next write up the release notes: https://github.com/sul-dlss/cocina-models/releases .
42
48
 
43
- Finally, you must release versions of [sdr-client](https://github.com/sul-dlss/sdr-client) and [dor-services-client](https://github.com/sul-dlss/dor-services-client/) pinned to this version because [Argo](https://github.com/sul-dlss/argo) depends on both of those. When [dor-services-app](https://github.com/sul-dlss/dor-services-app) is updated to use the new models (via the auto-update script), the clients must be updated at the same time or there is risk of models produced by dor-services-app not being acceptable to the clients.
49
+ ### Step 2: Update client gems coupled to the models
44
50
 
45
- ### Communicate
51
+ Next, you should release versions of [sdr-client](https://github.com/sul-dlss/sdr-client) and [dor-services-client](https://github.com/sul-dlss/dor-services-client/) pinned to this version because applications such as [Argo](https://github.com/sul-dlss/argo) depend on both of these gems using the same models.
46
52
 
47
- Send a note to `#dlss-infra-chg-mgmt` on Slack to let people know what is changing and when.
53
+ ### Step 3: Update service API specifications and gems
54
+
55
+ The cocina-models gem is used in applications that have an API specification that accepts Cocina models. Next, make sure that the `openapi.yml` for these applications include the `openapi.yml` schema changes made in cocina-models. This list of services is known to include:
56
+
57
+ * [sul-dlss/sdr-api](https://github.com/sul-dlss/sdr-api)
58
+ * [sul-dlss/dor-services-app](https://github.com/sul-dlss/dor-services-app/)
48
59
 
49
- ### Dependent Services
60
+ This can be accomplished by copying and pasting these schemas. By convention, these schemas are listed first in the `openapi.yml` of the associated projects, followed by the application-specific schemas.
50
61
 
51
- Once the above listed gems are updated all the following services that use cocina-models should be updated and released at the same time:
62
+ #### Step 3b: Bump gems
52
63
 
53
- * sul-dlss/sdr-api
54
- * sul-dlss/dor-services-app
55
- * sul-dlss/google-books
56
- * sul-dlss/common-accessioning
57
- * sul-dlss/argo
58
- * sul-dlss/pre-assembly
59
- * sul-dlss/hydrus
60
- * sul-dlss/happy-heron
61
- * sul-dlss/infrastructure-integration-test
62
- * sul-dlss/dor_indexing_app
64
+ At the same, we have found it convenient to use these PRs to also bump the versions of cocina-models, sdr-client, and dor-services-client in these applications/services. Why? When [dor-services-app](https://github.com/sul-dlss/dor-services-app), for example, is updated to use the new models (via the auto-update script), these clients should be updated at the same time or there is risk of models produced by dor-services-app not being acceptable to the clients.
63
65
 
64
- ## Using this gem
66
+ ### Step 4: Update other dependent applications
65
67
 
66
- If you are using this gem in an application that has an API that accepts Cocina models (e.g., SDR API, Dor-Services-App), make sure that the `openapi.yml` for the application includes the schemas that match the schemas in this `openapi.yml`.
68
+ Once the above listed steps have been completed, all the following applications that use cocina-models should be updated and released at the same time:
67
69
 
68
- This can be accomplished by cutting and pasting these schemas. By convention, these schemas are listed first in the `openapi.yml` of the associated projects, followed by the application-specific schemas.
70
+ * [sul-dlss/dor_indexing_app](https://github.com/sul-dlss/dor_indexing_app/)
71
+ * [sul-dlss/common-accessioning](https://github.com/sul-dlss/common-accessioning/)
72
+ * [sul-dlss/google-books](https://github.com/sul-dlss/google-books/)
73
+ * [sul-dlss/argo](https://github.com/sul-dlss/argo/)
74
+ * [sul-dlss/pre-assembly](https://github.com/sul-dlss/pre-assembly/)
75
+ * [sul-dlss/hydrus](https://github.com/sul-dlss/hydrus/)
76
+ * [sul-dlss/happy-heron](https://github.com/sul-dlss/happy-heron/)
77
+ * [sul-dlss/infrastructure-integration-test](https://github.com/sul-dlss/infrastructure-integration-test/)
69
78
 
70
- ### Usage conventions
79
+ ## Usage conventions
71
80
 
72
81
  The following are the recommended naming conventions for code using Cocina models:
73
82
 
74
- * cocina_item: Cocina::Models::DRO instance
75
- * cocina_admin_policy: Cocina::Models::AdminPolicy instance
76
- * cocina_collection: Cocina::Models::Collection instance
77
- * cocina_object: Cocina::Models::DRO or Cocina::Models::AdminPolicy or Cocina::Models::Collection instance
83
+ * `cocina_item`: `Cocina::Models::DRO` instance
84
+ * `cocina_admin_policy`: `Cocina::Models::AdminPolicy` instance
85
+ * `cocina_collection`: `Cocina::Models::Collection` instance
86
+ * `cocina_object`: `Cocina::Models::DRO` or `Cocina::Models::AdminPolicy` or `Cocina::Models::Collection` instance
@@ -5,7 +5,7 @@ module Cocina
5
5
  # Class for generating from an openapi schema
6
6
  class Schema < SchemaBase
7
7
  def schema_properties
8
- @schema_properties ||= (properties + all_of_properties).uniq(&:key)
8
+ @schema_properties ||= (properties + all_of_properties + one_of_properties).uniq(&:key)
9
9
  end
10
10
 
11
11
  def generate
@@ -83,20 +83,48 @@ module Cocina
83
83
  all_of_properties_for(schema_doc)
84
84
  end
85
85
 
86
+ def one_of_properties
87
+ one_of_properties_for(schema_doc)
88
+ end
89
+
86
90
  def all_of_properties_for(doc)
87
91
  return [] if doc.all_of.nil?
88
92
 
89
93
  doc.all_of.map do |all_of_schema|
90
94
  # All of for this + recurse
91
- schema_properties_for(all_of_schema) + all_of_properties_for(all_of_schema)
95
+ schema_properties_for(all_of_schema) +
96
+ all_of_properties_for(all_of_schema) +
97
+ one_of_properties_for(all_of_schema)
92
98
  end.flatten
93
99
  end
94
100
 
101
+ def one_of_properties_for(doc)
102
+ return [] if doc.one_of.nil?
103
+
104
+ # All properties must be objects.
105
+ unless doc.one_of.all? { |schema| schema.type == 'object' }
106
+ raise 'All properties for oneOf must be objects'
107
+ end
108
+
109
+ doc.one_of.flat_map do |one_of_doc|
110
+ one_of_doc.properties.map do |key, properties_doc|
111
+ property_class_for(properties_doc).new(properties_doc,
112
+ key: key,
113
+ # The property does less validation because may vary between
114
+ # different oneOf schemas. Validation is still performed
115
+ # by openAPI.
116
+ relaxed: true,
117
+ parent: self)
118
+ end
119
+ end
120
+ end
121
+
95
122
  def schema_properties_for(doc)
96
123
  doc.properties.map do |key, properties_doc|
97
124
  property_class_for(properties_doc).new(properties_doc,
98
125
  key: key,
99
126
  required: doc.requires?(key),
127
+ nullable: properties_doc.nullable?,
100
128
  parent: self)
101
129
  end
102
130
  end
@@ -9,7 +9,7 @@ module Cocina
9
9
  end
10
10
 
11
11
  def omittable
12
- if required
12
+ if required && !relaxed
13
13
  '.default([].freeze)'
14
14
  else
15
15
  '.meta(omittable: true)'
@@ -4,13 +4,15 @@ module Cocina
4
4
  module Generator
5
5
  # Base class for generating from openapi
6
6
  class SchemaBase
7
- attr_reader :schema_doc, :key, :required, :parent
7
+ attr_reader :schema_doc, :key, :required, :nullable, :parent, :relaxed
8
8
 
9
- def initialize(schema_doc, key: nil, required: false, parent: nil)
9
+ def initialize(schema_doc, key: nil, required: false, nullable: false, parent: nil, relaxed: false)
10
10
  @schema_doc = schema_doc
11
11
  @key = key
12
12
  @required = required
13
+ @nullable = nullable
13
14
  @parent = parent
15
+ @relaxed = relaxed
14
16
  end
15
17
 
16
18
  def filename
@@ -21,12 +23,20 @@ module Cocina
21
23
  key || schema_doc.name
22
24
  end
23
25
 
26
+ # Allows non-required values to not be provided. This allows smaller
27
+ # requests as not every field needs to be present.
24
28
  def omittable
25
- return '' if required
29
+ return '' if required && !relaxed
26
30
 
27
31
  '.meta(omittable: true)'
28
32
  end
29
33
 
34
+ # Allows nillable values to be set to nil. This is useful when doing
35
+ # an update and you want to clear out a value.
36
+ def optional
37
+ nullable || relaxed ? '.optional' : ''
38
+ end
39
+
30
40
  def quote(item)
31
41
  return item unless schema_doc.type == 'string'
32
42
 
@@ -45,6 +55,12 @@ module Cocina
45
55
  "# example: #{schema_doc.example}\n"
46
56
  end
47
57
 
58
+ def relaxed_comment
59
+ return '' unless relaxed
60
+
61
+ "# Validation of this property is relaxed. See the openapi for full validation.\n"
62
+ end
63
+
48
64
  def dry_datatype(doc)
49
65
  case doc.type
50
66
  when 'integer'
@@ -54,7 +70,7 @@ module Cocina
54
70
  when 'boolean'
55
71
  'Strict::Bool'
56
72
  else
57
- if doc.one_of&.map(&:type).all? { |o| %w[integer string].include?(o) }
73
+ if any_datatype?(doc)
58
74
  'Nominal::Any'
59
75
  else
60
76
  raise "#{schema_doc.type} not supported"
@@ -62,6 +78,10 @@ module Cocina
62
78
  end
63
79
  end
64
80
 
81
+ def any_datatype?(doc)
82
+ relaxed || doc.one_of&.map(&:type).all? { |o| %w[integer string].include?(o) }
83
+ end
84
+
65
85
  def string_dry_datatype(doc)
66
86
  case doc.format
67
87
  when 'date-time'
@@ -5,7 +5,7 @@ module Cocina
5
5
  # Class for generating from an openapi reference
6
6
  class SchemaRef < SchemaBase
7
7
  def generate
8
- if required
8
+ if required && !relaxed
9
9
  "attribute(:#{name.camelize(:lower)}, #{schema_doc.name}.default { #{schema_doc.name}.new })"
10
10
  else
11
11
  "attribute :#{name.camelize(:lower)}, #{schema_doc.name}.optional.meta(omittable: true)"
@@ -6,14 +6,15 @@ module Cocina
6
6
  class SchemaValue < SchemaBase
7
7
  # rubocop:disable Layout/LineLength
8
8
  def generate
9
- "#{description}#{example}attribute :#{name.camelize(:lower)}, Types::#{dry_datatype(schema_doc)}#{default}#{enum}#{omittable}"
9
+ # optional has to come before default or the default value that gets set will be nil.
10
+ "#{description}#{example}#{relaxed_comment}attribute :#{name.camelize(:lower)}, Types::#{dry_datatype(schema_doc)}#{optional}#{default}#{enum}#{omittable}"
10
11
  end
11
12
  # rubocop:enable Layout/LineLength
12
13
 
13
14
  private
14
15
 
15
16
  def enum
16
- return '' unless schema_doc.enum
17
+ return '' if !schema_doc.enum || relaxed
17
18
 
18
19
  items = use_types? ? "*#{parent.name}::TYPES" : schema_doc.enum.map { |item| quote(item) }.join(', ')
19
20
 
@@ -3,15 +3,17 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class Access < Struct
6
- # Access level
7
- attribute :access, Types::Strict::String.default('dark').enum('world', 'stanford', 'location-based', 'citation-only', 'dark').meta(omittable: true)
6
+ # Access level.
7
+ # Validation of this property is relaxed. See the openapi for full validation.
8
+ attribute :access, Types::Strict::String.optional.default('dark').meta(omittable: true)
9
+ # Download access level.
10
+ # Validation of this property is relaxed. See the openapi for full validation.
11
+ attribute :download, Types::Strict::String.optional.default('none').meta(omittable: true)
8
12
  # If access is "location-based", which location should have access.
9
- attribute :readLocation, Types::Strict::String.enum('spec', 'music', 'ars', 'art', 'hoover', 'm&m').meta(omittable: true)
10
- # The human readable use and reproduction statement that applies
11
- # example: Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Public Services Librarian of the Dept. of Special Collections (http://library.stanford.edu/spc).
12
- attribute :useAndReproductionStatement, Types::Strict::String.meta(omittable: true)
13
- # The license governing reuse of the Collection. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
14
- attribute :license, Types::Strict::String.meta(omittable: true)
13
+ # Validation of this property is relaxed. See the openapi for full validation.
14
+ attribute :readLocation, Types::Strict::String.optional.meta(omittable: true)
15
+ # Validation of this property is relaxed. See the openapi for full validation.
16
+ attribute :controlledDigitalLending, Types::Strict::Bool.optional.meta(omittable: true)
15
17
  end
16
18
  end
17
19
  end
@@ -8,18 +8,18 @@ module Cocina
8
8
  attribute :controlledDigitalLending, Types::Strict::Bool.meta(omittable: true)
9
9
  # The human readable copyright statement that applies
10
10
  # example: Copyright World Trade Organization
11
- attribute :copyright, Types::Strict::String.meta(omittable: true)
11
+ attribute :copyright, Types::Strict::String.optional.meta(omittable: true)
12
12
  # Download access level. This is used in the transition from Fedora as a way to set a default download level at registration that is copied down to all the files.
13
13
 
14
14
  attribute :download, Types::Strict::String.enum('world', 'stanford', 'location-based', 'none').meta(omittable: true)
15
15
  # If access is "location-based", which location should have access. This is used in the transition from Fedora as a way to set a default readLocation at registration that is copied down to all the files.
16
16
 
17
- attribute :readLocation, Types::Strict::String.enum('spec', 'music', 'ars', 'art', 'hoover', 'm&m').meta(omittable: true)
17
+ attribute :readLocation, Types::Strict::String.optional.enum('spec', 'music', 'ars', 'art', 'hoover', 'm&m').meta(omittable: true)
18
18
  # The human readable use and reproduction statement that applies
19
19
  # example: Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Public Services Librarian of the Dept. of Special Collections (http://library.stanford.edu/spc).
20
- attribute :useAndReproductionStatement, Types::Strict::String.meta(omittable: true)
20
+ attribute :useAndReproductionStatement, Types::Strict::String.optional.meta(omittable: true)
21
21
  # The license governing reuse of the Collection. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
22
- attribute :license, Types::Strict::String.meta(omittable: true)
22
+ attribute :license, Types::Strict::String.optional.meta(omittable: true)
23
23
  end
24
24
  end
25
25
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class CitationOnlyAccess < Struct
6
+ # Access level.
7
+ attribute :access, Types::Strict::String.enum('citation-only')
8
+ # Download access level.
9
+ attribute :download, Types::Strict::String.enum('none')
10
+ # If access is "location-based", which location should have access.
11
+ attribute :readLocation, Types::Strict::String.optional.enum('').meta(omittable: true)
12
+ attribute :controlledDigitalLending, Types::Strict::Bool.enum(false).meta(omittable: true)
13
+ end
14
+ end
15
+ end
@@ -20,7 +20,7 @@ module Cocina
20
20
  attribute :label, Types::Strict::String
21
21
  # Version for the Collection within SDR.
22
22
  attribute :version, Types::Strict::Integer
23
- attribute(:access, Access.default { Access.new })
23
+ attribute(:access, CollectionAccess.default { CollectionAccess.new })
24
24
  attribute :administrative, Administrative.optional.meta(omittable: true)
25
25
  attribute :description, Description.optional.meta(omittable: true)
26
26
  attribute :identification, CollectionIdentification.optional.meta(omittable: true)
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class CollectionAccess < Struct
6
+ # Access level
7
+ attribute :access, Types::Strict::String.default('dark').enum('world', 'dark').meta(omittable: true)
8
+ # The human readable copyright statement that applies
9
+ # example: Copyright World Trade Organization
10
+ attribute :copyright, Types::Strict::String.meta(omittable: true)
11
+ # The human readable use and reproduction statement that applies
12
+ # example: Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Public Services Librarian of the Dept. of Special Collections (http://library.stanford.edu/spc).
13
+ attribute :useAndReproductionStatement, Types::Strict::String.meta(omittable: true)
14
+ # The license governing reuse of the Collection. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
15
+ attribute :license, Types::Strict::String.meta(omittable: true)
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class ControlledDigitalLendingAccess < Struct
6
+ # Access level.
7
+ attribute :access, Types::Strict::String.enum('stanford')
8
+ # Download access level.
9
+ attribute :download, Types::Strict::String.enum('none')
10
+ # If access is "location-based", which location should have access.
11
+ attribute :readLocation, Types::Strict::String.optional.enum('').meta(omittable: true)
12
+ # Available for controlled digital lending.
13
+ attribute :controlledDigitalLending, Types::Strict::Bool.default(false)
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class DarkAccess < Struct
6
+ # Access level.
7
+ attribute :access, Types::Strict::String.default('dark').enum('dark').meta(omittable: true)
8
+ # Download access level.
9
+ attribute :download, Types::Strict::String.default('none').enum('none').meta(omittable: true)
10
+ # If access is "location-based", which location should have access.
11
+ attribute :readLocation, Types::Strict::String.optional.enum('').meta(omittable: true)
12
+ attribute :controlledDigitalLending, Types::Strict::Bool.enum(false).meta(omittable: true)
13
+ end
14
+ end
15
+ end
@@ -3,19 +3,21 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class DROAccess < Struct
6
- attribute :access, Types::Strict::String.default('dark').enum('world', 'stanford', 'location-based', 'citation-only', 'dark').meta(omittable: true)
7
- # Available for controlled digital lending.
8
- attribute :controlledDigitalLending, Types::Strict::Bool.meta(omittable: true)
6
+ # Access level.
7
+ # Validation of this property is relaxed. See the openapi for full validation.
8
+ attribute :access, Types::Strict::String.optional.default('dark').meta(omittable: true)
9
+ # Download access level.
10
+ # Validation of this property is relaxed. See the openapi for full validation.
11
+ attribute :download, Types::Strict::String.optional.default('none').meta(omittable: true)
12
+ # If access is "location-based", which location should have access.
13
+ # Validation of this property is relaxed. See the openapi for full validation.
14
+ attribute :readLocation, Types::Strict::String.optional.meta(omittable: true)
15
+ # Validation of this property is relaxed. See the openapi for full validation.
16
+ attribute :controlledDigitalLending, Types::Strict::Bool.optional.meta(omittable: true)
9
17
  # The human readable copyright statement that applies
10
18
  # example: Copyright World Trade Organization
11
19
  attribute :copyright, Types::Strict::String.meta(omittable: true)
12
20
  attribute :embargo, Embargo.optional.meta(omittable: true)
13
- # Download access level. This is used in the transition from Fedora as a way to set a default download level at registration that is copied down to all the files.
14
-
15
- attribute :download, Types::Strict::String.default('none').enum('world', 'stanford', 'location-based', 'none').meta(omittable: true)
16
- # If access is "location-based", which location should have access. This is used in the transition from Fedora as a way to set a default readLocation at registration that is copied down to all the files.
17
-
18
- attribute :readLocation, Types::Strict::String.enum('spec', 'music', 'ars', 'art', 'hoover', 'm&m').meta(omittable: true)
19
21
  # The human readable use and reproduction statement that applies
20
22
  # example: Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Public Services Librarian of the Dept. of Special Collections (http://library.stanford.edu/spc).
21
23
  attribute :useAndReproductionStatement, Types::Strict::String.meta(omittable: true)
@@ -3,11 +3,20 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class Embargo < Struct
6
+ # Access level.
7
+ # Validation of this property is relaxed. See the openapi for full validation.
8
+ attribute :access, Types::Strict::String.optional.default('dark').meta(omittable: true)
9
+ # Download access level.
10
+ # Validation of this property is relaxed. See the openapi for full validation.
11
+ attribute :download, Types::Strict::String.optional.default('none').meta(omittable: true)
12
+ # If access is "location-based", which location should have access.
13
+ # Validation of this property is relaxed. See the openapi for full validation.
14
+ attribute :readLocation, Types::Strict::String.optional.meta(omittable: true)
15
+ # Validation of this property is relaxed. See the openapi for full validation.
16
+ attribute :controlledDigitalLending, Types::Strict::Bool.optional.meta(omittable: true)
6
17
  # Date when the Collection is released from an embargo.
7
18
  # example: 2029-06-22T07:00:00.000+00:00
8
19
  attribute :releaseDate, Types::Params::DateTime
9
- # Access level that applies when embargo expires.
10
- attribute :access, Types::Strict::String.enum('world', 'stanford', 'location-based', 'citation-only', 'dark')
11
20
  # The human readable use and reproduction statement that applies when the embargo expires.
12
21
  # example: These materials are in the public domain.
13
22
  attribute :useAndReproductionStatement, Types::Strict::String.meta(omittable: true)
@@ -3,14 +3,17 @@
3
3
  module Cocina
4
4
  module Models
5
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)
6
+ # Access level.
7
+ # Validation of this property is relaxed. See the openapi for full validation.
8
+ attribute :access, Types::Strict::String.optional.default('dark').meta(omittable: true)
9
+ # Download access level.
10
+ # Validation of this property is relaxed. See the openapi for full validation.
11
+ attribute :download, Types::Strict::String.optional.default('none').meta(omittable: true)
12
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)
13
+ # Validation of this property is relaxed. See the openapi for full validation.
14
+ attribute :readLocation, Types::Strict::String.optional.meta(omittable: true)
15
+ # Validation of this property is relaxed. See the openapi for full validation.
16
+ attribute :controlledDigitalLending, Types::Strict::Bool.optional.meta(omittable: true)
14
17
  end
15
18
  end
16
19
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class LocationBasedAccess < Struct
6
+ # Access level.
7
+ attribute :access, Types::Strict::String.enum('location-based')
8
+ # Download access level.
9
+ attribute :download, Types::Strict::String.enum('location-based', 'none')
10
+ # If access is "location-based", which location should have access.
11
+ attribute :readLocation, Types::Strict::String.enum('spec', 'music', 'ars', 'art', 'hoover', 'm&m')
12
+ attribute :controlledDigitalLending, Types::Strict::Bool.enum(false).meta(omittable: true)
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class LocationBasedDownloadAccess < Struct
6
+ # Access level.
7
+ attribute :access, Types::Strict::String.enum('stanford', 'world')
8
+ # Download access level.
9
+ attribute :download, Types::Strict::String.enum('location-based')
10
+ # If access is "location-based", which location should have access.
11
+ attribute :readLocation, Types::Strict::String.enum('spec', 'music', 'ars', 'art', 'hoover', 'm&m')
12
+ attribute :controlledDigitalLending, Types::Strict::Bool.enum(false).meta(omittable: true)
13
+ end
14
+ end
15
+ end
@@ -15,7 +15,7 @@ module Cocina
15
15
  attribute :type, Types::Strict::String.enum(*RequestCollection::TYPES)
16
16
  attribute :label, Types::Strict::String
17
17
  attribute :version, Types::Strict::Integer
18
- attribute(:access, Access.default { Access.new })
18
+ attribute(:access, CollectionAccess.default { CollectionAccess.new })
19
19
  attribute(:administrative, Administrative.default { Administrative.new })
20
20
  attribute :description, Description.optional.meta(omittable: true)
21
21
  attribute :identification, CollectionIdentification.optional.meta(omittable: true)
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class StanfordAccess < Struct
6
+ # Access level.
7
+ attribute :access, Types::Strict::String.enum('stanford')
8
+ # Download access level.
9
+ attribute :download, Types::Strict::String.enum('stanford')
10
+ # If access is "location-based", which location should have access.
11
+ attribute :readLocation, Types::Strict::String.optional.enum('').meta(omittable: true)
12
+ attribute :controlledDigitalLending, Types::Strict::Bool.enum(false).meta(omittable: true)
13
+ end
14
+ end
15
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.56.1'
5
+ VERSION = '0.59.0'
6
6
  end
7
7
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class WorldAccess < Struct
6
+ # Access level.
7
+ attribute :access, Types::Strict::String.enum('world')
8
+ # Download access level.
9
+ attribute :download, Types::Strict::String.enum('none', 'stanford', 'world')
10
+ # If access is "location-based", which location should have access.
11
+ attribute :readLocation, Types::Strict::String.optional.enum('').meta(omittable: true)
12
+ attribute :controlledDigitalLending, Types::Strict::Bool.enum(false).meta(omittable: true)
13
+ end
14
+ end
15
+ end
data/openapi.yml CHANGED
@@ -94,37 +94,16 @@ paths:
94
94
  components:
95
95
  schemas:
96
96
  Access:
97
- description: Access metadata for collections
98
97
  type: object
99
- additionalProperties: false
100
- properties:
101
- access:
102
- description: Access level
103
- type: string
104
- enum:
105
- - 'world'
106
- - 'stanford'
107
- - 'location-based'
108
- - 'citation-only'
109
- - 'dark'
110
- default: 'dark'
111
- readLocation:
112
- description: If access is "location-based", which location should have access.
113
- type: string
114
- enum:
115
- - 'spec'
116
- - 'music'
117
- - 'ars'
118
- - 'art'
119
- - 'hoover'
120
- - 'm&m'
121
- useAndReproductionStatement:
122
- description: The human readable use and reproduction statement that applies
123
- example: Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Public Services Librarian of the Dept. of Special Collections (http://library.stanford.edu/spc).
124
- type: string
125
- license:
126
- description: The license governing reuse of the Collection. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
127
- type: string
98
+ oneOf:
99
+ # Being first, makes DarkAccess the default.
100
+ - $ref: '#/components/schemas/DarkAccess'
101
+ - $ref: '#/components/schemas/CitationOnlyAccess'
102
+ - $ref: '#/components/schemas/ControlledDigitalLendingAccess'
103
+ - $ref: '#/components/schemas/LocationBasedAccess'
104
+ - $ref: '#/components/schemas/LocationBasedDownloadAccess'
105
+ - $ref: '#/components/schemas/StanfordAccess'
106
+ - $ref: '#/components/schemas/WorldAccess'
128
107
  AccessRole:
129
108
  description: Access role conferred by an AdminPolicy to objects within it. (used by Argo)
130
109
  type: object
@@ -271,6 +250,7 @@ components:
271
250
  description: The human readable copyright statement that applies
272
251
  example: Copyright World Trade Organization
273
252
  type: string
253
+ nullable: true
274
254
  download:
275
255
  description: >
276
256
  Download access level. This is used in the transition from Fedora as
@@ -290,6 +270,7 @@ components:
290
270
  readLocation at registration that is copied down to all the files.
291
271
 
292
272
  type: string
273
+ nullable: true
293
274
  enum:
294
275
  - 'spec'
295
276
  - 'music'
@@ -301,9 +282,11 @@ components:
301
282
  description: The human readable use and reproduction statement that applies
302
283
  example: Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Public Services Librarian of the Dept. of Special Collections (http://library.stanford.edu/spc).
303
284
  type: string
285
+ nullable: true
304
286
  license:
305
287
  description: The license governing reuse of the Collection. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
306
288
  type: string
289
+ nullable: true
307
290
  AppliesTo:
308
291
  description: Property model for indicating the parts, aspects, or versions of the resource to which a
309
292
  descriptive element is applicable.
@@ -345,6 +328,33 @@ components:
345
328
  type: string
346
329
  pattern: '^[0-9]+-[0-9]+$'
347
330
  example: 6772719-1001
331
+ CitationOnlyAccess:
332
+ type: object
333
+ properties:
334
+ access:
335
+ description: Access level.
336
+ type: string
337
+ enum:
338
+ - citation-only
339
+ download:
340
+ description: Download access level.
341
+ type: string
342
+ enum:
343
+ - 'none'
344
+ readLocation:
345
+ description: If access is "location-based", which location should have access.
346
+ type: string
347
+ nullable: true
348
+ enum:
349
+ - null
350
+ controlledDigitalLending:
351
+ type: boolean
352
+ default: false
353
+ enum:
354
+ - false
355
+ required:
356
+ - access
357
+ - download
348
358
  Collection:
349
359
  description: A group of Digital Repository Objects that indicate some type of conceptual grouping within the domain that is worth reusing across the system.
350
360
  type: object
@@ -369,7 +379,7 @@ components:
369
379
  description: Version for the Collection within SDR.
370
380
  type: integer
371
381
  access:
372
- $ref: '#/components/schemas/Access'
382
+ $ref: '#/components/schemas/CollectionAccess'
373
383
  administrative:
374
384
  $ref: '#/components/schemas/Administrative'
375
385
  description:
@@ -382,6 +392,29 @@ components:
382
392
  - type
383
393
  - version
384
394
  - access
395
+ CollectionAccess:
396
+ description: Access metadata for collections
397
+ type: object
398
+ additionalProperties: false
399
+ properties:
400
+ access:
401
+ description: Access level
402
+ type: string
403
+ enum:
404
+ - 'world'
405
+ - 'dark'
406
+ default: 'dark'
407
+ copyright:
408
+ description: The human readable copyright statement that applies
409
+ example: Copyright World Trade Organization
410
+ type: string
411
+ useAndReproductionStatement:
412
+ description: The human readable use and reproduction statement that applies
413
+ example: Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Public Services Librarian of the Dept. of Special Collections (http://library.stanford.edu/spc).
414
+ type: string
415
+ license:
416
+ description: The license governing reuse of the Collection. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
417
+ type: string
385
418
  CollectionIdentification:
386
419
  type: object
387
420
  additionalProperties: false
@@ -434,6 +467,60 @@ components:
434
467
  type: array
435
468
  items:
436
469
  $ref: "#/components/schemas/DescriptiveParallelContributor"
470
+ ControlledDigitalLendingAccess:
471
+ type: object
472
+ properties:
473
+ access:
474
+ description: Access level.
475
+ type: string
476
+ enum:
477
+ - stanford
478
+ download:
479
+ description: Download access level.
480
+ type: string
481
+ enum:
482
+ - none
483
+ readLocation:
484
+ description: If access is "location-based", which location should have access.
485
+ type: string
486
+ nullable: true
487
+ enum:
488
+ - null
489
+ controlledDigitalLending:
490
+ description: Available for controlled digital lending.
491
+ type: boolean
492
+ default: false
493
+ required:
494
+ - access
495
+ - download
496
+ - controlledDigitalLending
497
+ DarkAccess:
498
+ type: object
499
+ properties:
500
+ access:
501
+ description: Access level.
502
+ type: string
503
+ default: 'dark'
504
+ enum:
505
+ - dark
506
+ download:
507
+ description: Download access level.
508
+ type: string
509
+ default: 'none'
510
+ enum:
511
+ - 'none'
512
+ readLocation:
513
+ description: If access is "location-based", which location should have access.
514
+ type: string
515
+ nullable: true
516
+ default: null
517
+ enum:
518
+ - null
519
+ controlledDigitalLending:
520
+ type: boolean
521
+ default: false
522
+ enum:
523
+ - false
437
524
  Description:
438
525
  type: object
439
526
  additionalProperties: false
@@ -840,60 +927,23 @@ components:
840
927
  DROAccess:
841
928
  type: object
842
929
  additionalProperties: false
843
- properties:
844
- access:
845
- type: string
846
- enum:
847
- - 'world'
848
- - 'stanford'
849
- - 'location-based'
850
- - 'citation-only'
851
- - 'dark'
852
- default: 'dark'
853
- controlledDigitalLending:
854
- description: Available for controlled digital lending.
855
- type: boolean
856
- default: false
857
- copyright:
858
- description: The human readable copyright statement that applies
859
- example: Copyright World Trade Organization
860
- type: string
861
- embargo:
862
- $ref: '#/components/schemas/Embargo'
863
- download:
864
- description: >
865
- Download access level. This is used in the transition from Fedora as
866
- a way to set a default download level at registration that is copied
867
- down to all the files.
868
-
869
- type: string
870
- enum:
871
- - 'world'
872
- - 'stanford'
873
- - 'location-based'
874
- - 'none'
875
- default: 'none'
876
- readLocation:
877
- description: >
878
- If access is "location-based", which location should have access.
879
- This is used in the transition from Fedora as a way to set a default
880
- readLocation at registration that is copied down to all the files.
881
-
882
- type: string
883
- enum:
884
- - 'spec'
885
- - 'music'
886
- - 'ars'
887
- - 'art'
888
- - 'hoover'
889
- - 'm&m'
890
- useAndReproductionStatement:
891
- description: The human readable use and reproduction statement that applies
892
- example: Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Public Services Librarian of the Dept. of Special Collections (http://library.stanford.edu/spc).
893
- type: string
894
- license:
895
- description: The license governing reuse of the DRO. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
896
- type: string
930
+ allOf:
931
+ - $ref: "#/components/schemas/Access"
932
+ - type: object
933
+ properties:
934
+ copyright:
935
+ description: The human readable copyright statement that applies
936
+ example: Copyright World Trade Organization
937
+ type: string
938
+ embargo:
939
+ $ref: '#/components/schemas/Embargo'
940
+ useAndReproductionStatement:
941
+ description: The human readable use and reproduction statement that applies
942
+ example: Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Public Services Librarian of the Dept. of Special Collections (http://library.stanford.edu/spc).
943
+ type: string
944
+ license:
945
+ description: The license governing reuse of the DRO. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
946
+ type: string
897
947
  DROStructural:
898
948
  description: Structural metadata
899
949
  type: object
@@ -924,28 +974,21 @@ components:
924
974
  Embargo:
925
975
  type: object
926
976
  additionalProperties: false
927
- properties:
928
- releaseDate:
929
- description: Date when the Collection is released from an embargo.
930
- type: string
931
- format: date-time
932
- example: '2029-06-22T07:00:00.000+00:00'
933
- access:
934
- description: Access level that applies when embargo expires.
935
- type: string
936
- enum:
937
- - world
938
- - stanford
939
- - location-based
940
- - citation-only
941
- - dark
942
- useAndReproductionStatement:
943
- description: The human readable use and reproduction statement that applies when the embargo expires.
944
- example: These materials are in the public domain.
945
- type: string
946
- required:
947
- - releaseDate
948
- - access
977
+ allOf:
978
+ - $ref: "#/components/schemas/Access"
979
+ - type: object
980
+ properties:
981
+ releaseDate:
982
+ description: Date when the Collection is released from an embargo.
983
+ type: string
984
+ format: date-time
985
+ example: '2029-06-22T07:00:00.000+00:00'
986
+ useAndReproductionStatement:
987
+ description: The human readable use and reproduction statement that applies when the embargo expires.
988
+ example: These materials are in the public domain.
989
+ type: string
990
+ required:
991
+ - releaseDate
949
992
  Event:
950
993
  description: Property model for describing events in the history of the resource.
951
994
  type: object
@@ -1048,40 +1091,14 @@ components:
1048
1091
  description: Access metadata for files
1049
1092
  type: object
1050
1093
  additionalProperties: false
1051
- properties:
1052
- access:
1053
- description: Access level
1054
- type: string
1055
- enum:
1056
- - 'world'
1057
- - 'stanford'
1058
- - 'location-based'
1059
- - 'citation-only'
1060
- - 'dark'
1061
- default: 'dark'
1062
- controlledDigitalLending:
1063
- description: Available for controlled digital lending.
1064
- type: boolean
1065
- default: false
1066
- download:
1067
- description: Download access level for a file
1068
- type: string
1069
- enum:
1070
- - 'world'
1071
- - 'stanford'
1072
- - 'location-based'
1073
- - 'none'
1074
- default: 'none'
1075
- readLocation:
1076
- description: If access is "location-based", which location should have access.
1077
- type: string
1078
- enum:
1079
- - 'spec'
1080
- - 'music'
1081
- - 'ars'
1082
- - 'art'
1083
- - 'hoover'
1084
- - 'm&m'
1094
+ oneOf:
1095
+ # Being first, makes DarkAccess the default.
1096
+ - $ref: '#/components/schemas/DarkAccess'
1097
+ - $ref: '#/components/schemas/ControlledDigitalLendingAccess'
1098
+ - $ref: '#/components/schemas/LocationBasedAccess'
1099
+ - $ref: '#/components/schemas/LocationBasedDownloadAccess'
1100
+ - $ref: '#/components/schemas/StanfordAccess'
1101
+ - $ref: '#/components/schemas/WorldAccess'
1085
1102
  FileAdministrative:
1086
1103
  type: object
1087
1104
  additionalProperties: false
@@ -1239,6 +1256,72 @@ components:
1239
1256
  valueLanguage:
1240
1257
  # description: present for mapping to additional schemas in the future and for consistency but not otherwise used
1241
1258
  $ref: "#/components/schemas/DescriptiveValueLanguage"
1259
+ LocationBasedAccess:
1260
+ type: object
1261
+ properties:
1262
+ access:
1263
+ description: Access level.
1264
+ type: string
1265
+ enum:
1266
+ - location-based
1267
+ download:
1268
+ description: Download access level.
1269
+ type: string
1270
+ enum:
1271
+ - location-based
1272
+ - none
1273
+ readLocation:
1274
+ description: If access is "location-based", which location should have access.
1275
+ type: string
1276
+ enum:
1277
+ - 'spec'
1278
+ - 'music'
1279
+ - 'ars'
1280
+ - 'art'
1281
+ - 'hoover'
1282
+ - 'm&m'
1283
+ controlledDigitalLending:
1284
+ type: boolean
1285
+ default: false
1286
+ enum:
1287
+ - false
1288
+ required:
1289
+ - access
1290
+ - download
1291
+ - readLocation
1292
+ LocationBasedDownloadAccess:
1293
+ type: object
1294
+ properties:
1295
+ access:
1296
+ description: Access level.
1297
+ type: string
1298
+ enum:
1299
+ - stanford
1300
+ - world
1301
+ download:
1302
+ description: Download access level.
1303
+ type: string
1304
+ enum:
1305
+ - location-based
1306
+ readLocation:
1307
+ description: If access is "location-based", which location should have access.
1308
+ type: string
1309
+ enum:
1310
+ - 'spec'
1311
+ - 'music'
1312
+ - 'ars'
1313
+ - 'art'
1314
+ - 'hoover'
1315
+ - 'm&m'
1316
+ controlledDigitalLending:
1317
+ type: boolean
1318
+ default: false
1319
+ enum:
1320
+ - false
1321
+ required:
1322
+ - access
1323
+ - download
1324
+ - readLocation
1242
1325
  MessageDigest:
1243
1326
  description: The output of the message digest algorithm.
1244
1327
  type: object
@@ -1416,7 +1499,7 @@ components:
1416
1499
  version:
1417
1500
  type: integer
1418
1501
  access:
1419
- $ref: '#/components/schemas/Access'
1502
+ $ref: '#/components/schemas/CollectionAccess'
1420
1503
  administrative:
1421
1504
  $ref: '#/components/schemas/Administrative'
1422
1505
  description:
@@ -1696,3 +1779,59 @@ components:
1696
1779
  - type: object
1697
1780
  required:
1698
1781
  - valueAt
1782
+ StanfordAccess:
1783
+ type: object
1784
+ properties:
1785
+ access:
1786
+ description: Access level.
1787
+ type: string
1788
+ enum:
1789
+ - stanford
1790
+ download:
1791
+ description: Download access level.
1792
+ type: string
1793
+ enum:
1794
+ - stanford
1795
+ readLocation:
1796
+ description: If access is "location-based", which location should have access.
1797
+ type: string
1798
+ nullable: true
1799
+ enum:
1800
+ - null
1801
+ controlledDigitalLending:
1802
+ type: boolean
1803
+ default: false
1804
+ enum:
1805
+ - false
1806
+ required:
1807
+ - access
1808
+ - download
1809
+ WorldAccess:
1810
+ type: object
1811
+ properties:
1812
+ access:
1813
+ description: Access level.
1814
+ type: string
1815
+ enum:
1816
+ - world
1817
+ download:
1818
+ description: Download access level.
1819
+ type: string
1820
+ enum:
1821
+ - none
1822
+ - stanford
1823
+ - world
1824
+ readLocation:
1825
+ description: If access is "location-based", which location should have access.
1826
+ type: string
1827
+ nullable: true
1828
+ enum:
1829
+ - null
1830
+ controlledDigitalLending:
1831
+ type: boolean
1832
+ default: false
1833
+ enum:
1834
+ - false
1835
+ required:
1836
+ - access
1837
+ - download
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.56.1
4
+ version: 0.59.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: 2021-03-18 00:00:00.000000000 Z
11
+ date: 2021-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -265,9 +265,13 @@ files:
265
265
  - lib/cocina/models/catalog_link.rb
266
266
  - lib/cocina/models/catkey_barcode.rb
267
267
  - lib/cocina/models/checkable.rb
268
+ - lib/cocina/models/citation_only_access.rb
268
269
  - lib/cocina/models/collection.rb
270
+ - lib/cocina/models/collection_access.rb
269
271
  - lib/cocina/models/collection_identification.rb
270
272
  - lib/cocina/models/contributor.rb
273
+ - lib/cocina/models/controlled_digital_lending_access.rb
274
+ - lib/cocina/models/dark_access.rb
271
275
  - lib/cocina/models/description.rb
272
276
  - lib/cocina/models/descriptive_access_metadata.rb
273
277
  - lib/cocina/models/descriptive_admin_metadata.rb
@@ -294,6 +298,8 @@ files:
294
298
  - lib/cocina/models/geographic.rb
295
299
  - lib/cocina/models/identification.rb
296
300
  - lib/cocina/models/language.rb
301
+ - lib/cocina/models/location_based_access.rb
302
+ - lib/cocina/models/location_based_download_access.rb
297
303
  - lib/cocina/models/message_digest.rb
298
304
  - lib/cocina/models/presentation.rb
299
305
  - lib/cocina/models/related_resource.rb
@@ -311,10 +317,12 @@ files:
311
317
  - lib/cocina/models/source_id.rb
312
318
  - lib/cocina/models/standard.rb
313
319
  - lib/cocina/models/standard_barcode.rb
320
+ - lib/cocina/models/stanford_access.rb
314
321
  - lib/cocina/models/title.rb
315
322
  - lib/cocina/models/validator.rb
316
323
  - lib/cocina/models/version.rb
317
324
  - lib/cocina/models/vocab.rb
325
+ - lib/cocina/models/world_access.rb
318
326
  - openapi.yml
319
327
  homepage: https://github.com/sul-dlss/cocina-models
320
328
  licenses: []
@@ -334,7 +342,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
334
342
  - !ruby/object:Gem::Version
335
343
  version: '0'
336
344
  requirements: []
337
- rubygems_version: 3.1.4
345
+ rubygems_version: 3.0.3
338
346
  signing_key:
339
347
  specification_version: 4
340
348
  summary: Data models for the SDR