cocina-models 0.36.0 → 0.40.1

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: 6f64b937df8c8d8c7bbd64af57d587e27843ebcd7e751ea4caff887aaa78c7a1
4
- data.tar.gz: b697ab2535648dd6d1520f35da839e599756e7c49bbc2803d17a5d6e2db9307d
3
+ metadata.gz: b1a41a02c7e3c3d58b65f4b94e4afdbc885795920eee91fa83f87374a207c0c1
4
+ data.tar.gz: 3c70761dd272739012387d78df18c69d114ab5a152d79283131f8d727112dcb9
5
5
  SHA512:
6
- metadata.gz: c67039d09d1d04e7bba5aaf0199402e5e1e0b9008b56a268735f59d4d61bd92f5c6e17f0edaf8625102f5e7bfd25e7cc66b4e58e51193e811bf2635b43ff21cc
7
- data.tar.gz: d7eeeccbc2a215cdee206b746bda7e38e7c86fca21b5c92f40057c5ffa760494cc539490dd35734314e82506f0ad922ae15f68bcf414034d9ce2fad06375397c
6
+ metadata.gz: e7f56d6aa41f0d13d2dcf17a2aef82354b566025caf04ffff84b2857fabfcc8c703c16f3aae00cf43c4654922f7b9240ededef6366ed9b111b2b4690f5a11fd2
7
+ data.tar.gz: b452f06a8f0525035a0699e74345b8bd1fb7f96d5b3f9cfbd996f1f65bd99b82d7ffbd9fa71cd2a5c32e60ef8731df159833b2bae98070ddf9f40803316b3caf
@@ -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
@@ -32,6 +32,27 @@ The generator is tested via its output when run against `openapi.yml`, viz., the
32
32
 
33
33
  Beyond what is necessary to test the generator, the Cocina model classes are not tested, i.e., they are assumed to be as specified in `openapi.yml`.
34
34
 
35
+ ## Releasing
36
+
37
+ The release process is much like any other gem. First bump the version in `lib/cocina/models/version.rb`, and commit the result. Then run:
38
+ ```
39
+ bundle exec rake release
40
+ ```
41
+ which pushes the gem to rubygems.org. Next write up the release notes: https://github.com/sul-dlss/cocina-models/releases .
42
+
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
+
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
+
35
56
  ## Using this gem
36
57
 
37
58
  If you are using this gem in an application that has an API that accepts Cocina models (e.g., SDR API, Dor-Services-App), make sure that the `openapi.yml` for the application includes the schemas that match the schemas in this `openapi.yml`.
@@ -81,6 +81,10 @@
81
81
  "description": "The human readable copyright statement that applies to the DRO.",
82
82
  "type": "string"
83
83
  },
84
+ "controlledDigitalLending": {
85
+ "description": "If the object is available for controlled digital lending.",
86
+ "type": "boolean"
87
+ },
84
88
  "download": {
85
89
  "description": "Download level for the DRO metadata.",
86
90
  "type": "string",
@@ -294,8 +298,11 @@
294
298
  }
295
299
  },
296
300
  "isMemberOf": {
297
- "description": "Collection that this DRO is a member of",
298
- "type": "string"
301
+ "description": "Collections that this DRO is a member of",
302
+ "type": "array",
303
+ "items": {
304
+ "type": "string"
305
+ }
299
306
  },
300
307
  "isTargetOf": {
301
308
  "description": "An Annotation instance that applies to the DRO.",
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Generator
5
+ # Class for generating from an openapi schema
6
+ class Datatype < SchemaBase
7
+ def generate
8
+ <<~RUBY
9
+ # frozen_string_literal: true
10
+
11
+ module Cocina
12
+ module Models
13
+ #{name} = Types::String.constrained(
14
+ format: /#{schema_doc.pattern}/i
15
+ )
16
+ end
17
+ end
18
+ RUBY
19
+ end
20
+ end
21
+ end
22
+ end
@@ -56,9 +56,14 @@ module Cocina
56
56
 
57
57
  def schema_for(schema_name)
58
58
  schema_doc = schemas[schema_name]
