cocina-models 0.38.0 → 0.42.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: 2c956bcb234bb19ae05ab24d3b64efd2827bf23ab0d7953c5dc8405532f2391f
4
- data.tar.gz: 3fa549a561323f9cb19a595159e3c7eafd100be257920240dc2dde6800766af7
3
+ metadata.gz: 13cec8b638e93f9234d11fa1012dba6fb280a983a66be8cf7ff585bf7cf8433c
4
+ data.tar.gz: 07f01dcdc668b3295839280199346edbed52871f636c95d41ddd582745e1c866
5
5
  SHA512:
6
- metadata.gz: 03ba5b89ddf4fdbaa9a3167004771b9bcacf92409800735e1816e3db132bc3d4199fe62218f48053d7cd2bf5faeb53d2c542b16ee1b420bf5fec154f8a444da9
7
- data.tar.gz: b2fbbd2b9b1477bcdead8c3c8a186ae96c577e3b8431f7c23d92fa44b97d320f3e3f415121e26231f88f2ee594c0e3949eed5f65865e88fed24d52c7f1952cda
6
+ metadata.gz: a26feb1a275ac624356732cbf4f5bd01cc43a80599818d2012f74a838006aa6b4d67a40a531a6a01c74013b9200a36ecb36d003eb9e5d6d0d959837806112609
7
+ data.tar.gz: a9c315698eccb96fa6e7694ed9f40b2925994cacb856f0f89ec26f6d1179f5cfd606ccfc4938d3db8bc0bb249e3792df4601c9cf17704e0dc72277cff7ec7291
@@ -143,3 +143,34 @@ Style/SingleArgumentDig:
143
143
 
144
144
  Style/StringConcatenation:
145
145
  Enabled: true
146
+
147
+ Layout/BeginEndAlignment: # (new in 0.91)
148
+ Enabled: true
149
+ Lint/ConstantDefinitionInBlock: # (new in 0.91)
150
+ Enabled: true
151
+ Lint/DuplicateRequire: # (new in 0.90)
152
+ Enabled: true
153
+ Lint/EmptyFile: # (new in 0.90)
154
+ Enabled: true
155
+ Lint/HashCompareByIdentity: # (new in 0.93)
156
+ Enabled: true
157
+ Lint/IdentityComparison: # (new in 0.91)
158
+ Enabled: true
159
+ Lint/RedundantSafeNavigation: # (new in 0.93)
160
+ Enabled: true
161
+ Lint/TrailingCommaInAttributeDeclaration: # (new in 0.90)
162
+ Enabled: true
163
+ Lint/UselessMethodDefinition: # (new in 0.90)
164
+ Enabled: true
165
+ Lint/UselessTimes: # (new in 0.91)
166
+ Enabled: true
167
+ Style/ClassEqualityComparison: # (new in 0.93)
168
+ Enabled: true
169
+ Style/CombinableLoops: # (new in 0.90)
170
+ Enabled: true
171
+ Style/KeywordParametersOrder: # (new in 0.90)
172
+ Enabled: true
173
+ Style/RedundantSelfAssignment: # (new in 0.90)
174
+ Enabled: true
175
+ Style/SoleNestedConditional: # (new in 0.89)
176
+ Enabled: true
@@ -1,18 +1,25 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2020-03-06 16:50:50 -0800 using RuboCop version 0.74.0.
3
+ # on 2020-09-08 19:05:09 UTC using RuboCop version 0.89.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
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 4
10
- Metrics/AbcSize:
11
- Max: 37
9
+ # Offense count: 1
10
+ # Configuration parameters: AllowedMethods.
11
+ # AllowedMethods: present?, blank?, presence, try, try!
12
+ Lint/SafeNavigationChain:
13
+ Exclude:
14
+ - 'lib/cocina/generator/schema_base.rb'
15
+
16
+ # Offense count: 1
17
+ # Configuration parameters: IgnoredMethods.
18
+ Metrics/CyclomaticComplexity:
19
+ Max: 8
12
20
 
13
- # Offense count: 3
14
- # Configuration parameters: Max.
15
- RSpec/ExampleLength:
21
+ # Offense count: 1
22
+ # Configuration parameters: MinBodyLength.
23
+ Style/GuardClause:
16
24
  Exclude:
17
- - 'spec/cocina/models/dro_shared_examples.rb'
18
- - 'spec/cocina/models/file_set_shared_examples.rb'
25
+ - 'lib/cocina/generator/schema_base.rb'
data/README.md CHANGED
@@ -42,6 +42,19 @@ which pushes the gem to rubygems.org. Next write up the release notes: https://
42
42
 
43
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.
44
44
 
45
+ ### Dependent Services
46
+
47
+ Once the above listed gems are updated all the following services that use cocina-models should be updated and released at the same time:
48
+
49
+ * sul-dlss/sdr-api
50
+ * sul-dlss/dor-services-app
51
+ * sul-dlss/google-books
52
+ * sul-dlss/common-accessioning
53
+ * sul-dlss/argo
54
+ * sul-dlss/pre-assembly
55
+ * sul-dlss/hydrus
56
+ * sul-dlss/happy-heron
57
+ * sul-dlss/infrastructure-integration-test
45
58
 
46
59
  ## Using this gem
47
60
 
@@ -45,7 +45,7 @@ module Cocina
45
45
  FileUtils.rm_f(filepath)
46
46
 
47
47
  create_file filepath, vocab.generate
48
- run("rubocop -a #{filepath}")
48
+ run("rubocop -a #{filepath} > /dev/null")
49
49
  end
50
50
 
51
51
  private
@@ -71,7 +71,7 @@ module Cocina
71
71
  FileUtils.rm_f(filepath)
72
72
 
73
73
  create_file filepath, schema.generate
74
- run("rubocop -a #{filepath}")
74
+ run("rubocop -a #{filepath} > /dev/null")
75
75
  end
76
76
 
77
77
  def clean_output
@@ -54,7 +54,11 @@ module Cocina
54
54
  when 'boolean'
55
55
  'Strict::Bool'
56
56
  else
57
- raise "#{schema_doc.type} not supported"
57
+ if doc.one_of&.map(&:type).all? { |o| %w[integer string].include?(o) }
58
+ 'Nominal::Any'
59
+ else
60
+ raise "#{schema_doc.type} not supported"
61
+ end
58
62
  end
59
63
  end
60
64
 
@@ -5,8 +5,6 @@ module Cocina
5
5
  class Access < Struct
6
6
  # Access level
7
7
  attribute :access, Types::Strict::String.default('dark').enum('world', 'stanford', 'location-based', 'citation-only', 'dark').meta(omittable: true)
8
- # Download access level for a file
9
- attribute :download, Types::Strict::String.default('none').enum('world', 'stanford', 'location-based', 'none').meta(omittable: true)
10
8
  # If access is "location-based", which location should have access.
11
9
  attribute :readLocation, Types::Strict::String.enum('spec', 'music', 'ars', 'art', 'hoover', 'm&m').meta(omittable: true)
12
10
  end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class Classification < Struct
6
+ attribute :authority, Types::Strict::String.meta(omittable: true)
7
+ attribute :displayLabel, Types::Strict::String.meta(omittable: true)
8
+ attribute :edition, Types::Strict::String.meta(omittable: true)
9
+ end
10
+ end
11
+ end
@@ -3,10 +3,11 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class Description < Struct
6
- attribute :title, Types::Strict::Array.of(DescriptiveValueRequired).default([].freeze)
6
+ attribute :title, Types::Strict::Array.of(Title).default([].freeze)
7
7
  attribute :contributor, Types::Strict::Array.of(Contributor).meta(omittable: true)
8
8
  attribute :event, Types::Strict::Array.of(Event).meta(omittable: true)
9
9
  attribute :form, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
10
+ attribute :geographic, Types::Strict::Array.of(DescriptiveGeographicMetadata).meta(omittable: true)
10
11
  attribute :language, Types::Strict::Array.of(Language).meta(omittable: true)
11
12
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
12
13
  attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
@@ -17,6 +18,7 @@ module Cocina
17
18
  attribute :relatedResource, Types::Strict::Array.of(RelatedResource).meta(omittable: true)
18
19
  attribute :marcEncodedData, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
19
20
  attribute :adminMetadata, DescriptiveAdminMetadata.optional.meta(omittable: true)
21
+ attribute :classification, Types::Strict::Array.of(Classification).meta(omittable: true)
20
22
 
21
23
  def self.new(attributes = default_attributes, safe = false, validate = true, &block)
22
24
  Validator.validate(self, attributes.with_indifferent_access) if validate && name
@@ -5,8 +5,8 @@ module Cocina
5
5
  class DescriptiveBasicValue < Struct
6
6
  attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
