cocina-models 0.127.0 → 0.128.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: c9beced1e40bb48b8cb1b833da51b9205b5f454554c0385ad982c3f8bed648f8
4
- data.tar.gz: b94cfd3960e8bdd7ff896a3749b12c95ed1827bcf05cdf7a62d37c0e9f88d817
3
+ metadata.gz: e36b1b2a099fed16e2cc7c49b46479b80ce03f2ee65ef5a87ef49e9d74379ac6
4
+ data.tar.gz: 878705f40ff9598207bcee6a2e8ff0c89f5dbcc8e9bc9fc5c755642c93c30440
5
5
  SHA512:
6
- metadata.gz: 3accd9261f9215632a273525b0459e004db3cc0410bda7d455018e5042e1de908f87d7a13d1faa75c605c67c26b6437e0cc1c8dc6a8abda67fe5a6927bd71283
7
- data.tar.gz: 26c9d0be0086a3567d640760432dca23a4355e088b7368bc48db87023c4e6d915880c33b3ab4588be22b2ce84b49eed69eb30cf357f8dab1921ec9eece3cea1e
6
+ metadata.gz: 9ea6f8363bb8a487a0670c8c062859ee1c16f618f6a12e5224ee0eb4ee30ebb6165a124c2d478f4e34250e9b3655a95b8d9f503e38f6afea4c130dfd9d4b3de8
7
+ data.tar.gz: c0de7bb6610cfa67a118a4c847add1da3a4d395fb0b8325e9bd2020a88a9a8555afa04fabce3e860b21569e9741d38b5e89f0e64c47e32a7dec22165791b7261
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocina-models (0.127.0)
4
+ cocina-models (0.128.0)
5
5
  activesupport
6
6
  cocina_display
7
7
  deprecation
@@ -232,7 +232,7 @@ CHECKSUMS
232
232
  bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
233
233
  builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f
234
234
  bundler (4.0.15) sha256=a4ceb882fe94a0e0ac63cd0813932bbfd631a14e5ac0b7975189b19a4d28d9e7
235
- cocina-models (0.127.0)
235
+ cocina-models (0.128.0)
236
236
  cocina_display (2.8.0) sha256=89722e8e204c07cfa38f3deacbd66d42f3db9c7b29fdc034973d847cf93c4995
237
237
  concurrent-ruby (1.3.7) sha256=4412caec3a5ea2e5fdc52076724c071a81f2c0593d83b2ac8cbb8ca63b3151b0
238
238
  connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
@@ -6,6 +6,17 @@ module Cocina
6
6
  # an AdminPolicy. This is almost the same as DROAccess, but it provides no defaults
7
7
  # and has no embargo.
8
8
  class AdminPolicyAccessTemplate < Struct
9
+ # Access level.
10
+ # Validation of this property is relaxed. See the schema.json for full validation.
11
+ attribute? :view, Types::Strict::String.optional.default('dark')
12
+ # Download access level.
13
+ # Validation of this property is relaxed. See the schema.json for full validation.
14
+ attribute? :download, Types::Strict::String.optional.default('none')
15
+ # Not used for this access type, must be null.
16
+ # Validation of this property is relaxed. See the schema.json for full validation.
17
+ attribute? :location, Types::Strict::String.optional
18
+ # Validation of this property is relaxed. See the schema.json for full validation.
19
+ attribute? :controlledDigitalLending, Types::Strict::Bool.optional.default(false)
9
20
  # The human readable copyright statement that applies
10
21
  # example: Copyright World Trade Organization
11
22
  attribute? :copyright, Copyright.optional
@@ -18,17 +29,6 @@ module Cocina
18
29
  # The license governing reuse of the DRO. Should be an IRI for known licenses (i.e.
19
30
  # CC, RightsStatement.org URI, etc.).