59
- return nil if schema_doc.nil? || schema_doc.type != 'object'
59
+ return nil if schema_doc.nil?
60
60
 
61
- Schema.new(schema_doc)
61
+ case schema_doc.type
62
+ when 'object'
63
+ Schema.new(schema_doc)
64
+ when 'string'
65
+ Datatype.new(schema_doc)
66
+ end
62
67
  end
63
68
 
64
69
  def generate_for(schema)
@@ -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,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.
@@ -23,6 +23,7 @@ module Cocina
23
23
  # A term providing information about the circumstances of the statement (e.g., approximate dates).
24
24
  attribute :qualifier, Types::Strict::String.meta(omittable: true)
25
25
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
26
+ attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
26
27
  end
27
28
  end
28
29
  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.
@@ -23,6 +23,7 @@ module Cocina
23
23
  # A term providing information about the circumstances of the statement (e.g., approximate dates).
24
24
  attribute :qualifier, Types::Strict::String.meta(omittable: true)
25
25
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
26
+ attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
26
27
  attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).meta(omittable: true)
27
28
  end
28
29
  end
@@ -0,0 +1,17 @@
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
+ attribute :source, Source.optional.meta(omittable: true)
14
+ attribute :valueScript, Standard.optional.meta(omittable: true)
15
+ end
16
+ end
17
+ end
@@ -5,8 +5,8 @@ module Cocina
5
5
  class DescriptiveValueRequired < 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.
@@ -23,6 +23,7 @@ module Cocina
23
23
  # A term providing information about the circumstances of the statement (e.g., approximate dates).
24
24
  attribute :qualifier, Types::Strict::String.meta(omittable: true)
25
25
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
26
+ attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
26
27
  attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).meta(omittable: true)
27
28
  end
28
29
  end
@@ -5,8 +5,7 @@ module Cocina
5
5
  class DROStructural < Struct
6
6
  attribute :contains, Types::Strict::Array.of(FileSet).meta(omittable: true)
7
7
  attribute :hasMemberOrders, Types::Strict::Array.of(Sequence).meta(omittable: true)
8
- # example: druid:bc123df4567
9
- attribute :isMemberOf, Types::Strict::String.meta(omittable: true)
8
+ attribute :isMemberOf, Types::Strict::Array.of(Druid).meta(omittable: true)
10
9
  # Agreement that covers the deposit of the DRO into SDR.
11
10
  attribute :hasAgreement, Types::Strict::String.meta(omittable: true)
12
11
  end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ Druid = Types::String.constrained(
6
+ format: /^druid:[b-df-hjkmnp-tv-z]{2}[0-9]{3}[b-df-hjkmnp-tv-z]{2}[0-9]{4}$/i
7
+ )
8
+ end
9
+ end
@@ -24,7 +24,7 @@ module Cocina
24
24
  # Use for the File.
25
25
  attribute :use, Types::Strict::String.meta(omittable: true)
26
26
  attribute :hasMessageDigests, Types::Strict::Array.of(MessageDigest).default([].freeze)
27
- attribute(:access, Access.default { Access.new })
27
+ attribute(:access, FileAccess.default { FileAccess.new })
28
28
  attribute(:administrative, FileAdministrative.default { FileAdministrative.new })
29
29
  attribute :presentation, Presentation.optional.meta(omittable: true)
30
30
  end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class FileAccess < Struct
6
+ # Access level
7
+ attribute :access, Types::Strict::String.default('dark').enum('world', 'stanford', 'location-based', 'citation-only', 'dark').meta(omittable: true)
8
+ # Available for controlled digital lending.
9
+ attribute :controlledDigitalLending, Types::Strict::Bool.meta(omittable: true)
10
+ # Download access level for a file
11
+ attribute :download, Types::Strict::String.default('none').enum('world', 'stanford', 'location-based', 'none').meta(omittable: true)
12
+ # If access is "location-based", which location should have access.
13
+ attribute :readLocation, Types::Strict::String.enum('spec', 'music', 'ars', 'art', 'hoover', 'm&m').meta(omittable: true)
14
+ end
15
+ end
16
+ end
@@ -3,7 +3,7 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class Identification < 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.
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
7
 
8
8
  # example: sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026