7
7
  attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
8
- # String value of the descriptive element.
9
- attribute :value, Types::Strict::String.meta(omittable: true)
8
+ # String or integer value of the descriptive element.
9
+ attribute :value, Types::Nominal::Any.meta(omittable: true)
10
10
  # Type of value provided by the descriptive element.
11
11
  attribute :type, Types::Strict::String.meta(omittable: true)
12
12
  # Status of the descriptive element value relative to other instances of the element.
@@ -17,12 +17,14 @@ module Cocina
17
17
  attribute :uri, Types::Strict::String.meta(omittable: true)
18
18
  attribute :standard, Standard.optional.meta(omittable: true)
19
19
  attribute :encoding, Standard.optional.meta(omittable: true)
20
+ attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
20
21
  attribute :source, Source.optional.meta(omittable: true)
21
22
  # The preferred display label to use for the descriptive element in access systems.
22
23
  attribute :displayLabel, Types::Strict::String.meta(omittable: true)
23
24
  # A term providing information about the circumstances of the statement (e.g., approximate dates).
24
25
  attribute :qualifier, Types::Strict::String.meta(omittable: true)
25
26
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
27
+ attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
26
28
  end
27
29
  end
28
30
  end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class DescriptiveGeographicMetadata < Struct
6
+ attribute :form, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
7
+ attribute :subject, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
8
+ end
9
+ end
10
+ end
@@ -5,8 +5,8 @@ module Cocina
5
5
  class DescriptiveValue < Struct
6
6
  attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
7
7
  attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
8
- # String value of the descriptive element.
9
- attribute :value, Types::Strict::String.meta(omittable: true)
8
+ # String or integer value of the descriptive element.
9
+ attribute :value, Types::Nominal::Any.meta(omittable: true)
10
10
  # Type of value provided by the descriptive element.
11
11
  attribute :type, Types::Strict::String.meta(omittable: true)
12
12
  # Status of the descriptive element value relative to other instances of the element.
@@ -17,12 +17,14 @@ module Cocina
17
17
  attribute :uri, Types::Strict::String.meta(omittable: true)
18
18
  attribute :standard, Standard.optional.meta(omittable: true)
19
19
  attribute :encoding, Standard.optional.meta(omittable: true)
20
+ attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
20
21
  attribute :source, Source.optional.meta(omittable: true)
21
22
  # The preferred display label to use for the descriptive element in access systems.
22
23
  attribute :displayLabel, Types::Strict::String.meta(omittable: true)
23
24
  # A term providing information about the circumstances of the statement (e.g., approximate dates).
24
25
  attribute :qualifier, Types::Strict::String.meta(omittable: true)
25
26
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
27
+ attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
26
28
  attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).meta(omittable: true)
27
29
  end
28
30
  end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class DescriptiveValueLanguage < Struct
6
+ # Code representing the standard or encoding.
7
+ attribute :code, Types::Strict::String.meta(omittable: true)
8
+ # URI for the standard or encoding.
9
+ attribute :uri, Types::Strict::String.meta(omittable: true)
10
+ # String describing the standard or encoding.
11
+ attribute :value, Types::Strict::String.meta(omittable: true)
12
+ attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
13
+ # The version of the standard or encoding.
14
+ attribute :version, Types::Strict::String.meta(omittable: true)
15
+ attribute :source, Source.optional.meta(omittable: true)
16
+ attribute :valueScript, Standard.optional.meta(omittable: true)
17
+ end
18
+ end
19
+ end
@@ -6,9 +6,12 @@ module Cocina
6
6
  attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
7
7
  # Description of the event (creation, publication, etc.).
8
8
  attribute :type, Types::Strict::String.meta(omittable: true)
9
+ # The preferred display label to use for the event in access systems.
10
+ attribute :displayLabel, Types::Strict::String.meta(omittable: true)
9
11
  attribute :date, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
10
12
  attribute :contributor, Types::Strict::Array.of(Contributor).meta(omittable: true)
11
13
  attribute :location, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
14
+ attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
12
15
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
13
16
  end
14
17
  end
@@ -3,28 +3,27 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class Language < Struct
6
- attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
7
- attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
8
- # String value of the descriptive element.
9
- attribute :value, Types::Strict::String.meta(omittable: true)
10
- # Type of value provided by the descriptive element.
11
- attribute :type, Types::Strict::String.meta(omittable: true)
12
- # Status of the descriptive element value relative to other instances of the element.
13
- attribute :status, Types::Strict::String.meta(omittable: true)
6
+ attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).meta(omittable: true)
14
7
  # Code value of the descriptive element.
