cocina-models 0.104.0 → 0.105.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: 0f840e3ef12581234eadde8076ad771b0e5062f3a599a15898899dc0152746fc
4
- data.tar.gz: ac0e7038340531de80eca2ec3aef3577da530c7f1b49d8e6bb947e9a08953926
3
+ metadata.gz: 4212bb17cb4acb8f0c53d3fe1261d92db13e5a85c53126e05f05dc01073124c1
4
+ data.tar.gz: e2573a32a29b15ed9ed9dc6f097174cca792777f1c0bfcfba070ea158c8bbacd
5
5
  SHA512:
6
- metadata.gz: 8539513679bf08a7afa30ea0fc03ac74eb2e43fde5781fc03bcde90be4757871ce9b1db04cae355afa89431b0dc3952ba27356e463c300468cb424e00d2e1200
7
- data.tar.gz: a71e1f1ae017ee5d3b6121d21a7e438b54b74a9423b047871468a01260deb4ce6fe324654675ec9f022257cf9f8ba0dac590c951dc305789e7c33528a35a4c02
6
+ metadata.gz: c7ad0cd6c969cded866c97ece359b5049ee1fbc0a6c0a70dceda3d8a53458370f28019262ffcacf689bf5d66e6598e662b4c2663b66d635ae028745a602c2c98
7
+ data.tar.gz: fbfb1bc4b547225702d52bdeed7ac32490ee0348572238ddc69e1d1d92bcd5a5bcf911bf1be360db3c4e918238f0440082da13575cff344f3a9888bd749c04a6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocina-models (0.104.0)
4
+ cocina-models (0.105.0)
5
5
  activesupport
6
6
  deprecation
7
7
  dry-struct (~> 1.0)
@@ -87,7 +87,7 @@ GEM
87
87
  logger (1.7.0)
88
88
  mini_portile2 (2.8.9)
89
89
  minitest (5.25.5)
90
- multi_json (1.15.0)
90
+ multi_json (1.16.0)
91
91
  nokogiri (1.18.8)
92
92
  mini_portile2 (~> 2.8.2)
93
93
  racc (~> 1.4)
@@ -109,7 +109,7 @@ GEM
109
109
  rspec-core (~> 3.13.0)
110
110
  rspec-expectations (~> 3.13.0)
111
111
  rspec-mocks (~> 3.13.0)
112
- rspec-core (3.13.4)
112
+ rspec-core (3.13.5)
113
113
  rspec-support (~> 3.13.0)
114
114
  rspec-expectations (3.13.5)
115
115
  diff-lcs (>= 1.2.0, < 2.0)
@@ -120,7 +120,7 @@ GEM
120
120
  rspec-support (3.13.4)
121
121
  rspec_junit_formatter (0.6.0)
122
122
  rspec-core (>= 2, < 4, != 2.12.0)
123
- rubocop (1.77.0)
123
+ rubocop (1.78.0)
124
124
  json (~> 2.3)
125
125
  language_server-protocol (~> 3.17.0.2)
126
126
  lint_roller (~> 1.1.0)
@@ -601,6 +601,10 @@ note.groupedValue:
601
601
  - value: title
602
602
  - value: text
603
603
  relatedResource:
604
+ - value: described by
605
+ description: A related resource that is described by the content of the resource.
606
+ - value: describes
607
+ description: A related resource which the resource describes.
604
608
  - value: derived from
605
609
  description: The source from which the resource was derived, such as a raw data set before processing.
606
610
  - value: has original version
@@ -577,6 +577,10 @@ _Path: note.groupedValue.type_
577
577
  * text
578
578
  # RelatedResource types
579
579
  _Path: relatedResource.type_
580
+ * described by
581
+ * A related resource that is described by the content of the resource.
582
+ * describes
583
+ * A related resource which the resource describes.
580
584
  * derived from
581
585
  * The source from which the resource was derived, such as a raw data set before processing.
582
586
  * has original version
@@ -11,6 +11,7 @@ module Cocina
11
11
  attribute? :status, Types::Strict::String
12
12
  attribute :role, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
13
13
  attribute :identifier, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
14
+ attribute :affiliation, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
14
15
  attribute :note, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
15
16
  # URL or other pointer to the location of the contributor information.
16
17
  attribute? :valueAt, Types::Strict::String
@@ -75,6 +75,7 @@ module Cocina
75
75
  write_name(name)