9
9
  attribute :sourceId, Types::Strict::String.meta(omittable: true)
@@ -5,8 +5,8 @@ module Cocina
5
5
  class Language < 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.
@@ -23,6 +23,7 @@ module Cocina
23
23
  # A term providing information about the circumstances of the statement (e.g., approximate dates).
24
24
  attribute :qualifier, Types::Strict::String.meta(omittable: true)
25
25
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
26
+ attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
26
27
  attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).meta(omittable: true)
27
28
  attribute :script, DescriptiveValue.optional.meta(omittable: true)
28
29
  end
@@ -5,8 +5,7 @@ module Cocina
5
5
  class RequestDROStructural < Struct
6
6
  attribute :contains, Types::Strict::Array.of(RequestFileSet).meta(omittable: true)
7
7
  attribute :hasMemberOrders, Types::Strict::Array.of(Sequence).meta(omittable: true)
8
- # example: druid:bc123df4567
9
- attribute :isMemberOf, Types::Strict::String.meta(omittable: true)
8
+ attribute :isMemberOf, Types::Strict::Array.of(Druid).meta(omittable: true)
10
9
  attribute :hasAgreement, Types::Strict::String.meta(omittable: true)
11
10
  end
12
11
  end
@@ -16,7 +16,7 @@ module Cocina
16
16
  attribute :externalIdentifier, Types::Strict::String.meta(omittable: true)
17
17
  attribute :use, Types::Strict::String.meta(omittable: true)
18
18
  attribute :hasMessageDigests, Types::Strict::Array.of(MessageDigest).default([].freeze)
19
- attribute(:access, Access.default { Access.new })
19
+ attribute(:access, FileAccess.default { FileAccess.new })
20
20
  attribute(:administrative, FileAdministrative.default { FileAdministrative.new })
21
21
  attribute :presentation, Presentation.optional.meta(omittable: true)
22
22
  end
@@ -3,7 +3,7 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class RequestIdentification < 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.
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
7
 
8
8
  # example: sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026
9
9
  attribute :sourceId, Types::Strict::String
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ SourceId = Types::String.constrained(
6
+ format: /^.+:.+$/i
7
+ )
8
+ end
9
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.36.0'
5
+ VERSION = '0.40.1'
6
6
  end
7
7
  end
@@ -94,7 +94,7 @@ paths:
94
94
  components:
95
95
  schemas:
96
96
  Access:
97
- description: Access metadata
97
+ description: Access metadata for collections
98
98
  type: object
99
99
  additionalProperties: false
100
100
  properties:
@@ -430,8 +430,10 @@ components:
430
430
  additionalProperties: false
431
431
  properties:
432
432
  value:
433
- description: String value of the descriptive element.
434
- type: string
433
+ description: String or integer value of the descriptive element.
434
+ oneOf:
435
+ - type: string
436
+ - type: integer
435
437
  type:
436
438
  description: Type of value provided by the descriptive element.
437
439
  type: string
@@ -465,6 +467,8 @@ components:
465
467
  type: array
466
468
  items:
467
469
  $ref: "#/components/schemas/DescriptiveValue"
470
+ valueLanguage:
471
+ $ref: "#/components/schemas/DescriptiveValueLanguage"
468
472
  DescriptiveParallelValue:
469
473
  description: Value model for multiple representations of the same information (e.g. in different languages).
470
474
  type: object
@@ -490,6 +494,18 @@ components:
490
494
  allOf:
491
495
  - $ref: "#/components/schemas/DescriptiveBasicValue"
492
496
  - $ref: "#/components/schemas/AppliesTo"
497
+ DescriptiveValueLanguage:
498
+ description: Language of the descriptive element value
499
+ type: object
500
+ additionalProperties: false
501
+ allOf:
502
+ - $ref: "#/components/schemas/Standard"
503
+ - type: object
504
+ properties:
505
+ valueScript:
506
+ $ref: '#/components/schemas/Standard'
507
+ # description: An alphabet or other notation used to represent a
508
+ # language or other symbolic system of the descriptive element value.
493
509
  DescriptiveValueRequired:
494
510
  type: object