15
8
  attribute :code, Types::Strict::String.meta(omittable: true)
16
- # URI value of the descriptive element.
17
- attribute :uri, Types::Strict::String.meta(omittable: true)
18
- attribute :standard, Standard.optional.meta(omittable: true)
19
- attribute :encoding, Standard.optional.meta(omittable: true)
20
- attribute :source, Source.optional.meta(omittable: true)
21
9
  # The preferred display label to use for the descriptive element in access systems.
22
10
  attribute :displayLabel, Types::Strict::String.meta(omittable: true)
23
- # A term providing information about the circumstances of the statement (e.g., approximate dates).
24
- attribute :qualifier, Types::Strict::String.meta(omittable: true)
11
+ attribute :encoding, Standard.optional.meta(omittable: true)
25
12
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
26
- attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).meta(omittable: true)
13
+ attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
14
+ # present for mapping to additional schemas in the future and for consistency but not otherwise used
15
+ attribute :qualifier, Types::Strict::String.meta(omittable: true)
27
16
  attribute :script, DescriptiveValue.optional.meta(omittable: true)
17
+ attribute :source, Source.optional.meta(omittable: true)
18
+ # Status of the contributor relative to other parallel contributors (e.g. the primary author among a group of contributors).
19
+ attribute :status, Types::Strict::String.enum('primary').meta(omittable: true)
20
+ attribute :standard, Standard.optional.meta(omittable: true)
21
+ attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
22
+ # URI value of the descriptive element.
23
+ attribute :uri, Types::Strict::String.meta(omittable: true)
24
+ # Value of the descriptive element.
25
+ attribute :value, Types::Strict::String.meta(omittable: true)
26
+ attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
28
27
  end
29
28
  end
30
29
  end
@@ -5,6 +5,10 @@ module Cocina
5
5
  class RelatedResource < Struct
6
6
  # The relationship of the related resource to the described resource.
7
7
  attribute :type, Types::Strict::String.meta(omittable: true)
8
+ # Status of the related resource relative to other related resources.
9
+ attribute :status, Types::Strict::String.meta(omittable: true)
10
+ # The preferred display label to use for the related resource in access systems.
11
+ attribute :displayLabel, Types::Strict::String.meta(omittable: true)
8
12
  attribute :title, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
9
13
  attribute :contributor, Types::Strict::Array.of(Contributor).meta(omittable: true)
10
14
  attribute :event, Types::Strict::Array.of(Event).meta(omittable: true)
@@ -12,10 +16,13 @@ module Cocina
12
16
  attribute :language, Types::Strict::Array.of(Language).meta(omittable: true)
13
17
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
14
18
  attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
19
+ attribute :standard, Standard.optional.meta(omittable: true)
15
20
  attribute :subject, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
16
21
  # Stanford persistent URL associated with the related resource.
17
22
  attribute :purl, Types::Strict::String.meta(omittable: true)
18
23
  attribute :access, DescriptiveAccessMetadata.optional.meta(omittable: true)
24
+ # The version of the related resource.
25
+ attribute :version, Types::Strict::String.meta(omittable: true)
19
26
  end
20
27
  end
21
28
  end
@@ -10,6 +10,8 @@ module Cocina
10
10
  # String describing the value source.
11
11
  attribute :value, Types::Strict::String.meta(omittable: true)
12
12
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
13
+ # The version of the value source.
14
+ attribute :version, Types::Strict::String.meta(omittable: true)
13
15
  end
14
16
  end
15
17
  end
@@ -10,6 +10,8 @@ module Cocina
10
10
  # String describing the standard or encoding.
11
11
  attribute :value, Types::Strict::String.meta(omittable: true)
12
12
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
13
+ # The version of the standard or encoding.
14
+ attribute :version, Types::Strict::String.meta(omittable: true)
13
15
  attribute :source, Source.optional.meta(omittable: true)
14
16
  end
15
17
  end
@@ -2,11 +2,11 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- class DescriptiveValueRequired < Struct
5
+ class Title < Struct
6
6
  attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
7
7
  attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
8
- # String value of the descriptive element.
9
- attribute :value, Types::Strict::String.meta(omittable: true)
8
+ # String or integer value of the descriptive element.
9
+ attribute :value, Types::Nominal::Any.meta(omittable: true)
10
10
  # Type of value provided by the descriptive element.