20
31
  attribute? :license, License.optional.enum(nil, 'https://www.gnu.org/licenses/agpl.txt', 'https://www.apache.org/licenses/LICENSE-2.0', 'https://opensource.org/licenses/BSD-2-Clause', 'https://opensource.org/licenses/BSD-3-Clause', 'https://creativecommons.org/licenses/by/4.0/legalcode', 'https://creativecommons.org/licenses/by-nc/4.0/legalcode', 'https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode', 'https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode', 'https://creativecommons.org/licenses/by-nd/4.0/legalcode', 'https://creativecommons.org/licenses/by-sa/4.0/legalcode', 'https://creativecommons.org/publicdomain/zero/1.0/legalcode', 'https://opensource.org/licenses/cddl1', 'https://www.eclipse.org/legal/epl-2.0', 'https://www.gnu.org/licenses/gpl-3.0-standalone.html', 'https://www.isc.org/downloads/software-support-policy/isc-license/', 'https://www.gnu.org/licenses/lgpl-3.0-standalone.html', 'https://opensource.org/licenses/MIT', 'https://www.mozilla.org/MPL/2.0/', 'https://opendatacommons.org/licenses/by/1-0/', 'http://opendatacommons.org/licenses/odbl/1.0/', 'https://opendatacommons.org/licenses/odbl/1-0/', 'https://creativecommons.org/publicdomain/mark/1.0/', 'https://opendatacommons.org/licenses/pddl/1-0/', 'https://creativecommons.org/licenses/by/3.0/legalcode', 'https://creativecommons.org/licenses/by-sa/3.0/legalcode', 'https://creativecommons.org/licenses/by-nd/3.0/legalcode', 'https://creativecommons.org/licenses/by-nc/3.0/legalcode', 'https://creativecommons.org/licenses/by-nc-sa/3.0/legalcode', 'https://creativecommons.org/licenses/by-nc-nd/3.0/legalcode', 'https://cocina.sul.stanford.edu/licenses/none')
21
- # Access level.
22
- # Validation of this property is relaxed. See the schema.json for full validation.
23
- attribute? :view, Types::Strict::String.optional.default('dark')
24
- # Download access level.
25
- # Validation of this property is relaxed. See the schema.json for full validation.
26
- attribute? :download, Types::Strict::String.optional.default('none')
27
- # Not used for this access type, must be null.
28
- # Validation of this property is relaxed. See the schema.json for full validation.
29
- attribute? :location, Types::Strict::String.optional
30
- # Validation of this property is relaxed. See the schema.json for full validation.
31
- attribute? :controlledDigitalLending, Types::Strict::Bool.optional.default(false)
32
32
  end
33
33
  end
34
34
  end
@@ -2,10 +2,44 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- # Property model for indicating the parts, aspects, or versions of the resource to
6
- # which a descriptive element is applicable.
5
+ # Value model for appliesTo property.
7
6
  class AppliesTo < Struct
8
- attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).default([].freeze)
7
+ attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
8
+ attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
9
+ attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
10
+ # String or integer value of the descriptive element.
11
+ attribute? :value, Types::Nominal::Any
12
+ # Type of value provided by the descriptive element. See https://github.com/sul-dlss/cocina-models/blob/main/docs/description_types.md
13
+ # for valid types.
14
+ attribute? :type, Types::Strict::String
15
+ # Status of the descriptive element value relative to other instances of the element.
16
+ attribute? :status, Types::Strict::String
17
+ # Code value of the descriptive element.
18
+ attribute? :code, Types::Strict::String
19
+ # URI value of the descriptive element.
20
+ attribute? :uri, Types::Strict::String
21
+ # Property model for indicating the encoding, standard, or syntax to which a value
22
+ # conforms (e.g. RDA).
23
+ attribute? :standard, Standard.optional
24
+ # Property model for indicating the encoding, standard, or syntax to which a value
25
+ # conforms (e.g. RDA).
26
+ attribute? :encoding, Standard.optional
27
+ # Property model for indicating the vocabulary, authority, or other origin for a term,
28
+ # code, or identifier.
29
+ attribute? :source, Source.optional
30
+ # The preferred display label to use for the descriptive element in access systems.
31
+ attribute? :displayLabel, Types::Strict::String.optional
32
+ # A term providing information about the circumstances of the statement (e.g., approximate
33
+ # dates).
34
+ attribute? :qualifier, Types::Strict::String
35
+ # Other information related to the descriptive element.
36
+ attribute :note, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
37
+ # Language of the descriptive element value
38
+ attribute? :valueLanguage, DescriptiveValueLanguage.optional
39
+ # URL or other pointer to the location of the value of the descriptive element.
40
+ attribute? :valueAt, Types::Strict::String
41
+ # Identifiers and URIs associated with the descriptive element.
42
+ attribute :identifier, Types::Strict::Array.of(DescriptiveIdentifier).default([].freeze)
9
43
  end
10
44
  end
11
45
  end
@@ -3,7 +3,7 @@
3
3
  module Cocina
4
4
  module Models
5
5
  # Basic value model for descriptive elements. Can only have one of value, parallelValue,
6
- # groupedValue, or structuredValue.
6
+ # groupedValue, or structuredValue. Does not have identifier or appliesTo properties.
7
7
  class DescriptiveBasicValue < Struct
8
8
  attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
9
9
  attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