495
511
  additionalProperties: false
@@ -502,6 +518,9 @@ components:
502
518
  - type: object
503
519
  required:
504
520
  - structuredValue
521
+ - type: object
522
+ required:
523
+ - parallelValue
505
524
  DRO:
506
525
  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
526
  type: object
@@ -624,7 +643,10 @@ components:
624
643
  items:
625
644
  $ref: '#/components/schemas/Sequence'
626
645
  isMemberOf:
627
- $ref: '#/components/schemas/Druid'
646
+ description: Collections that this DRO is a member of
647
+ type: array
648
+ items:
649
+ $ref: '#/components/schemas/Druid'
628
650
  hasAgreement:
629
651
  description: Agreement that covers the deposit of the DRO into SDR.
630
652
  type: string
@@ -725,7 +747,7 @@ components:
725
747
  items:
726
748
  $ref: '#/components/schemas/MessageDigest'
727
749
  access:
728
- $ref: '#/components/schemas/Access'
750
+ $ref: '#/components/schemas/FileAccess'
729
751
  administrative:
730
752
  $ref: '#/components/schemas/FileAdministrative'
731
753
  presentation:
@@ -739,6 +761,44 @@ components:
739
761
  - access
740
762
  - administrative
741
763
  - hasMessageDigests
764
+ FileAccess:
765
+ description: Access metadata for files
766
+ type: object
767
+ additionalProperties: false
768
+ properties:
769
+ access:
770
+ description: Access level
771
+ type: string
772
+ enum:
773
+ - 'world'
774
+ - 'stanford'
775
+ - 'location-based'
776
+ - 'citation-only'
777
+ - 'dark'
778
+ default: 'dark'
779
+ controlledDigitalLending:
780
+ description: Available for controlled digital lending.
781
+ type: boolean
782
+ default: false
783
+ download:
784
+ description: Download access level for a file
785
+ type: string
786
+ enum:
787
+ - 'world'
788
+ - 'stanford'
789
+ - 'location-based'
790
+ - 'none'
791
+ default: 'none'
792
+ readLocation:
793
+ description: If access is "location-based", which location should have access.
794
+ type: string
795
+ enum:
796
+ - 'spec'
797
+ - 'music'
798
+ - 'ars'
799
+ - 'art'
800
+ - 'hoover'
801
+ - 'm&m'
742
802
  FileAdministrative:
743
803
  type: object
744
804
  additionalProperties: false
@@ -801,22 +861,14 @@ components:
801
861
  additionalProperties: false
802
862
  properties:
803
863
  sourceId:
804
- type: string
805
- description: >
806
- Unique identifier in some other system. This is because a large proportion of what is deposited in SDR,
807
- historically and currently, are representations of objects that are also represented in other systems.
808
- For example, digitized paper and A/V collections have physical manifestations, and those physical objects are managed
809
- in systems that have their own identifiers. Similarly, books have barcodes, archival materials have collection numbers
810
- and physical locations, etc. The sourceId allows determining if an item has been deposited before and where to
811
- look for the original item if you're looking at its SDR representation.
812
- example: 'sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026'
864
+ $ref: '#/components/schemas/SourceId'
813
865
  catalogLinks:
814
866
  type: array
815
867
  items:
816
868
  $ref: '#/components/schemas/CatalogLink'
817
869
  Language:
818
870
  description: Languages, scripts, symbolic systems, and notations used in all
819
- or part of a resource.
871
+ or part of a resource or its descriptive metadata.
820
872
  type: object
821
873
  additionalProperties: false
822
874
  allOf:
@@ -1058,7 +1110,10 @@ components:
1058
1110
  items:
1059
1111
  $ref: '#/components/schemas/Sequence'
1060
1112
  isMemberOf:
1061
- $ref: '#/components/schemas/Druid'
1113
+ description: Collections that this DRO is a member of
1114
+ type: array
1115
+ items:
1116
+ $ref: '#/components/schemas/Druid'
1062
1117
  hasAgreement:
1063
1118
  type: string
1064
1119
  RequestFile:
@@ -1088,7 +1143,7 @@ components:
1088
1143
  items:
1089
1144
  $ref: '#/components/schemas/MessageDigest'