11
11
  attribute :type, Types::Strict::String.meta(omittable: true)
12
12
  # Status of the descriptive element value relative to other instances of the element.
@@ -17,12 +17,14 @@ module Cocina
17
17
  attribute :uri, Types::Strict::String.meta(omittable: true)
18
18
  attribute :standard, Standard.optional.meta(omittable: true)
19
19
  attribute :encoding, Standard.optional.meta(omittable: true)
20
+ attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
20
21
  attribute :source, Source.optional.meta(omittable: true)
21
22
  # The preferred display label to use for the descriptive element in access systems.
22
23
  attribute :displayLabel, Types::Strict::String.meta(omittable: true)
23
24
  # A term providing information about the circumstances of the statement (e.g., approximate dates).
24
25
  attribute :qualifier, Types::Strict::String.meta(omittable: true)
25
26
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
27
+ attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
26
28
  attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).meta(omittable: true)
27
29
  end
28
30
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.38.0'
5
+ VERSION = '0.42.0'
6
6
  end
7
7
  end
@@ -108,15 +108,6 @@ components:
108
108
  - 'citation-only'
109
109
  - 'dark'
110
110
  default: 'dark'
111
- download:
112
- description: Download access level for a file
113
- type: string
114
- enum:
115
- - 'world'
116
- - 'stanford'
117
- - 'location-based'
118
- - 'none'
119
- default: 'none'
120
111
  readLocation:
121
112
  description: If access is "location-based", which location should have access.
122
113
  type: string
@@ -207,6 +198,16 @@ components:
207
198
  description: Record identifier that is unique within the context of the linked record's catalog.
208
199
  type: string
209
200
  example: 11403803
201
+ Classification:
202
+ type: object
203
+ additionalProperties: false
204
+ properties:
205
+ authority:
206
+ type: string
207
+ displayLabel:
208
+ type: string
209
+ edition:
210
+ type: string
210
211
  Collection:
211
212
  description: A group of Digital Repository Objects that indicate some type of conceptual grouping within the domain that is worth reusing across the system.
212
213
  type: object
@@ -270,6 +271,7 @@ components:
270
271
  description: Status of the contributor relative to other parallel contributors
271
272
  (e.g. the primary author among a group of contributors).
272
273
  type: string
274
+ # type: integer (uncomment when issue #154 resolved)
273
275
  role:
274
276
  description: Relationships of the contributor to the resource or to an event
275
277
  in its history.
@@ -295,7 +297,11 @@ components:
295
297
  type: array
296
298
  minItems: 1
297
299
  items:
298
- $ref: "#/components/schemas/DescriptiveValueRequired"
300
+ $ref: "#/components/schemas/Title"
301
+ classification:
302
+ type: array
303
+ items:
304
+ $ref: "#/components/schemas/Classification"
299
305
  contributor:
300
306
  description: Agents contributing in some way to the creation and history of the
301
307
  resource.
@@ -309,10 +315,15 @@ components:
309
315
  $ref: "#/components/schemas/Event"
310
316
  form:
311
317
  description: Characteristics of the resource's physical, digital, and intellectual
312
- form and genre.
318
+ form and genre, and of its process of creation.
313
319
  type: array
314
320
  items:
315
321
  $ref: "#/components/schemas/DescriptiveValue"
322
+ geographic:
323
+ description: Geographic description for items with coordinates or bounding boxes.
324
+ type: array
325
+ items:
326
+ $ref: "#/components/schemas/DescriptiveGeographicMetadata"
316
327
  language:
317
328
  description: Languages, scripts, symbolic systems, and notations used in all or
318
329
  part of a resource.
@@ -430,8 +441,13 @@ components:
430
441
  additionalProperties: false
431
442
  properties:
432
443
  value:
433
- description: String value of the descriptive element.
434
- type: string
444
+ description: String or integer value of the descriptive element.
445
+ oneOf:
446
+ - type: string
447
+ # Title note (nonsorting character count) was supposed to be able to accept an integer value,
448
+ # but this triggered a bug in committee:
449
+ # https://github.com/interagent/committee/issues/286
450
+ # - type: integer
435
451
  type:
436
452
  description: Type of value provided by the descriptive element.
437
453
  type: string
@@ -439,6 +455,7 @@ components:
439
455
  description: Status of the descriptive element value relative to other instances
440
456
  of the element.
