cocina-models 0.45.0 → 0.48.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: 5009424cf5bd827da8766eb5e0ecee739931123bad8f233342280908b4dac436
4
- data.tar.gz: '084f2ed351b54e1c792df48116bb55e51fd3e9d27921167aa80f1768b595f9ac'
3
+ metadata.gz: 7fa9efc7d9b5938ce148a3c66bce454d5f6ff3f1de439907b8b50b9170349f94
4
+ data.tar.gz: 0a00359d3fca6c9672d814b95a5bd20b25411090f8274d64cab791e3c5c17546
5
5
  SHA512:
6
- metadata.gz: 3097db674f1c8da72a88296cda09ca06fc8c1dc1cfecdfa5fcd0d94e4585f017433e77a3f8e38495371dfb4c3c1dec6955f5380de3e7e81b9318abe16a326972
7
- data.tar.gz: 571a4ca0471f75fe22d7f943f9c79f9db19a324f0aeef402d237aa8d5c00899ba4ff1407efe465b2470c3d9c382084058cb69d4093b3233470105fad2a1b530c
6
+ metadata.gz: 7525f4ce056ef73d07a3d674abdf9bcdf0eabe0ce1368b24714e8f41bdf255474727729cafc82aa4d36eb52397a3bfefa15d97512473fa0fd9d21d752726fa80
7
+ data.tar.gz: af24b2e5e06828819a9f9a9a3cea9b091b19a250121d2f14c1e95027e8a1ad68bb5dee53ff235aeb7d6107bb8bf195617f9cbe604d06d9f18657bd012ee32dd5
data/README.md CHANGED
@@ -59,6 +59,7 @@ Once the above listed gems are updated all the following services that use cocin
59
59
  * sul-dlss/hydrus
60
60
  * sul-dlss/happy-heron
61
61
  * sul-dlss/infrastructure-integration-test
62
+ * sul-dlss/dor_indexing_app
62
63
 
63
64
  ## Using this gem
64
65
 
@@ -5,6 +5,7 @@ module Cocina
5
5
  class AdminPolicyAdministrative < Struct
6
6
  attribute :defaultObjectRights, Types::Strict::String.default('<?xml version="1.0" encoding="UTF-8"?><rightsMetadata><access type="discover"><machine><world/></machine></access><access type="read"><machine><world/></machine></access><use><human type="useAndReproduction"/><human type="creativeCommons"/><machine type="creativeCommons" uri=""/><human type="openDataCommons"/><machine type="openDataCommons" uri=""/></use><copyright><human/></copyright></rightsMetadata>').meta(omittable: true)
7
7
  attribute :registrationWorkflow, Types::Strict::String.meta(omittable: true)
8
+ attribute :collectionsForRegistration, Types::Strict::Array.of(Types::Strict::String).meta(omittable: true)
8
9
  attribute :hasAdminPolicy, Types::Strict::String
9
10
  end
10
11
  end
@@ -3,6 +3,10 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class CollectionIdentification < Struct
6
+ # Unique identifier in some other system. This is because a large proportion of what is deposited in SDR, historically and currently, are representations of objects that are also represented in other systems. For example, digitized paper and A/V collections have physical manifestations, and those physical objects are managed in systems that have their own identifiers. Similarly, books have barcodes, archival materials have collection numbers and physical locations, etc. The sourceId allows determining if an item has been deposited before and where to look for the original item if you're looking at its SDR representation. The format is: "namespace:identifier"
7
+
8
+ # example: sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026
9
+ attribute :sourceId, Types::Strict::String.meta(omittable: true)
6
10
  attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).meta(omittable: true)
7
11
  end
8
12
  end
@@ -11,6 +11,8 @@ module Cocina
11
11
  attribute :role, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
12
12
  attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
13
13
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
14
+ # URL or other pointer to the location of the contributor information.
15
+ attribute :valueAt, Types::Strict::String.meta(omittable: true)
14
16
  end
15
17
  end
16
18
  end
@@ -18,6 +18,8 @@ module Cocina
18
18
  attribute :relatedResource, Types::Strict::Array.of(RelatedResource).meta(omittable: true)
19
19
  attribute :marcEncodedData, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
20
20
  attribute :adminMetadata, DescriptiveAdminMetadata.optional.meta(omittable: true)
21
+ # URL or other pointer to the location of the resource description.
22
+ attribute :valueAt, Types::Strict::String.meta(omittable: true)
21
23
 
22
24
  def self.new(attributes = default_attributes, safe = false, validate = true, &block)
23
25
  Validator.validate(self, attributes.with_indifferent_access) if validate && name
@@ -5,6 +5,7 @@ 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
+ attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
8
9
  # String or integer value of the descriptive element.
9
10
  attribute :value, Types::Nominal::Any.meta(omittable: true)
10
11
  # Type of value provided by the descriptive element.
