cocina-models 0.99.4 → 0.100.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: 41bd326d5fc785d050467a40c155db810ff7b9d639d314654ccab38d4496eb4f
4
- data.tar.gz: 7af9ccf5082bb028c3af2b7a11e3a1bffc60e17d79d4ef7c296497c3fc3f8723
3
+ metadata.gz: bf0adcf9839eca5b38d5ea38c28b9ee8d853e0f5cdec7b35a2c8fee57e3081fd
4
+ data.tar.gz: 8824e1540a5d8eb2fca36f8afbeeb340f4b134385075af10dac74408c7e35598
5
5
  SHA512:
6
- metadata.gz: f30cf1b9d9ebbbe8e98bcc489248841689518badbd047ba5647115d706a9c7716ed596dee81ebc8579843f89b2ffa513e98e2b82ca8e4d5d45781bbdc5f96574
7
- data.tar.gz: 76d24ee0f27114027027cefaff3a2ff4ddc96b580da7979c873c6bce8a7d3f881b0c71515ae74dde98957136fa298feec2aab9f978cf0c9b128f5afc38e06c9a
6
+ metadata.gz: 96f4f445895f8be40633be3caf07455fc72ac83fdf592996c38510faef3367c3c32b529f0a3c865385522833802e5e02a608b6918ec2a05905911d436f6a0d4b
7
+ data.tar.gz: ef3acb51f35dea27da4f6378d625a4872a07652bb4cd1a2f4d40162adc1b6d8682d86bc4253639dff56ef66abbd4513ea6ba810fbc34b49e6a8008280c399bfc
data/.circleci/config.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  version: 2.1
2
2
  orbs:
3
- ruby-rails: sul-dlss/ruby-rails@4.4.0
3
+ ruby-rails: sul-dlss/ruby-rails@4.5.0
4
4
  workflows:
5
5
  build:
6
6
  jobs:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocina-models (0.99.4)
4
+ cocina-models (0.100.0)
5
5
  activesupport
6
6
  deprecation
7
7
  dry-struct (~> 1.0)
@@ -93,7 +93,7 @@ GEM
93
93
  openapi_parser (1.0.0)
94
94
  optimist (3.2.0)
95
95
  parallel (1.26.3)
96
- parser (3.3.7.0)
96
+ parser (3.3.7.1)
97
97
  ast (~> 2.4.1)
98
98
  racc
99
99
  patience_diff (1.2.0)
@@ -107,7 +107,7 @@ GEM
107
107
  rspec-core (~> 3.13.0)
108
108
  rspec-expectations (~> 3.13.0)
109
109
  rspec-mocks (~> 3.13.0)
110
- rspec-core (3.13.2)
110
+ rspec-core (3.13.3)
111
111
  rspec-support (~> 3.13.0)
112
112
  rspec-expectations (3.13.3)
113
113
  diff-lcs (>= 1.2.0, < 2.0)
@@ -118,7 +118,7 @@ GEM
118
118
  rspec-support (3.13.2)
119
119
  rspec_junit_formatter (0.6.0)
120
120
  rspec-core (>= 2, < 4, != 2.12.0)
121
- rubocop (1.71.1)
121
+ rubocop (1.71.2)
122
122
  json (~> 2.3)
123
123
  language_server-protocol (>= 3.17.0)
124
124
  parallel (~> 1.10)
@@ -601,6 +601,8 @@ note.groupedValue:
601
601
  - value: title
602
602
  - value: text
603
603
  relatedResource:
604
+ - value: derived from
605
+ description: The source from which the resource was derived, such as a raw data set before processing.
604
606
  - value: has original version
605
607
  description: An initial form of the resource.
606
608
  - value: has other format
@@ -609,6 +611,8 @@ relatedResource:
609
611
  description: A constituent unit of the resource.
610
612
  - value: has version
611
613
  description: A version of the resource with different intellectual content.
614
+ - value: identical to
615
+ description: A version of the resource with the same content and format.
612
616
  - value: in series
613
617
  description: The name of a series of publications to which the resource belongs.
614
618
  - value: other relation type
@@ -625,8 +629,16 @@ relatedResource:
625
629
  description: A generically related resource.
626
630
  - value: reviewed by
627
631
  description: A review of the resource.
632
+ - value: source of
633
+ description: Additional materials derived from the resource, such as a processed data set.
628
634
  - value: succeeded by
629
635
  description: A successor to the resource, such as a subsequent journal title.
636
+ - value: supplemented by
637
+ description: An auxiliary supplement to the resource.
638
+ - value: supplement to
639
+ description: The primary object which the resource supplements.
640
+ - value: version of record
641
+ description: The version of the resource that is preferred for citation and reference.
630
642
  subject:
631
643
  - value: classification
632
644
  description: A coded reference to the main subjects of the resource according to a larger system.