441
457
  type: string
458
+ # type: integer (uncomment when issue #154 is resolved)
442
459
  code:
443
460
  description: Code value of the descriptive element.
444
461
  type: string
@@ -452,6 +469,11 @@ components:
452
469
  encoding:
453
470
  # description: Encoding schema, standard, or syntax to which the value conforms.
454
471
  $ref: "#/components/schemas/Standard"
472
+ identifier:
473
+ description: Identifiers and URIs associated with the descriptive element.
474
+ type: array
475
+ items:
476
+ $ref: "#/components/schemas/DescriptiveValue"
455
477
  source:
456
478
  $ref: "#/components/schemas/Source"
457
479
  displayLabel:
@@ -465,6 +487,22 @@ components:
465
487
  type: array
466
488
  items:
467
489
  $ref: "#/components/schemas/DescriptiveValue"
490
+ valueLanguage:
491
+ $ref: "#/components/schemas/DescriptiveValueLanguage"
492
+ DescriptiveGeographicMetadata:
493
+ description: Value model for mods geographic extension metadata
494
+ type: object
495
+ additionalProperties: false
496
+ properties:
497
+ form:
498
+ type: array
499
+ items:
500
+ $ref: "#/components/schemas/DescriptiveValue"
501
+ subject:
502
+ description: Terms associated with the intellectual content of the related resource.
503
+ type: array
504
+ items:
505
+ $ref: "#/components/schemas/DescriptiveValue"
468
506
  DescriptiveParallelValue:
469
507
  description: Value model for multiple representations of the same information (e.g. in different languages).
470
508
  type: object
@@ -490,7 +528,19 @@ components:
490
528
  allOf:
491
529
  - $ref: "#/components/schemas/DescriptiveBasicValue"
492
530
  - $ref: "#/components/schemas/AppliesTo"
493
- DescriptiveValueRequired:
531
+ DescriptiveValueLanguage:
532
+ description: Language of the descriptive element value
533
+ type: object
534
+ additionalProperties: false
535
+ allOf:
536
+ - $ref: "#/components/schemas/Standard"
537
+ - type: object
538
+ properties:
539
+ valueScript:
540
+ $ref: '#/components/schemas/Standard'
541
+ # description: An alphabet or other notation used to represent a
542
+ # language or other symbolic system of the descriptive element value.
543
+ Title:
494
544
  type: object
495
545
  additionalProperties: false
496
546
  allOf:
@@ -502,6 +552,9 @@ components:
502
552
  - type: object
503
553
  required:
504
554
  - structuredValue
555
+ - type: object
556
+ required:
557
+ - parallelValue
505
558
  DRO:
506
559
  description: Domain-defined abstraction of a 'work'. Digital Repository Objects' abstraction is describable for our domain’s purposes, i.e. for management needs within our system.
507
560
  type: object
@@ -672,6 +725,9 @@ components:
672
725
  type:
673
726
  description: Description of the event (creation, publication, etc.).
674
727
  type: string
728
+ displayLabel:
729
+ description: The preferred display label to use for the event in access systems.
730
+ type: string
675
731
  date:
676
732
  description: Dates associated with the event.
677
733
  type: array
@@ -687,6 +743,11 @@ components:
687
743
  type: array
688
744
  items:
689
745
  $ref: "#/components/schemas/DescriptiveValue"
746
+ identifier:
747
+ description: Identifiers and URIs associated with the event.
748
+ type: array
749
+ items:
750
+ $ref: "#/components/schemas/DescriptiveValue"
690
751
  note:
691
752
  description: Other information about the event.
692
753
  type: array
@@ -849,20 +910,66 @@ components:
849
910
  $ref: '#/components/schemas/CatalogLink'
850
911
  Language:
851
912
  description: Languages, scripts, symbolic systems, and notations used in all
852
- or part of a resource.
913
+ or part of a resource or its descriptive metadata.
853
914
  type: object
854
915
  additionalProperties: false