@@ -25,6 +26,8 @@ module Cocina
25
26
  attribute :qualifier, Types::Strict::String.meta(omittable: true)
26
27
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
27
28
  attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
29
+ # URL or other pointer to the location of the value of the descriptive element.
30
+ attribute :valueAt, Types::Strict::String.meta(omittable: true)
28
31
  end
29
32
  end
30
33
  end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class DescriptiveGroupedValue < Struct
6
+ attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
7
+ end
8
+ end
9
+ end
@@ -5,6 +5,7 @@ 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
+ attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
8
9
  # String or integer value of the descriptive element.
9
10
  attribute :value, Types::Nominal::Any.meta(omittable: true)
10
11
  # Type of value provided by the descriptive element.
@@ -25,6 +26,8 @@ module Cocina
25
26
  attribute :qualifier, Types::Strict::String.meta(omittable: true)
26
27
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
27
28
  attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
29
+ # URL or other pointer to the location of the value of the descriptive element.
30
+ attribute :valueAt, Types::Strict::String.meta(omittable: true)
28
31
  attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).meta(omittable: true)
29
32
  end
30
33
  end
@@ -9,6 +9,7 @@ module Cocina
9
9
  # The preferred display label to use for the descriptive element in access systems.
10
10
  attribute :displayLabel, Types::Strict::String.meta(omittable: true)
11
11
  attribute :encoding, Standard.optional.meta(omittable: true)
12
+ attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
12
13
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
13
14
  attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
14
15
  # present for mapping to additional schemas in the future and for consistency but not otherwise used
@@ -23,6 +24,8 @@ module Cocina
23
24
  attribute :uri, Types::Strict::String.meta(omittable: true)
24
25
  # Value of the descriptive element.
25
26
  attribute :value, Types::Strict::String.meta(omittable: true)
27
+ # URL or other pointer to the location of the language information.
28
+ attribute :valueAt, Types::Strict::String.meta(omittable: true)
26
29
  attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
27
30
  end
28
31
  end
@@ -25,6 +25,8 @@ module Cocina
25
25
  attribute :adminMetadata, DescriptiveAdminMetadata.optional.meta(omittable: true)
26
26
  # The version of the related resource.
27
27
  attribute :version, Types::Strict::String.meta(omittable: true)
28
+ # URL or other pointer to the location of the related resource information.
29
+ attribute :valueAt, Types::Strict::String.meta(omittable: true)
28
30
  end
29
31
  end
30
32
  end
@@ -5,6 +5,7 @@ module Cocina
5
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
+ attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
8
9
  # String or integer value of the descriptive element.
9
10
  attribute :value, Types::Nominal::Any.meta(omittable: true)
10
11
  # Type of value provided by the descriptive element.
@@ -25,6 +26,8 @@ module Cocina
25
26
  attribute :qualifier, Types::Strict::String.meta(omittable: true)
26
27
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
27
28
  attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
29
+ # URL or other pointer to the location of the value of the descriptive element.
30
+ attribute :valueAt, Types::Strict::String.meta(omittable: true)
28
31
  attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).meta(omittable: true)
29
32
  end
30
33
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.45.0'
5
+ VERSION = '0.48.0'
6
6
  end
7
7
  end
data/openapi.yml CHANGED
@@ -169,6 +169,11 @@ components:
169
169
  default: <?xml version="1.0" encoding="UTF-8"?><rightsMetadata><access type="discover"><machine><world/></machine></access><access type="read"><machine><world/></machine></access><use><human type="useAndReproduction"/><human type="creativeCommons"/><machine type="creativeCommons" uri=""/><human type="openDataCommons"/><machine type="openDataCommons" uri=""/></use><copyright><human/></copyright></rightsMetadata>
170
170
  registrationWorkflow:
171
171
  type: string
172
+ collectionsForRegistration:
173
+ description: When you register an item with this admin policy, these are the collections that are available.
174
+ type: array
175
+ items:
176
+ type: string
172
177
  hasAdminPolicy:
173
178
  type: string
174
179
  required:
@@ -239,6 +244,8 @@ components:
239
244
  type: object
240
245
  additionalProperties: false
241
246
  properties:
247
+ sourceId:
248
+ $ref: '#/components/schemas/SourceId'
242
249
  catalogLinks:
243
250
  type: array
244
251
  items:
@@ -277,6 +284,9 @@ components:
277
284
  type: array
278
285
  items:
279
286
  $ref: "#/components/schemas/DescriptiveValue"
287
+ valueAt:
288
+ description: URL or other pointer to the location of the contributor information.
289
+ type: string
280
290
  Description:
281
291
  type: object
282
292
  additionalProperties: false
@@ -348,6 +358,9 @@ components:
348
358
  $ref: "#/components/schemas/DescriptiveValue"
349
359
  adminMetadata:
350
360
  $ref: "#/components/schemas/DescriptiveAdminMetadata"