76
76
  end
77
77
  write_identifier(contributor) if contributor.identifier.present?
78
+ write_affiliation(contributor)
78
79
  write_note(contributor)
79
80
  write_roles(contributor)
80
81
  xml.etal if contributor.type == 'unspecified others'
@@ -145,6 +146,7 @@ module Cocina
145
146
  write_basic(parallel_name)
146
147
  end
147
148
  write_identifier(contributor) if contributor.identifier.present?
149
+ write_affiliation(contributor)
148
150
  write_note(contributor)
149
151
  write_roles(contributor)
150
152
  end
@@ -171,6 +173,7 @@ module Cocina
171
173
  end
172
174
  write_display_form(display_type_parallel_name) if display_type_parallel_name.present?
173
175
  write_identifier(contributor) if contributor.identifier.present?
176
+ write_affiliation(contributor)
174
177
  write_note(contributor)
175
178
  write_roles(contributor)
176
179
  end
@@ -252,6 +255,16 @@ module Cocina
252
255
  end
253
256
  end
254
257
 
258
+ def write_affiliation(contributor)
259
+ Array(contributor.affiliation).each do |affiliation|
260
+ if affiliation.structuredValue.present?
261
+ xml.affiliation affiliation.structuredValue.map(&:value).join(', ')
262
+ else
263
+ xml.affiliation affiliation.value
264
+ end
265
+ end
266
+ end
267
+
255
268
  def write_note(contributor)
256
269
  Array(contributor.note).each do |note|
257
270
  case note.type
@@ -92,6 +92,10 @@ module Cocina
92
92
 
93
93
  xml.titleInfo(title_info_attrs) do
94
94
  xml.title(title.value)
95
+ if title.status == 'primary' &&
96
+ (part_label = catalog_links.find { |link| link.catalog == 'folio' && link.partLabel.present? }&.partLabel)
97
+ xml.partNumber(part_label)
98
+ end
95
99
  end
96
100
  end
97
101
 
@@ -6,7 +6,7 @@ module Cocina
6
6
  class RelatedResource < Struct
7
7
  # The relationship of the related resource to the described resource.
8
8
  attribute? :type, Types::Strict::String
9
- # The DataCite relationType of the related resource to the described resource, as defined by DataCite https://datacite-metadata-schema.readthedocs.io/en/4.6/appendices/appendix-1/relationType
9
+ # The DataCite relationType describing the relationship from the related resource to the described resource. See https://datacite-metadata-schema.readthedocs.io/en/4.6/appendices/appendix-1/relationType
10
10
  attribute? :dataCiteRelationType, Types::Strict::String.enum('IsCitedBy', 'Cites', 'IsSupplementTo', 'IsSupplementedBy', 'IsContinuedBy', 'Continues', 'Describes', 'IsDescribedBy', 'HasMetadata', 'IsMetadataFor', 'HasVersion', 'IsVersionOf', 'IsNewVersionOf', 'IsPreviousVersionOf', 'IsPartOf', 'HasPart', 'IsPublishedIn', 'IsReferencedBy', 'References', 'IsDocumentedBy', 'Documents', 'IsCompiledBy', 'Compiles', 'IsVariantFormOf', 'IsOriginalFormOf', 'IsIdenticalTo', 'IsReviewedBy', 'Reviews', 'IsDerivedFrom', 'IsSourceOf', 'IsRequiredBy', 'Requires', 'Obsoletes', 'IsObsoletedBy', 'IsCollectedBy', 'Collects', 'IsTranslationOf', 'HasTranslation')
11
11
  # Status of the related resource relative to other related resources.
12
12
  attribute? :status, Types::Strict::String
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.104.0'
5
+ VERSION = '0.105.0'
6
6
  end
7
7
  end
data/openapi.yml CHANGED
@@ -464,6 +464,11 @@ components:
464
464
  type: array
465
465
  items:
466
466
  $ref: "#/components/schemas/DescriptiveValue"
467
+ affiliation:
468
+ description: Institutional or other affiliation associated with a contributor.
469
+ type: array
470
+ items:
471
+ $ref: "#/components/schemas/DescriptiveValue"
467
472
  note:
468
473
  description: Other information associated with the contributor.
469
474
  type: array
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocina-models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.104.0
4
+ version: 0.105.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-06-24 00:00:00.000000000 Z
10
+ date: 2025-07-18 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activesupport