855
- allOf:
856
- - $ref: '#/components/schemas/DescriptiveValue'
857
- - type: object
858
- # additionalProperties breaks the validator, presumably because it can't
859
- # conform to other schemas (allOf) and not have additionalProperties
860
- # additionalProperties: false
861
- properties:
862
- script:
863
- $ref: '#/components/schemas/DescriptiveValue'
864
- # description: An alphabet or other notation used to represent a
865
- # language or other symbolic system associated with the resource.
916
+ properties:
917
+ appliesTo:
918
+ type: array
919
+ items:
920
+ $ref: "#/components/schemas/DescriptiveBasicValue"
921
+ code:
922
+ description: Code value of the descriptive element.
923
+ type: string
924
+ displayLabel:
925
+ description: The preferred display label to use for the descriptive element in access systems.
926
+ type: string
927
+ encoding:
928
+ # description: present for mapping to additional schemas in the future and for consistency but not otherwise used
929
+ $ref: "#/components/schemas/Standard"
930
+ note:
931
+ description: present for mapping to additional schemas in the future and for consistency but not otherwise used
932
+ type: array
933
+ items:
934
+ $ref: "#/components/schemas/DescriptiveValue"
935
+ parallelValue:
936
+ description: present for mapping to additional schemas in the future and for consistency but not otherwise used
937
+ type: array
938
+ items:
939
+ $ref: "#/components/schemas/DescriptiveValue"
940
+ qualifier:
941
+ type: string
942
+ description: present for mapping to additional schemas in the future and for consistency but not otherwise used
943
+ script:
944
+ $ref: '#/components/schemas/DescriptiveValue'
945
+ # description: An alphabet or other notation used to represent a
946
+ # language or other symbolic system associated with the resource.
947
+ source:
948
+ $ref: "#/components/schemas/Source"
949
+ status:
950
+ description: Status of the contributor relative to other parallel contributors
951
+ (e.g. the primary author among a group of contributors).
952
+ type: string
953
+ enum:
954
+ - primary
955
+ standard:
956
+ # description: present for mapping to additional schemas in the future and for consistency but not otherwise used
957
+ $ref: "#/components/schemas/Standard"
958
+ structuredValue:
959
+ description: present for mapping to additional schemas in the future and for consistency but not otherwise used
960
+ type: array
961
+ items:
962
+ $ref: "#/components/schemas/DescriptiveValue"
963
+ uri:
964
+ description: URI value of the descriptive element.
965
+ type: string
966
+ format: uri
967
+ value:
968
+ description: Value of the descriptive element.
969
+ type: string
970
+ valueLanguage:
971
+ # description: present for mapping to additional schemas in the future and for consistency but not otherwise used
972
+ $ref: "#/components/schemas/DescriptiveValueLanguage"
866
973
  MessageDigest:
867
974
  description: The output of the message digest algorithm.
868
975
  type: object
@@ -899,6 +1006,13 @@ components:
899
1006
  type:
900
1007
  description: The relationship of the related resource to the described resource.
901
1008
  type: string
1009
+ status:
1010
+ description: Status of the related resource relative to other related resources.
1011
+ type: string
1012
+ # type: integer (uncomment when issue #154 resolved)
1013
+ displayLabel:
1014
+ description: The preferred display label to use for the related resource in access systems.
1015
+ type: string
902
1016
  title:
903
1017
  description: Titles of the related resource.
904
1018
  type: array
@@ -917,7 +1031,7 @@ components:
917
1031
  $ref: "#/components/schemas/Event"
918
1032
  form:
919
1033
  description: Characteristics of the related resource's physical, digital, and intellectual
920
- form and genre.
1034
+ form and genre, and of its process of creation.
921
1035
  type: array
922
1036
  items:
923
1037
  $ref: "#/components/schemas/DescriptiveValue"
@@ -937,6 +1051,9 @@ components:
937
1051
  type: array
938
1052
  items:
939
1053
  $ref: "#/components/schemas/DescriptiveValue"
1054
+ standard:
1055
+ # description: Descriptive or content standards to which the value conforms.
1056
+ $ref: "#/components/schemas/Standard"
940
1057
  subject:
941
1058
  description: Terms associated with the intellectual content of the related resource.
942
1059
  type: array
@@ -948,6 +1065,9 @@ components:
948
1065
  format: uri
949
1066
  access:
950
1067
  $ref: "#/components/schemas/DescriptiveAccessMetadata"
1068
+ version:
1069
+ description: The version of the related resource.
1070
+ type: string
951
1071
  ReleaseTag:
952
1072
  description: A tag that indicates the item or collection should be released.
953
1073
  type: object
@@ -1215,9 +1335,23 @@ components:
1215
1335
  type: array
1216
1336
  items:
1217
1337
  $ref: "#/components/schemas/DescriptiveValue"