@@ -25,8 +25,6 @@ module Cocina
25
25
  # Property model for indicating the encoding, standard, or syntax to which a value
26
26
  # conforms (e.g. RDA).
27
27
  attribute? :encoding, Standard.optional
28
- # Identifiers and URIs associated with the descriptive element.
29
- attribute :identifier, Types::Strict::Array.of(DescriptiveIdentifier).default([].freeze)
30
28
  # Property model for indicating the vocabulary, authority, or other origin for a term,
31
29
  # code, or identifier.
32
30
  attribute? :source, Source.optional
@@ -2,10 +2,8 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- # Value model for descriptive identifiers. Same as DescriptiveValue but omits the identifier
6
- # property to prevent infinite recursion.
5
+ # Default value model for identifiers.
7
6
  class DescriptiveIdentifier < Struct
8
- attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).default([].freeze)
9
7
  attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
10
8
  attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
11
9
  attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
@@ -40,6 +38,7 @@ module Cocina
40
38
  attribute? :valueLanguage, DescriptiveValueLanguage.optional
41
39
  # URL or other pointer to the location of the value of the descriptive element.
42
40
  attribute? :valueAt, Types::Strict::String
41
+ attribute :appliesTo, Types::Strict::Array.of(AppliesTo).default([].freeze)
43
42
  end
44
43
  end
45
44
  end
@@ -4,7 +4,6 @@ module Cocina
4
4
  module Models
5
5
  # Default value model for descriptive elements.
6
6
  class DescriptiveValue < Struct
7
- attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).default([].freeze)
8
7
  attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
9
8
  attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
10
9
  attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
@@ -25,8 +24,6 @@ module Cocina
25
24
  # Property model for indicating the encoding, standard, or syntax to which a value
26
25
  # conforms (e.g. RDA).
27
26
  attribute? :encoding, Standard.optional
28
- # Identifiers and URIs associated with the descriptive element.
29
- attribute :identifier, Types::Strict::Array.of(DescriptiveIdentifier).default([].freeze)
30
27
  # Property model for indicating the vocabulary, authority, or other origin for a term,
31
28
  # code, or identifier.
32
29
  attribute? :source, Source.optional
@@ -41,6 +38,9 @@ module Cocina
41
38
  attribute? :valueLanguage, DescriptiveValueLanguage.optional
42
39
  # URL or other pointer to the location of the value of the descriptive element.
43
40
  attribute? :valueAt, Types::Strict::String
41
+ attribute :appliesTo, Types::Strict::Array.of(AppliesTo).default([].freeze)
42
+ # Identifiers and URIs associated with the descriptive element.
43
+ attribute :identifier, Types::Strict::Array.of(DescriptiveIdentifier).default([].freeze)
44
44
  end
45
45
  end
46
46
  end
@@ -3,6 +3,17 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class DROAccess < Struct
6
+ # Access level.
7
+ # Validation of this property is relaxed. See the schema.json for full validation.
8
+ attribute? :view, Types::Strict::String.optional.default('dark')
9
+ # Download access level.
10
+ # Validation of this property is relaxed. See the schema.json for full validation.
11
+ attribute? :download, Types::Strict::String.optional.default('none')
12
+ # Not used for this access type, must be null.
13
+ # Validation of this property is relaxed. See the schema.json for full validation.
14
+ attribute? :location, Types::Strict::String.optional
15
+ # Validation of this property is relaxed. See the schema.json for full validation.
16
+ attribute? :controlledDigitalLending, Types::Strict::Bool.optional.default(false)
6
17
  # The human readable copyright statement that applies
7
18
  # example: Copyright World Trade Organization
8
19
  attribute? :copyright, Copyright.optional
@@ -16,17 +27,6 @@ module Cocina
16
27
  # The license governing reuse of the DRO. Should be an IRI for known licenses (i.e.
17
28
  # CC, RightsStatement.org URI, etc.).