361
+ valueAt:
362
+ description: URL or other pointer to the location of the resource description.
363
+ type: string
351
364
  required:
352
365
  - title
353
366
  DescriptiveAccessMetadata:
@@ -424,13 +437,15 @@ components:
424
437
  DescriptiveBasicValue:
425
438
  description: Basic value model for descriptive elements.
426
439
  type: object
427
- # additionalProperties breaks the validator, unclear as to why.
440
+ # additionalProperties breaks the validator for allOf, unclear as to why.
428
441
  # additionalProperties: false
429
442
  allOf:
430
443
  - $ref: "#/components/schemas/DescriptiveStructuredValue"
431
444
  - $ref: "#/components/schemas/DescriptiveParallelValue"
445
+ - $ref: "#/components/schemas/DescriptiveGroupedValue"
432
446
  - type: object
433
- additionalProperties: false
447
+ # additionalProperties breaks the validator for DescriptiveValue, unclear as to why.
448
+ # additionalProperties: false
434
449
  properties:
435
450
  value:
436
451
  description: String or integer value of the descriptive element.
@@ -480,6 +495,9 @@ components:
480
495
  $ref: "#/components/schemas/DescriptiveValue"
481
496
  valueLanguage:
482
497
  $ref: "#/components/schemas/DescriptiveValueLanguage"
498
+ valueAt:
499
+ description: URL or other pointer to the location of the value of the descriptive element.
500
+ type: string
483
501
  DescriptiveGeographicMetadata:
484
502
  description: Value model for mods geographic extension metadata
485
503
  type: object
@@ -494,6 +512,15 @@ components:
494
512
  type: array
495
513
  items:
496
514
  $ref: "#/components/schemas/DescriptiveValue"
515
+ DescriptiveGroupedValue:
516
+ description: Value model for a set of descriptive elements grouped together in an unstructured way.
517
+ type: object
518
+ additionalProperties: false
519
+ properties:
520
+ groupedValue:
521
+ type: array
522
+ items:
523
+ $ref: "#/components/schemas/DescriptiveValue"
497
524
  DescriptiveParallelValue:
498
525
  description: Value model for multiple representations of the same information (e.g. in different languages).
499
526
  type: object
@@ -546,6 +573,12 @@ components:
546
573
  - type: object
547
574
  required:
548
575
  - parallelValue
576
+ - type: object
577
+ required:
578
+ - groupedValue
579
+ - type: object
580
+ required:
581
+ - valueAt
549
582
  DRO:
550
583
  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.
551
584
  type: object
@@ -918,6 +951,11 @@ components:
918
951
  encoding:
919
952
  # description: present for mapping to additional schemas in the future and for consistency but not otherwise used
920
953
  $ref: "#/components/schemas/Standard"
954
+ groupedValue:
955
+ description: present for mapping to additional schemas in the future and for consistency but not otherwise used
956
+ type: array
957
+ items:
958
+ $ref: "#/components/schemas/DescriptiveValue"
921
959
  note:
922
960
  description: present for mapping to additional schemas in the future and for consistency but not otherwise used
923
961
  type: array
@@ -957,6 +995,9 @@ components:
957
995
  value:
958
996
  description: Value of the descriptive element.
959
997
  type: string
998
+ valueAt:
999
+ description: URL or other pointer to the location of the language information.
1000
+ type: string
960
1001
  valueLanguage:
961
1002
  # description: present for mapping to additional schemas in the future and for consistency but not otherwise used
962
1003
  $ref: "#/components/schemas/DescriptiveValueLanguage"
@@ -1064,6 +1105,9 @@ components:
1064
1105
  version:
1065
1106
  description: The version of the related resource.
1066
1107
  type: string
1108
+ valueAt:
1109
+ description: URL or other pointer to the location of the related resource information.
1110
+ type: string
1067
1111
  ReleaseTag:
1068
1112
  description: A tag that indicates the item or collection should be released.
1069
1113
  type: object
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.45.0
4
+ version: 0.48.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-01-20 00:00:00.000000000 Z
11
+ date: 2021-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -268,6 +268,7 @@ files:
268
268
  - lib/cocina/models/descriptive_admin_metadata.rb
269
269
  - lib/cocina/models/descriptive_basic_value.rb
270
270
  - lib/cocina/models/descriptive_geographic_metadata.rb
271
+ - lib/cocina/models/descriptive_grouped_value.rb
271
272
  - lib/cocina/models/descriptive_parallel_value.rb
272
273
  - lib/cocina/models/descriptive_structured_value.rb
273
274
  - lib/cocina/models/descriptive_value.rb
@@ -325,7 +326,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
325
326
  - !ruby/object:Gem::Version
326
327
  version: '0'
327
328
  requirements: []
328
- rubygems_version: 3.0.3
329
+ rubygems_version: 3.1.4
329
330
  signing_key:
330
331
  specification_version: 4
331
332
  summary: Data models for the SDR