1338
+ version:
1339
+ description: The version of the value source.
1340
+ type: string
1341
+ SourceId:
1342
+ type: string
1343
+ pattern: '^.+:.+$'
1344
+ description: >
1345
+ Unique identifier in some other system. This is because a large proportion of what is deposited in SDR,
1346
+ historically and currently, are representations of objects that are also represented in other systems.
1347
+ For example, digitized paper and A/V collections have physical manifestations, and those physical objects are managed
1348
+ in systems that have their own identifiers. Similarly, books have barcodes, archival materials have collection numbers
1349
+ and physical locations, etc. The sourceId allows determining if an item has been deposited before and where to
1350
+ look for the original item if you're looking at its SDR representation. The format is: "namespace:identifier"
1351
+ example: 'sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026'
1218
1352
  Standard:
1219
1353
  description: Property model for indicating the encoding, standard, or syntax
1220
- to which a value conforms.
1354
+ to which a value conforms (e.g. RDA).
1221
1355
  type: object
1222
1356
  additionalProperties: false
1223
1357
  properties:
@@ -1236,16 +1370,8 @@ components:
1236
1370
  type: array
1237
1371
  items:
1238
1372
  $ref: "#/components/schemas/DescriptiveValue"
1373
+ version:
1374
+ description: The version of the standard or encoding.
1375
+ type: string
1239
1376
  source:
1240
1377
  $ref: "#/components/schemas/Source"
1241
- SourceId:
1242
- type: string
1243
- pattern: '^.+:.+$'
1244
- description: >
1245
- Unique identifier in some other system. This is because a large proportion of what is deposited in SDR,
1246
- historically and currently, are representations of objects that are also represented in other systems.
1247
- For example, digitized paper and A/V collections have physical manifestations, and those physical objects are managed
1248
- in systems that have their own identifiers. Similarly, books have barcodes, archival materials have collection numbers
1249
- and physical locations, etc. The sourceId allows determining if an item has been deposited before and where to
1250
- look for the original item if you're looking at its SDR representation. The format is: "namespace:identifier"
1251
- example: 'sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026'
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.38.0
4
+ version: 0.42.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-29 00:00:00.000000000 Z
11
+ date: 2020-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -260,6 +260,7 @@ files:
260
260
  - lib/cocina/models/applies_to.rb
261
261
  - lib/cocina/models/catalog_link.rb
262
262
  - lib/cocina/models/checkable.rb
263
+ - lib/cocina/models/classification.rb
263
264
  - lib/cocina/models/collection.rb
264
265
  - lib/cocina/models/collection_identification.rb
265
266
  - lib/cocina/models/contributor.rb
@@ -267,10 +268,11 @@ files:
267
268
  - lib/cocina/models/descriptive_access_metadata.rb
268
269
  - lib/cocina/models/descriptive_admin_metadata.rb
269
270
  - lib/cocina/models/descriptive_basic_value.rb
271
+ - lib/cocina/models/descriptive_geographic_metadata.rb
270
272
  - lib/cocina/models/descriptive_parallel_value.rb
271
273
  - lib/cocina/models/descriptive_structured_value.rb
272
274
  - lib/cocina/models/descriptive_value.rb
273
- - lib/cocina/models/descriptive_value_required.rb
275
+ - lib/cocina/models/descriptive_value_language.rb
274
276
  - lib/cocina/models/dro.rb
275
277
  - lib/cocina/models/dro_access.rb
276
278
  - lib/cocina/models/dro_structural.rb
@@ -301,6 +303,7 @@ files:
301
303
  - lib/cocina/models/source.rb
302
304
  - lib/cocina/models/source_id.rb
303
305
  - lib/cocina/models/standard.rb
306
+ - lib/cocina/models/title.rb
304
307
  - lib/cocina/models/validator.rb
305
308
  - lib/cocina/models/version.rb
306
309
  - lib/cocina/models/vocab.rb
@@ -308,7 +311,7 @@ files:
308
311
  homepage: https://github.com/sul-dlss/cocina-models
309
312
  licenses: []
310
313
  metadata: {}
311
- post_install_message:
314
+ post_install_message:
312
315
  rdoc_options: []
313
316
  require_paths:
314
317
  - lib
@@ -324,7 +327,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
324
327
  version: '0'
325
328
  requirements: []
326
329
  rubygems_version: 3.1.2
327
- signing_key:
330
+ signing_key:
328
331
  specification_version: 4
329
332
  summary: Data models for the SDR
330
333
  test_files: []