18
29
  attribute? :license, License.optional.enum(nil, 'https://www.gnu.org/licenses/agpl.txt', 'https://www.apache.org/licenses/LICENSE-2.0', 'https://opensource.org/licenses/BSD-2-Clause', 'https://opensource.org/licenses/BSD-3-Clause', 'https://creativecommons.org/licenses/by/4.0/legalcode', 'https://creativecommons.org/licenses/by-nc/4.0/legalcode', 'https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode', 'https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode', 'https://creativecommons.org/licenses/by-nd/4.0/legalcode', 'https://creativecommons.org/licenses/by-sa/4.0/legalcode', 'https://creativecommons.org/publicdomain/zero/1.0/legalcode', 'https://opensource.org/licenses/cddl1', 'https://www.eclipse.org/legal/epl-2.0', 'https://www.gnu.org/licenses/gpl-3.0-standalone.html', 'https://www.isc.org/downloads/software-support-policy/isc-license/', 'https://www.gnu.org/licenses/lgpl-3.0-standalone.html', 'https://opensource.org/licenses/MIT', 'https://www.mozilla.org/MPL/2.0/', 'https://opendatacommons.org/licenses/by/1-0/', 'http://opendatacommons.org/licenses/odbl/1.0/', 'https://opendatacommons.org/licenses/odbl/1-0/', 'https://creativecommons.org/publicdomain/mark/1.0/', 'https://opendatacommons.org/licenses/pddl/1-0/', 'https://creativecommons.org/licenses/by/3.0/legalcode', 'https://creativecommons.org/licenses/by-sa/3.0/legalcode', 'https://creativecommons.org/licenses/by-nd/3.0/legalcode', 'https://creativecommons.org/licenses/by-nc/3.0/legalcode', 'https://creativecommons.org/licenses/by-nc-sa/3.0/legalcode', 'https://creativecommons.org/licenses/by-nc-nd/3.0/legalcode', 'https://cocina.sul.stanford.edu/licenses/none')
19
- # Access level.
20
- # Validation of this property is relaxed. See the schema.json for full validation.
21
- attribute? :view, Types::Strict::String.optional.default('dark')
22
- # Download access level.
23
- # Validation of this property is relaxed. See the schema.json for full validation.
24
- attribute? :download, Types::Strict::String.optional.default('none')
25
- # Not used for this access type, must be null.
26
- # Validation of this property is relaxed. See the schema.json for full validation.
27
- attribute? :location, Types::Strict::String.optional
28
- # Validation of this property is relaxed. See the schema.json for full validation.
29
- attribute? :controlledDigitalLending, Types::Strict::Bool.optional.default(false)
30
30
  end
31
31
  end
32
32
  end
@@ -5,7 +5,7 @@ module Cocina
5
5
  # Languages, scripts, symbolic systems, and notations used in all or part of a resource
6
6
  # or its descriptive metadata.
7
7
  class Language < Struct
8
- attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).default([].freeze)
8
+ attribute :appliesTo, Types::Strict::Array.of(AppliesTo).default([].freeze)
9
9
  # Code value of the descriptive element.
10
10
  attribute? :code, Types::Strict::String
11
11
  # The preferred display label to use for the descriptive element in access systems.
@@ -37,8 +37,10 @@ module Cocina
37
37
  @notifier = notifier
38
38
  end
39
39
 
40
+ # @param [Boolean] include_related_resource whether to map nested relatedItem elements;
41
+ # false when building a relatedItem, since RelatedResource cannot itself nest a relatedResource
40
42
  # @return [Hash] a hash that can be mapped to a cocina description model
41
- def build(resource_element:, purl: nil, require_title: true)
43
+ def build(resource_element:, purl: nil, require_title: true, include_related_resource: true)
42
44
  cocina_description = {}
43
45
  title_result = @title_builder.build(resource_element: resource_element, require_title: require_title,
44
46
  notifier: notifier)
@@ -47,7 +49,8 @@ module Cocina
47
49
  purl_value = purl || Purl.primary_purl_value(resource_element, purl)
48
50
  cocina_description[:purl] = purl_value if purl_value
49
51
 
50
- BUILDERS.each do |description_property, builder|
52
+ builders = include_related_resource ? BUILDERS : BUILDERS.except(:relatedResource)
53
+ builders.each do |description_property, builder|
51
54
  result = builder.build(resource_element: resource_element, description_builder: self,
52
55
  purl: purl_value)
53
56
  cocina_description.merge!(description_property => result) if result.present?
@@ -80,7 +80,8 @@ module Cocina
80
80
  end
81
81
 
82
82
  def build_related_item(related_item)
83
- description_builder.build(resource_element: related_item, require_title: false).tap do |item|
83
+ description_builder.build(resource_element: related_item, require_title: false,
84
+ include_related_resource: false).tap do |item|
84
85
  item[:displayLabel] = related_item['displayLabel']
85
86
  if related_item['type']
86
87
  item[:type] = normalized_type_for(related_item['type'])
@@ -38,8 +38,6 @@ module Cocina
38
38
  attribute? :purl, Purl.optional
39
39
  # Information about how to access digital and physical versions of the object.
40
40
  attribute? :access, DescriptiveAccessMetadata.optional
41
- # Other resources associated with the related resource.
42
- attribute :relatedResource, Types::Strict::Array.of(RelatedResource).default([].freeze)
43
41
  # Information about this resource description.