1090
1145
  access:
1091
- $ref: '#/components/schemas/Access'
1146
+ $ref: '#/components/schemas/FileAccess'
1092
1147
  administrative:
1093
1148
  $ref: '#/components/schemas/FileAdministrative'
1094
1149
  presentation:
@@ -1135,15 +1190,7 @@ components:
1135
1190
  additionalProperties: false
1136
1191
  properties:
1137
1192
  sourceId:
1138
- type: string
1139
- description: >
1140
- Unique identifier in some other system. This is because a large proportion of what is deposited in SDR,
1141
- historically and currently, are representations of objects that are also represented in other systems.
1142
- For example, digitized paper and A/V collections have physical manifestations, and those physical objects are managed
1143
- in systems that have their own identifiers. Similarly, books have barcodes, archival materials have collection numbers
1144
- and physical locations, etc. The sourceId allows determining if an item has been deposited before and where to
1145
- look for the original item if you're looking at its SDR representation.
1146
- example: 'sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026'
1193
+ $ref: '#/components/schemas/SourceId'
1147
1194
  catalogLinks:
1148
1195
  type: array
1149
1196
  items:
@@ -1187,6 +1234,17 @@ components:
1187
1234
  type: array
1188
1235
  items:
1189
1236
  $ref: "#/components/schemas/DescriptiveValue"
1237
+ SourceId:
1238
+ type: string
1239
+ pattern: '^.+:.+$'
1240
+ description: >
1241
+ Unique identifier in some other system. This is because a large proportion of what is deposited in SDR,
1242
+ historically and currently, are representations of objects that are also represented in other systems.
1243
+ For example, digitized paper and A/V collections have physical manifestations, and those physical objects are managed
1244
+ in systems that have their own identifiers. Similarly, books have barcodes, archival materials have collection numbers
1245
+ and physical locations, etc. The sourceId allows determining if an item has been deposited before and where to
1246
+ look for the original item if you're looking at its SDR representation. The format is: "namespace:identifier"
1247
+ example: 'sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026'
1190
1248
  Standard:
1191
1249
  description: Property model for indicating the encoding, standard, or syntax
1192
1250
  to which a value conforms.
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.36.0
4
+ version: 0.40.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-20 00:00:00.000000000 Z
11
+ date: 2020-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -244,6 +244,7 @@ files:
244
244
  - docs/sampleETD/xn109qc9773_taco.json
245
245
  - exe/generator
246
246
  - lib/cocina/generator.rb
247
+ - lib/cocina/generator/datatype.rb
247
248
  - lib/cocina/generator/generator.rb
248
249
  - lib/cocina/generator/schema.rb
249
250
  - lib/cocina/generator/schema_array.rb
@@ -269,13 +270,16 @@ files:
269
270
  - lib/cocina/models/descriptive_parallel_value.rb
270
271
  - lib/cocina/models/descriptive_structured_value.rb
271
272
  - lib/cocina/models/descriptive_value.rb
273
+ - lib/cocina/models/descriptive_value_language.rb
272
274
  - lib/cocina/models/descriptive_value_required.rb
273
275
  - lib/cocina/models/dro.rb
274
276
  - lib/cocina/models/dro_access.rb
275
277
  - lib/cocina/models/dro_structural.rb
278
+ - lib/cocina/models/druid.rb
276
279
  - lib/cocina/models/embargo.rb
277
280
  - lib/cocina/models/event.rb
278
281
  - lib/cocina/models/file.rb
282
+ - lib/cocina/models/file_access.rb
279
283
  - lib/cocina/models/file_administrative.rb
280
284
  - lib/cocina/models/file_set.rb
281
285
  - lib/cocina/models/file_set_structural.rb
@@ -296,6 +300,7 @@ files:
296
300
  - lib/cocina/models/request_identification.rb
297
301
  - lib/cocina/models/sequence.rb
298
302
  - lib/cocina/models/source.rb
303
+ - lib/cocina/models/source_id.rb
299
304
  - lib/cocina/models/standard.rb
300
305
  - lib/cocina/models/validator.rb
301
306
  - lib/cocina/models/version.rb