@@ -55,6 +55,7 @@ _Path: contributor.type_
55
55
  _Path: contributor.identifier.type_
56
56
  * ORCID
57
57
  * Identifier from orcid.org.
58
+ * ROR
58
59
  * Wikidata
59
60
  * Identifier from wikidata.org.
60
61
  ## Contributor name types
@@ -576,6 +577,8 @@ _Path: note.groupedValue.type_
576
577
  * text
577
578
  # RelatedResource types
578
579
  _Path: relatedResource.type_
580
+ * derived from
581
+ * The source from which the resource was derived, such as a raw data set before processing.
579
582
  * has original version
580
583
  * An initial form of the resource.
581
584
  * has other format
@@ -584,6 +587,8 @@ _Path: relatedResource.type_
584
587
  * A constituent unit of the resource.
585
588
  * has version
586
589
  * A version of the resource with different intellectual content.
590
+ * identical to
591
+ * A version of the resource with the same content and format.
587
592
  * in series
588
593
  * The name of a series of publications to which the resource belongs.
589
594
  * other relation type
@@ -600,8 +605,16 @@ _Path: relatedResource.type_
600
605
  * A generically related resource.
601
606
  * reviewed by
602
607
  * A review of the resource.
608
+ * source of
609
+ * Additional materials derived from the resource, such as a processed data set.
603
610
  * succeeded by
604
611
  * A successor to the resource, such as a subsequent journal title.
612
+ * supplemented by
613
+ * An auxiliary supplement to the resource.
614
+ * supplement to
615
+ * The primary object which the resource supplements.
616
+ * version of record
617
+ * The version of the resource that is preferred for citation and reference.
605
618
  # Subject types
606
619
  _Path: subject.type_
607
620
  * classification
@@ -51,14 +51,18 @@ module Cocina
51
51
  item[:displayLabel] = related_item['displayLabel']
52
52
  if related_item['type']
53
53
  item[:type] = normalized_type_for(related_item['type'])
54
- elsif related_item['otherType']
55
- item[:type] = 'related to'
56
- item[:note] ||= []
57
- item[:note] <<
58
- { type: 'other relation type', value: related_item['otherType'] }.tap do |note|
59
- note[:uri] = related_item['otherTypeURI'] if related_item['otherTypeURI']
60
- note[:source] = { value: related_item['otherTypeAuth'] } if related_item['otherTypeAuth']
61
- end
54
+ elsif (other_type = related_item['otherType'])
55
+ if Cocina::Models::Mapping::ToMods::RelatedResource::OTHER_TYPES.include?(other_type)
56
+ item[:type] = other_type
57
+ else
58
+ item[:type] = 'related to'
59
+ item[:note] ||= []
60
+ item[:note] <<
61
+ { type: 'other relation type', value: related_item['otherType'] }.tap do |note|
62
+ note[:uri] = related_item['otherTypeURI'] if related_item['otherTypeURI']
63
+ note[:source] = { value: related_item['otherTypeAuth'] } if related_item['otherTypeAuth']
64
+ end
65
+ end
62
66
  end
63
67
  end.compact
64
68
  end
@@ -22,6 +22,15 @@ module Cocina
22
22
  'succeeded by' => 'succeeding'
23
23
  }.freeze
24
24
 
25
+ OTHER_TYPES = [
26
+ 'supplement to',
27
+ 'supplemented by',
28
+ 'derived from',
29
+ 'source of',
30
+ 'version of record',
31
+ 'identical to'
32
+ ].freeze
33
+
25
34
  DETAIL_TYPES = {
26
35
  'location within source' => 'part',
27
36
  'volume' => 'volume',
@@ -85,7 +94,13 @@ module Cocina
85
94
 
86
95
  def attributes_for(related, other_type_note)
87
96
  {}.tap do |attrs|
88
- attrs[:type] = TYPES.fetch(related.type) if related.type
97
+ if related.type
98
+ if (mapped_type = TYPES[related.type])
99
+ attrs[:type] = mapped_type
100
+ elsif OTHER_TYPES.include?(related.type)
101
+ attrs[:otherType] = related.type
102
+ end
103
+ end
89
104
  attrs[:displayLabel] = related.displayLabel
90
105
 
91
106
  if other_type_note
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.99.4'
5
+ VERSION = '0.100.0'
6
6
  end
7
7
  end
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.99.4
4
+ version: 0.100.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: 2025-02-03 00:00:00.000000000 Z
11
+ date: 2025-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -313,7 +313,6 @@ extensions: []
313
313
  extra_rdoc_files: []
314
314
  files:
315
315
  - ".circleci/config.yml"
316
- - ".codecov.yml"
317
316
  - ".github/pull_request_template.md"
318
317
  - ".gitignore"
319
318
  - ".rspec"
data/.codecov.yml DELETED
@@ -1,4 +0,0 @@
1
- comment: false
2
- coverage:
3
- status:
4
- project: true