44
42
  attribute? :adminMetadata, DescriptiveAdminMetadata.optional
45
43
  # The version of the related resource.
@@ -3,7 +3,6 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class Title < Struct
6
- attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).default([].freeze)
7
6
  attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
8
7
  attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
9
8
  attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
@@ -24,8 +23,6 @@ module Cocina
24
23
  # Property model for indicating the encoding, standard, or syntax to which a value
25
24
  # conforms (e.g. RDA).
26
25
  attribute? :encoding, Standard.optional
27
- # Identifiers and URIs associated with the descriptive element.
28
- attribute :identifier, Types::Strict::Array.of(DescriptiveIdentifier).default([].freeze)
29
26
  # Property model for indicating the vocabulary, authority, or other origin for a term,
30
27
  # code, or identifier.
31
28
  attribute? :source, Source.optional
@@ -40,6 +37,9 @@ module Cocina
40
37
  attribute? :valueLanguage, DescriptiveValueLanguage.optional
41
38
  # URL or other pointer to the location of the value of the descriptive element.
42
39
  attribute? :valueAt, Types::Strict::String
40
+ attribute :appliesTo, Types::Strict::Array.of(AppliesTo).default([].freeze)
41
+ # Identifiers and URIs associated with the descriptive element.
42
+ attribute :identifier, Types::Strict::Array.of(DescriptiveIdentifier).default([].freeze)
43
43
  end
44
44
  end
45
45
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.127.0'
5
+ VERSION = '0.128.0'
6
6
  end
7
7
  end
@@ -48,7 +48,6 @@ module Cocina
48
48
  type: Cocina::Models::ObjectType.object,
49
49
  id: 'druid:bc234fg5678',
50
50
  version: 1,
51
- label: 'factory DRO label',
52
51
  title: 'factory DRO title',
53
52
  source_id: 'sul:1234',
54
53
  admin_policy_id: 'druid:hv992ry2431'
@@ -60,7 +59,6 @@ module Cocina
60
59
  type: Cocina::Models::ObjectType.collection,
61
60
  id: 'druid:bb222ff5555',
62
61
  version: 1,
63
- label: 'factory collection label',
64
62
  title: 'factory collection title',
65
63
  admin_policy_id: 'druid:hv992ry2431',
66
64
  source_id: 'sulcollection:1234'
@@ -72,7 +70,6 @@ module Cocina
72
70
  type: Cocina::Models::ObjectType.admin_policy,
73
71
  id: 'druid:cb432gf8765',
74
72
  version: 1,
75
- label: 'factory APO label',
76
73
  title: 'factory APO title',
77
74
  admin_policy_id: 'druid:hv992ry2431',
78
75
  agreement_id: 'druid:hp308wm0436'
@@ -97,12 +94,11 @@ module Cocina
97
94
  end
98
95
 
99
96
  # rubocop:disable Metrics/ParameterLists
100
- def self.build_request_dro_properties(type:, version:, label:, title:, source_id:, admin_policy_id:,
97
+ def self.build_request_dro_properties(type:, version:, title:, source_id:, admin_policy_id:,
101
98
  barcode: nil, catkeys: [], folio_instance_hrids: [], collection_ids: [])
102
99
  {
103
100
  type: type,
104
101
  version: version,
105
- label: label,
106
102
  access: {},
107
103
  administrative: { hasAdminPolicy: admin_policy_id },
108
104
  description: {
@@ -143,12 +139,11 @@ module Cocina
143
139
  end
144
140
 
145
141
  # rubocop:disable Metrics/ParameterLists
146
- def self.build_request_collection_properties(type:, version:, label:, title:, admin_policy_id:, source_id: nil,
142
+ def self.build_request_collection_properties(type:, version:, title:, admin_policy_id:, source_id: nil,
147
143
  catkeys: [], folio_instance_hrids: [])
148
144
  {
149
145
  type: type,
150
146
  version: version,
151
- label: label,
152
147
  access: {},
153
148
  administrative: { hasAdminPolicy: admin_policy_id },
154
149
  description: {
@@ -204,7 +199,7 @@ module Cocina
204
199
  end
205
200
 
206
201
  # rubocop:disable Metrics/ParameterLists
207
- def self.build_request_admin_policy_properties(type:, version:, label:, title:,
202
+ def self.build_request_admin_policy_properties(type:, version:, title:,
208
203
  admin_policy_id:, agreement_id:,
209
204
  use_statement: nil, copyright: nil, license: nil,
210
205
  registration_workflow: nil, collections_for_registration: nil,
@@ -212,7 +207,6 @@ module Cocina
212
207
  {
213
208
  type: type,
214
209
  version: version,
215
- label: label,
216
210
  administrative: {
217
211
  hasAdminPolicy: admin_policy_id,
218
212
  hasAgreement: agreement_id,
data/schema.json CHANGED
@@ -155,19 +155,22 @@
155
155
  "allOf": [
156
156
  {
157
157
  "$ref": "#/$defs/Access"
158
- }
159
- ],
160
- "properties": {
161
- "copyright": {
162
- "$ref": "#/$defs/Copyright"
163
- },
164
- "useAndReproductionStatement": {
165
- "$ref": "#/$defs/UseAndReproductionStatement"
166
158
  },
167
- "license": {
168
- "$ref": "#/$defs/License"
159
+ {
160
+ "type": "object",
161
+ "properties": {
162
+ "copyright": {
163
+ "$ref": "#/$defs/Copyright"
164
+ },
165
+ "useAndReproductionStatement": {
166
+ "$ref": "#/$defs/UseAndReproductionStatement"
167
+ },
168
+ "license": {
169
+ "$ref": "#/$defs/License"
170
+ }
171
+ }
169
172
  }
170
- },
173
+ ],
171
174
  "unevaluatedProperties": false
172
175
  },
173
176
  "AdminPolicyAdministrative": {
@@ -230,18 +233,6 @@
230
233
  ],
231
234
  "unevaluatedProperties": false
232
235
  },
233
- "AppliesTo": {
234
- "description": "Property model for indicating the parts, aspects, or versions of the resource to which a descriptive element is applicable.",
235
- "type": "object",
236
- "properties": {
237
- "appliesTo": {
238
- "type": "array",
239
- "items": {
240
- "$ref": "#/$defs/DescriptiveBasicValue"
241
- }
242
- }
243
- }
244
- },
245
236
  "Barcode": {
246
237
  "description": "A barcode",
247
238
  "oneOf": [
@@ -262,6 +253,28 @@
262
253
  }
263
254
  ]
264
255
  },
256
+ "AppliesTo": {
257
+ "description": "Value model for appliesTo property.",
258
+ "type": "object",
259
+ "allOf": [
260
+ {
261
+ "$ref": "#/$defs/DescriptiveBasicValue"
262
+ },
263
+ {
264
+ "type": "object",
265
+ "properties": {
266
+ "identifier": {
267
+ "description": "Identifiers and URIs associated with the descriptive element.",
268
+ "type": "array",
269
+ "items": {
270
+ "$ref": "#/$defs/DescriptiveIdentifier"
271
+ }
272
+ }
273
+ }
274
+ }
275
+ ],
276
+ "unevaluatedProperties": false
277
+ },
265
278
  "BusinessBarcode": {
266
279
  "description": "The barcode associated with a business library DRO, prefixed with 2050",
267
280
  "type": "string",
@@ -672,23 +685,26 @@
672
685
  },
673
686
  "DROAccess": {
674
687
  "type": "object",
675
- "properties": {
676
- "copyright": {
677
- "$ref": "#/$defs/Copyright"
678
- },
679
- "embargo": {
680
- "$ref": "#/$defs/Embargo"
681
- },
682
- "useAndReproductionStatement": {
683
- "$ref": "#/$defs/UseAndReproductionStatement"
684
- },
685
- "license": {
686
- "$ref": "#/$defs/License"
687
- }
688
- },
689
688
  "allOf": [
690
689
  {
691
690
  "$ref": "#/$defs/Access"
691
+ },
692
+ {
693
+ "type": "object",
694
+ "properties": {
695
+ "copyright": {
696
+ "$ref": "#/$defs/Copyright"
697
+ },
698
+ "embargo": {
699
+ "$ref": "#/$defs/Embargo"
700
+ },
701
+ "useAndReproductionStatement": {
702
+ "$ref": "#/$defs/UseAndReproductionStatement"
703
+ },
704
+ "license": {
705
+ "$ref": "#/$defs/License"
706
+ }
707
+ }
692
708
  }
693
709
  ],
694
710
  "unevaluatedProperties": false
@@ -1073,7 +1089,7 @@
1073
1089
  "unevaluatedProperties": false
1074
1090
  },
1075
1091
  "DescriptiveBasicValue": {
1076
- "description": "Basic value model for descriptive elements. Can only have one of value, parallelValue, groupedValue, or structuredValue.",
1092
+ "description": "Basic value model for descriptive elements. Can only have one of value, parallelValue, groupedValue, or structuredValue. Does not have identifier or appliesTo properties.",
1077
1093
  "type": "object",
1078
1094
  "allOf": [
1079
1095
  {
@@ -1118,13 +1134,6 @@
1118
1134
  "encoding": {
1119
1135
  "$ref": "#/$defs/Standard"
1120
1136
  },
1121
- "identifier": {
1122
- "description": "Identifiers and URIs associated with the descriptive element.",
1123
- "type": "array",
1124
- "items": {
1125
- "$ref": "#/$defs/DescriptiveIdentifier"
1126
- }
1127
- },
1128
1137
  "source": {
1129
1138
  "$ref": "#/$defs/Source"
1130
1139
  },
@@ -1203,7 +1212,7 @@
1203
1212
  "required": ["groupedValue"],
1204
1213
  "properties": {
1205
1214
  "groupedValue": {
1206
- "minItems": 2
1215
+ "minItems": 1
1207
1216
  }
1208
1217
  }
1209
1218
  }
@@ -1349,181 +1358,49 @@
1349
1358
  }
1350
1359
  }
1351
1360
  },
1352
- "DescriptiveValue": {
1353
- "description": "Default value model for descriptive elements.",
1361
+ "DescriptiveIdentifier": {
1362
+ "description": "Default value model for identifiers.",
1354
1363
  "type": "object",
1355
- "properties": {
1356
- "appliesTo": {
1357
- "type": "array",
1358
- "items": {
1359
- "$ref": "#/$defs/DescriptiveBasicValue"
1360
- }
1361
- }
1362
- },
1363
1364
  "allOf": [
1364
1365
  {
1365
- "$ref": "#/$defs/DescriptiveStructuredValue"
1366
- },
1367
- {
1368
- "$ref": "#/$defs/DescriptiveParallelValue"
1369
- },
1370
- {
1371
- "$ref": "#/$defs/DescriptiveGroupedValue"
1366
+ "$ref": "#/$defs/DescriptiveBasicValue"
1372
1367
  },
1373
1368
  {
1374
1369
  "type": "object",
1375
1370
  "properties": {
1376
- "value": {
1377
- "description": "String or integer value of the descriptive element.",
1378
- "oneOf": [
1379
- {
1380
- "type": "string"
1381
- }
1382
- ]
1383
- },
1384
- "type": {
1385
- "description": "Type of value provided by the descriptive element. See https://github.com/sul-dlss/cocina-models/blob/main/docs/description_types.md for valid types.",
1386
- "type": "string"
1387
- },
1388
- "status": {
1389
- "description": "Status of the descriptive element value relative to other instances of the element.",
1390
- "type": "string"
1391
- },
1392
- "code": {
1393
- "description": "Code value of the descriptive element.",
1394
- "type": "string"
1395
- },
1396
- "uri": {
1397
- "description": "URI value of the descriptive element.",
1398
- "type": "string"
1399
- },
1400
- "standard": {
1401
- "$ref": "#/$defs/Standard"
1402
- },
1403
- "encoding": {
1404
- "$ref": "#/$defs/Standard"
1405
- },
1406
- "identifier": {
1407
- "description": "Identifiers and URIs associated with the descriptive element.",
1408
- "type": "array",
1409
- "items": {
1410
- "$ref": "#/$defs/DescriptiveIdentifier"
1411
- }
1412
- },
1413
- "source": {
1414
- "$ref": "#/$defs/Source"
1415
- },
1416
- "displayLabel": {
1417
- "description": "The preferred display label to use for the descriptive element in access systems.",
1418
- "type": [
1419
- "string",
1420
- "null"
1421
- ]
1422
- },
1423
- "qualifier": {
1424
- "description": "A term providing information about the circumstances of the statement (e.g., approximate dates).",
1425
- "type": "string"
1426
- },
1427
- "note": {
1428
- "description": "Other information related to the descriptive element.",
1371
+ "appliesTo": {
1429
1372
  "type": "array",
1430
1373
  "items": {
1431
- "$ref": "#/$defs/DescriptiveValue"
1374
+ "$ref": "#/$defs/AppliesTo"
1432
1375
  }
1433
- },
1434
- "valueLanguage": {
1435
- "$ref": "#/$defs/DescriptiveValueLanguage"
1436
- },
1437
- "valueAt": {
1438
- "description": "URL or other pointer to the location of the value of the descriptive element.",
1439
- "type": "string"
1440
1376
  }
1441
1377
  }
1442
1378
  }
1443
1379
  ],
1444
1380
  "unevaluatedProperties": false
1445
1381
  },
1446
- "DescriptiveIdentifier": {
1447
- "description": "Value model for descriptive identifiers. Same as DescriptiveValue but omits the identifier property to prevent infinite recursion.",
1382
+ "DescriptiveValue": {
1383
+ "description": "Default value model for descriptive elements.",
1448
1384
  "type": "object",
1449
- "properties": {
1450
- "appliesTo": {
1451
- "type": "array",
1452
- "items": {
1453
- "$ref": "#/$defs/DescriptiveBasicValue"
1454
- }
1455
- }
1456
- },
1457
1385
  "allOf": [
1458
1386
  {
1459
- "$ref": "#/$defs/DescriptiveStructuredValue"
1460
- },
1461
- {
1462
- "$ref": "#/$defs/DescriptiveParallelValue"
1463
- },
1464
- {
1465
- "$ref": "#/$defs/DescriptiveGroupedValue"
1387
+ "$ref": "#/$defs/DescriptiveBasicValue"
1466
1388
  },
1467
1389
  {
1468
1390
  "type": "object",
1469
1391
  "properties": {
1470
- "value": {
1471
- "description": "String or integer value of the descriptive element.",
1472
- "oneOf": [
1473
- {
1474
- "type": "string"
1475
- }
1476
- ]
1477
- },
1478
- "type": {
1479
- "description": "Type of value provided by the descriptive element. See https://github.com/sul-dlss/cocina-models/blob/main/docs/description_types.md for valid types.",
1480
- "type": "string"
1481
- },
1482
- "status": {
1483
- "description": "Status of the descriptive element value relative to other instances of the element.",
1484
- "type": "string"
1485
- },
1486
- "code": {
1487
- "description": "Code value of the descriptive element.",
1488
- "type": "string"
1489
- },
1490
- "uri": {
1491
- "description": "URI value of the descriptive element.",
1492
- "type": "string"
1493
- },
1494
- "standard": {
1495
- "$ref": "#/$defs/Standard"
1496
- },
1497
- "encoding": {
1498
- "$ref": "#/$defs/Standard"
1499
- },
1500
- "source": {
1501
- "$ref": "#/$defs/Source"
1502
- },
1503
- "displayLabel": {
1504
- "description": "The preferred display label to use for the descriptive element in access systems.",
1505
- "type": [
1506
- "string",
1507
- "null"
1508
- ]
1509
- },
1510
- "qualifier": {
1511
- "description": "A term providing information about the circumstances of the statement (e.g., approximate dates).",
1512
- "type": "string"
1513
- },
1514
- "note": {
1515
- "description": "Other information related to the descriptive element.",
1392
+ "appliesTo": {
1516
1393
  "type": "array",
1517
1394
  "items": {
1518
- "$ref": "#/$defs/DescriptiveValue"
1395
+ "$ref": "#/$defs/AppliesTo"
1519
1396
  }
1520
1397
  },
1521
- "valueLanguage": {
1522
- "$ref": "#/$defs/DescriptiveValueLanguage"
1523
- },
1524
- "valueAt": {
1525
- "description": "URL or other pointer to the location of the value of the descriptive element.",
1526
- "type": "string"
1398
+ "identifier": {
1399
+ "description": "Identifiers and URIs associated with the descriptive element.",
1400
+ "type": "array",
1401
+ "items": {
1402
+ "$ref": "#/$defs/DescriptiveIdentifier"
1403
+ }
1527
1404
  }
1528
1405
  }
1529
1406
  }
@@ -2012,7 +1889,7 @@
2012
1889
  "appliesTo": {
2013
1890
  "type": "array",
2014
1891
  "items": {
2015
- "$ref": "#/$defs/DescriptiveBasicValue"
1892
+ "$ref": "#/$defs/AppliesTo"
2016
1893
  }
2017
1894
  },
2018
1895
  "code": {
@@ -2502,13 +2379,6 @@
2502
2379
  "access": {
2503
2380
  "$ref": "#/$defs/DescriptiveAccessMetadata"
2504
2381
  },
2505
- "relatedResource": {
2506
- "description": "Other resources associated with the related resource.",
2507
- "type": "array",
2508
- "items": {
2509
- "$ref": "#/$defs/RelatedResource"
2510
- }
2511
- },
2512
2382
  "adminMetadata": {
2513
2383
  "$ref": "#/$defs/DescriptiveAdminMetadata"
2514
2384
  },
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.127.0
4
+ version: 0.128.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
@@ -536,7 +536,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
536
536
  - !ruby/object:Gem::Version
537
537
  version: '0'
538
538
  requirements: []
539
- rubygems_version: 3.6.9
539
+ rubygems_version: 4.0.6
540
540
  specification_version: 4
541
541
  summary: Data models for the SDR
542
542
  test_files: []