cocina-models 0.59.0 → 0.61.2

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: d472f28820d79530461986e33333e5992ccb186f49b87a8a1cb72c3ffb86aa3b
4
- data.tar.gz: 19bb67df011f97b52ec3bdbbe847a2fdebabbacc1dd3a322279eedb1c73aec50
3
+ metadata.gz: d708001422da936708202eecd16f2d770f39051f47147fd9f299fa56454d732f
4
+ data.tar.gz: c947b43256c57dc68c488acf4ed10c61717a6bf77bd4c29e545dc2a827f937c9
5
5
  SHA512:
6
- metadata.gz: ac7b48e7ea013bd36fe1dc15f1c1a6826bade90358b7c2c43697af4945d1b5e9fac44acaa08f87233609fcb5e8c53598a85b656157ad33aa96ff8baea20400fe
7
- data.tar.gz: b260daadd1e73062df358ef214a6d0417d3b0d5f0c493ad22fe0025019822c4386f5e23bedaec6517d4678c3b766050816def14f329ca3b78f6dbca597ac3cbc
6
+ metadata.gz: 92f0b298b3e473e5cbc8668de4cda29133190dd6993d8dcca639c76d36f2f127b325e3c56a5e8fdfd31bfa1b8c68202b55ed4c1986d1779b7b9930d145e359c7
7
+ data.tar.gz: 8d71f24d4ce20e8409152702de34dc189dc9834718a1e178749770c735a7f11e67eda748868242be6cb498f7e3032141987342604ddd3e1ad11859a994852c28
data/README.md CHANGED
@@ -72,6 +72,7 @@ Once the above listed steps have been completed, all the following applications
72
72
  * [sul-dlss/google-books](https://github.com/sul-dlss/google-books/)
73
73
  * [sul-dlss/argo](https://github.com/sul-dlss/argo/)
74
74
  * [sul-dlss/pre-assembly](https://github.com/sul-dlss/pre-assembly/)
75
+ * [sul-dlss/hydra_etd](https://github.com/sul-dlss/hydra_etd/)
75
76
  * [sul-dlss/hydrus](https://github.com/sul-dlss/hydrus/)
76
77
  * [sul-dlss/happy-heron](https://github.com/sul-dlss/happy-heron/)
77
78
  * [sul-dlss/infrastructure-integration-test](https://github.com/sul-dlss/infrastructure-integration-test/)
data/lib/cocina/models.rb CHANGED
@@ -14,27 +14,19 @@ require 'thor'
14
14
 
15
15
  # Help Zeitwerk find some of our classes
16
16
  class CocinaModelsInflector < Zeitwerk::Inflector
17
- # rubocop:disable Metrics/MethodLength
17
+ INFLECTIONS = {
18
+ 'doi' => 'DOI',
19
+ 'dro' => 'DRO',
20
+ 'request_dro' => 'RequestDRO',
21
+ 'dro_access' => 'DROAccess',
22
+ 'dro_structural' => 'DROStructural',
23
+ 'request_dro_structural' => 'RequestDROStructural',
24
+ 'version' => 'VERSION'
25
+ }.freeze
26
+
18
27
  def camelize(basename, _abspath)
19
- case basename
20
- when 'dro'
21
- 'DRO'
22
- when 'request_dro'
23
- 'RequestDRO'
24
- when 'dro_access'
25
- 'DROAccess'
26
- when 'dro_structural'
27
- 'DROStructural'
28
- when 'request_dro_structural'
29
- 'RequestDROStructural'
30
- when 'version'
31
- 'VERSION'
32
- else
33
- super
34
- end
28
+ INFLECTIONS.fetch(basename) { super }
35
29
  end
36
-
37
- # rubocop:enable Metrics/MethodLength
38
30
  end
39
31
 
40
32
  loader = Zeitwerk::Loader.new
@@ -7,7 +7,6 @@ module Cocina
7
7
 
8
8
  TYPES = ['http://cocina.sul.stanford.edu/models/admin_policy.jsonld'].freeze
9
9
 
10
- # example: item
11
10
  attribute :type, Types::Strict::String.enum(*AdminPolicy::TYPES)
12
11
  # example: druid:bc123df4567
13
12
  attribute :externalIdentifier, Types::Strict::String
@@ -12,7 +12,6 @@ module Cocina
12
12
  'http://cocina.sul.stanford.edu/models/series.jsonld'].freeze
13
13
 
14
14
  # The content type of the Collection. Selected from an established set of values.
15
- # example: item
16
15
  attribute :type, Types::Strict::String.enum(*Collection::TYPES)
17
16
  # example: druid:bc123df4567
18
17
  attribute :externalIdentifier, Types::Strict::String
@@ -7,7 +7,7 @@ module Cocina
7
7
  attribute :access, Types::Strict::String.default('dark').enum('world', 'dark').meta(omittable: true)
8
8
  # The human readable copyright statement that applies
9
9
  # example: Copyright World Trade Organization
10
- attribute :copyright, Types::Strict::String.meta(omittable: true)
10
+ attribute :copyright, Types::Strict::String.optional.meta(omittable: true)
11
11
  # The human readable use and reproduction statement that applies
12
12
  # example: Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Public Services Librarian of the Dept. of Special Collections (http://library.stanford.edu/spc).
13
13
  attribute :useAndReproductionStatement, Types::Strict::String.meta(omittable: true)
@@ -3,11 +3,11 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class CollectionIdentification < Struct
6
+ attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).meta(omittable: true)
6
7
  # 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
 
8
9
  # example: sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026
9
10
  attribute :sourceId, Types::Strict::String.meta(omittable: true)
10
- attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).meta(omittable: true)
11
11
  end
12
12
  end
13
13
  end
@@ -12,7 +12,7 @@ module Cocina
12
12
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
13
13
  attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
14
14
  attribute :subject, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
15
- # Stanford persistent URL associated with the resource.
15
+ # Stanford persistent URL associated with the related resource. Note this is http, not https.
16
16
  attribute :purl, Types::Strict::String.meta(omittable: true)
17
17
  attribute :access, DescriptiveAccessMetadata.optional.meta(omittable: true)
18
18
  attribute :relatedResource, Types::Strict::Array.of(RelatedResource).meta(omittable: true)
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ DOI = Types::String.constrained(
6
+ format: %r{^10\.25740/[b-df-hjkmnp-tv-z]{2}[0-9]{3}[b-df-hjkmnp-tv-z]{2}[0-9]{4}$}i
7
+ )
8
+ end
9
+ end
@@ -22,7 +22,6 @@ module Cocina
22
22
  'http://cocina.sul.stanford.edu/models/webarchive-seed.jsonld'].freeze
23
23
 
24
24
  # The content type of the DRO. Selected from an established set of values.
25
- # example: item
26
25
  attribute :type, Types::Strict::String.enum(*DRO::TYPES)
27
26
  # example: druid:bc123df4567
28
27
  attribute :externalIdentifier, Types::Strict::String
@@ -16,13 +16,13 @@ module Cocina
16
16
  attribute :controlledDigitalLending, Types::Strict::Bool.optional.meta(omittable: true)
17
17
  # The human readable copyright statement that applies
18
18
  # example: Copyright World Trade Organization
19
- attribute :copyright, Types::Strict::String.meta(omittable: true)
19
+ attribute :copyright, Types::Strict::String.optional.meta(omittable: true)
20
20
  attribute :embargo, Embargo.optional.meta(omittable: true)
21
21
  # The human readable use and reproduction statement that applies
22
22
  # example: Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Public Services Librarian of the Dept. of Special Collections (http://library.stanford.edu/spc).
23
23
  attribute :useAndReproductionStatement, Types::Strict::String.meta(omittable: true)
24
24
  # The license governing reuse of the DRO. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
25
- attribute :license, Types::Strict::String.meta(omittable: true)
25
+ attribute :license, Types::Strict::String.enum('https://www.gnu.org/licenses/agpl.txt', 'https://www.apache.org/licenses/LICENSE-2.0', 'https://opensource.org/licenses/BSD-2-Clause', 'https://opensource.org/licenses/BSD-3-Clause', 'https://creativecommons.org/licenses/by/4.0/legalcode', 'https://creativecommons.org/licenses/by-nc/4.0/legalcode', 'https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode', 'https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode', 'https://creativecommons.org/licenses/by-nd/4.0/legalcode', 'https://creativecommons.org/licenses/by-sa/4.0/legalcode', 'https://creativecommons.org/publicdomain/zero/1.0/legalcode', 'https://opensource.org/licenses/cddl1', 'https://www.eclipse.org/legal/epl-2.0', 'https://www.gnu.org/licenses/gpl-3.0-standalone.html', 'https://www.isc.org/downloads/software-support-policy/isc-license/', 'https://www.gnu.org/licenses/lgpl-3.0-standalone.html', 'https://opensource.org/licenses/MIT', 'https://www.mozilla.org/MPL/2.0/', 'https://opendatacommons.org/licenses/by/1-0/', 'http://opendatacommons.org/licenses/odbl/1.0/', 'https://opendatacommons.org/licenses/odbl/1-0/', 'https://creativecommons.org/publicdomain/mark/1.0/', 'https://opendatacommons.org/licenses/pddl/1-0/', 'https://creativecommons.org/licenses/by/3.0/legalcode', 'https://creativecommons.org/licenses/by-sa/3.0/legalcode', 'https://creativecommons.org/licenses/by-nd/3.0/legalcode', 'https://creativecommons.org/licenses/by-nc/3.0/legalcode', 'https://creativecommons.org/licenses/by-nc-sa/3.0/legalcode', 'https://creativecommons.org/licenses/by-nc-nd/3.0/legalcode', 'http://cocina.sul.stanford.edu/licenses/none').meta(omittable: true)
26
26
  end
27
27
  end
28
28
  end
@@ -3,13 +3,16 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class Identification < Struct
6
+ # A barcode
7
+ attribute :barcode, Types::Nominal::Any.meta(omittable: true)
8
+ attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).meta(omittable: true)
9
+ # Digital Object Identifier (https://www.doi.org)
10
+ # example: 10.25740/druid:bc123df4567
11
+ attribute :doi, Types::Strict::String.meta(omittable: true)
6
12
  # 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
13
 
8
14
  # example: sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026
9
15
  attribute :sourceId, Types::Strict::String.meta(omittable: true)
10
- attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).meta(omittable: true)
11
- # A barcode
12
- attribute :barcode, Types::Nominal::Any.meta(omittable: true)
13
16
  end
14
17
  end
15
18
  end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ LaneMedicalBarcode = Types::String.constrained(
6
+ format: /^245[0-9]{8}$/i
7
+ )
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ Purl = Types::String.constrained(
6
+ format: %r{^http://}i
7
+ )
8
+ end
9
+ end
@@ -18,7 +18,7 @@ module Cocina
18
18
  attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
19
19
  attribute :standard, Standard.optional.meta(omittable: true)
20
20
  attribute :subject, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
21
- # Stanford persistent URL associated with the related resource.
21
+ # Stanford persistent URL associated with the related resource. Note this is http, not https.
22
22
  attribute :purl, Types::Strict::String.meta(omittable: true)
23
23
  attribute :access, DescriptiveAccessMetadata.optional.meta(omittable: true)
24
24
  attribute :relatedResource, Types::Strict::Array.of(RelatedResource).meta(omittable: true)
@@ -7,7 +7,6 @@ module Cocina
7
7
 
8
8
  TYPES = ['http://cocina.sul.stanford.edu/models/admin_policy.jsonld'].freeze
9
9
 
10
- # example: item
11
10
  attribute :type, Types::Strict::String.enum(*RequestAdminPolicy::TYPES)
12
11
  attribute :label, Types::Strict::String
13
12
  attribute :version, Types::Strict::Integer
@@ -11,7 +11,6 @@ module Cocina
11
11
  'http://cocina.sul.stanford.edu/models/exhibit.jsonld',
12
12
  'http://cocina.sul.stanford.edu/models/series.jsonld'].freeze
13
13
 
14
- # example: item
15
14
  attribute :type, Types::Strict::String.enum(*RequestCollection::TYPES)
16
15
  attribute :label, Types::Strict::String
17
16
  attribute :version, Types::Strict::Integer
@@ -21,7 +21,6 @@ module Cocina
21
21
  'http://cocina.sul.stanford.edu/models/webarchive-binary.jsonld',
22
22
  'http://cocina.sul.stanford.edu/models/webarchive-seed.jsonld'].freeze
23
23
 
24
- # example: item
25
24
  attribute :type, Types::Strict::String.enum(*RequestDRO::TYPES)
26
25
  attribute :label, Types::Strict::String
27
26
  attribute :version, Types::Strict::Integer
@@ -3,13 +3,16 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class RequestIdentification < Struct
6
+ # A barcode
7
+ attribute :barcode, Types::Nominal::Any.meta(omittable: true)
8
+ attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).meta(omittable: true)
9
+ # Digital Object Identifier (https://www.doi.org)
10
+ # example: 10.25740/druid:bc123df4567
11
+ attribute :doi, Types::Strict::String.meta(omittable: true)
6
12
  # 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
13
 
8
14
  # example: sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026
9
15
  attribute :sourceId, Types::Strict::String
10
- attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).meta(omittable: true)
11
- # A barcode
12
- attribute :barcode, Types::Nominal::Any.meta(omittable: true)
13
16
  end
14
17
  end
15
18
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.59.0'
5
+ VERSION = '0.61.2'
6
6
  end
7
7
  end
data/openapi.yml CHANGED
@@ -176,7 +176,6 @@ components:
176
176
  type: string
177
177
  enum:
178
178
  - 'http://cocina.sul.stanford.edu/models/admin_policy.jsonld'
179
- example: item
180
179
  externalIdentifier:
181
180
  $ref: '#/components/schemas/Druid'
182
181
  label:
@@ -301,13 +300,19 @@ components:
301
300
  description: 'A barcode'
302
301
  oneOf:
303
302
  - $ref: '#/components/schemas/BusinessBarcode'
303
+ - $ref: '#/components/schemas/LaneMedicalBarcode'
304
304
  - $ref: '#/components/schemas/CatkeyBarcode'
305
305
  - $ref: '#/components/schemas/StandardBarcode'
306
306
  BusinessBarcode:
307
307
  description: The barcode associated with a business library DRO object, prefixed with 2050
308
308
  type: string
309
309
  pattern: '^2050[0-9]{7}$'
310
- example: 20503740296
310
+ example: '20503740296'
311
+ LaneMedicalBarcode:
312
+ description: The barcode associated with a Lane Medical Library DRO object, prefixed with 245
313
+ type: string
314
+ pattern: '^245[0-9]{8}$'
315
+ example: '24503259768'
311
316
  CatalogLink:
312
317
  type: object
313
318
  additionalProperties: false
@@ -322,12 +327,12 @@ components:
322
327
  catalogRecordId:
323
328
  description: Record identifier that is unique within the context of the linked record's catalog.
324
329
  type: string
325
- example: 11403803
330
+ example: '11403803'
326
331
  CatkeyBarcode:
327
332
  description: The barcode associated with a DRO object based on catkey, prefixed with 36105
328
333
  type: string
329
334
  pattern: '^[0-9]+-[0-9]+$'
330
- example: 6772719-1001
335
+ example: '6772719-1001'
331
336
  CitationOnlyAccess:
332
337
  type: object
333
338
  properties:
@@ -369,7 +374,6 @@ components:
369
374
  - 'http://cocina.sul.stanford.edu/models/user-collection.jsonld'
370
375
  - 'http://cocina.sul.stanford.edu/models/exhibit.jsonld'
371
376
  - 'http://cocina.sul.stanford.edu/models/series.jsonld'
372
- example: item
373
377
  externalIdentifier:
374
378
  $ref: '#/components/schemas/Druid'
375
379
  label:
@@ -408,6 +412,7 @@ components:
408
412
  description: The human readable copyright statement that applies
409
413
  example: Copyright World Trade Organization
410
414
  type: string
415
+ nullable: true
411
416
  useAndReproductionStatement:
412
417
  description: The human readable use and reproduction statement that applies
413
418
  example: Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Public Services Librarian of the Dept. of Special Collections (http://library.stanford.edu/spc).
@@ -419,12 +424,12 @@ components:
419
424
  type: object
420
425
  additionalProperties: false
421
426
  properties:
422
- sourceId:
423
- $ref: '#/components/schemas/SourceId'
424
427
  catalogLinks:
425
428
  type: array
426
429
  items:
427
430
  $ref: '#/components/schemas/CatalogLink'
431
+ sourceId:
432
+ $ref: '#/components/schemas/SourceId'
428
433
  Contributor:
429
434
  description: Property model for describing agents contributing in some way to
430
435
  the creation and history of the resource.
@@ -575,9 +580,7 @@ components:
575
580
  items:
576
581
  $ref: "#/components/schemas/DescriptiveValue"
577
582
  purl:
578
- description: Stanford persistent URL associated with the resource.
579
- type: string
580
- format: uri
583
+ $ref: "#/components/schemas/Purl"
581
584
  access:
582
585
  $ref: "#/components/schemas/DescriptiveAccessMetadata"
583
586
  relatedResource:
@@ -872,6 +875,11 @@ components:
872
875
  $ref: '#/components/schemas/Standard'
873
876
  # description: An alphabet or other notation used to represent a
874
877
  # language or other symbolic system of the descriptive element value.
878
+ DOI:
879
+ type: string
880
+ description: Digital Object Identifier (https://www.doi.org)
881
+ pattern: '^10\.25740\/[b-df-hjkmnp-tv-z]{2}[0-9]{3}[b-df-hjkmnp-tv-z]{2}[0-9]{4}$'
882
+ example: '10.25740/bc123df4567'
875
883
  DRO:
876
884
  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.
877
885
  type: object
@@ -896,7 +904,6 @@ components:
896
904
  - 'http://cocina.sul.stanford.edu/models/track.jsonld'
897
905
  - 'http://cocina.sul.stanford.edu/models/webarchive-binary.jsonld'
898
906
  - 'http://cocina.sul.stanford.edu/models/webarchive-seed.jsonld'
899
- example: item
900
907
  externalIdentifier:
901
908
  $ref: '#/components/schemas/Druid'
902
909
  label:
@@ -935,6 +942,7 @@ components:
935
942
  description: The human readable copyright statement that applies
936
943
  example: Copyright World Trade Organization
937
944
  type: string
945
+ nullable: true
938
946
  embargo:
939
947
  $ref: '#/components/schemas/Embargo'
940
948
  useAndReproductionStatement:
@@ -944,6 +952,37 @@ components:
944
952
  license:
945
953
  description: The license governing reuse of the DRO. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
946
954
  type: string
955
+ enum:
956
+ - 'https://www.gnu.org/licenses/agpl.txt'
957
+ - 'https://www.apache.org/licenses/LICENSE-2.0'
958
+ - 'https://opensource.org/licenses/BSD-2-Clause'
959
+ - 'https://opensource.org/licenses/BSD-3-Clause'
960
+ - 'https://creativecommons.org/licenses/by/4.0/legalcode'
961
+ - 'https://creativecommons.org/licenses/by-nc/4.0/legalcode'
962
+ - 'https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode'
963
+ - 'https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode'
964
+ - 'https://creativecommons.org/licenses/by-nd/4.0/legalcode'
965
+ - 'https://creativecommons.org/licenses/by-sa/4.0/legalcode'
966
+ - 'https://creativecommons.org/publicdomain/zero/1.0/legalcode'
967
+ - 'https://opensource.org/licenses/cddl1'
968
+ - 'https://www.eclipse.org/legal/epl-2.0'
969
+ - 'https://www.gnu.org/licenses/gpl-3.0-standalone.html'
970
+ - 'https://www.isc.org/downloads/software-support-policy/isc-license/'
971
+ - 'https://www.gnu.org/licenses/lgpl-3.0-standalone.html'
972
+ - 'https://opensource.org/licenses/MIT'
973
+ - 'https://www.mozilla.org/MPL/2.0/'
974
+ - 'https://opendatacommons.org/licenses/by/1-0/'
975
+ - 'http://opendatacommons.org/licenses/odbl/1.0/' # Non cannonical, but in some of our data
976
+ - 'https://opendatacommons.org/licenses/odbl/1-0/'
977
+ - 'https://creativecommons.org/publicdomain/mark/1.0/'
978
+ - 'https://opendatacommons.org/licenses/pddl/1-0/'
979
+ - 'https://creativecommons.org/licenses/by/3.0/legalcode'
980
+ - 'https://creativecommons.org/licenses/by-sa/3.0/legalcode'
981
+ - 'https://creativecommons.org/licenses/by-nd/3.0/legalcode'
982
+ - 'https://creativecommons.org/licenses/by-nc/3.0/legalcode'
983
+ - 'https://creativecommons.org/licenses/by-nc-sa/3.0/legalcode'
984
+ - 'https://creativecommons.org/licenses/by-nc-nd/3.0/legalcode'
985
+ - 'http://cocina.sul.stanford.edu/licenses/none' # Only used in some legacy ETDs and not actually permitted per the Project Chimera docs.
947
986
  DROStructural:
948
987
  description: Structural metadata
949
988
  type: object
@@ -1179,14 +1218,16 @@ components:
1179
1218
  type: object
1180
1219
  additionalProperties: false
1181
1220
  properties:
1182
- sourceId:
1183
- $ref: '#/components/schemas/SourceId'
1221
+ barcode:
1222
+ $ref: '#/components/schemas/Barcode'
1184
1223
  catalogLinks:
1185
1224
  type: array
1186
1225
  items:
1187
1226
  $ref: '#/components/schemas/CatalogLink'
1188
- barcode:
1189
- $ref: '#/components/schemas/Barcode'
1227
+ doi:
1228
+ $ref: '#/components/schemas/DOI'
1229
+ sourceId:
1230
+ $ref: '#/components/schemas/SourceId'
1190
1231
  Language:
1191
1232
  description: Languages, scripts, symbolic systems, and notations used in all
1192
1233
  or part of a resource or its descriptive metadata.
@@ -1350,6 +1391,12 @@ components:
1350
1391
  width:
1351
1392
  description: Width in pixels
1352
1393
  type: integer
1394
+ Purl:
1395
+ description: Stanford persistent URL associated with the related resource. Note this is http, not https.
1396
+ type: string
1397
+ format: uri
1398
+ # Canonical URI is http, even though this redirects to https.
1399
+ pattern: '^http:\/\/'
1353
1400
  RelatedResource:
1354
1401
  description: Other resource associated with the described resource.
1355
1402
  type: object
@@ -1411,9 +1458,7 @@ components:
1411
1458
  items:
1412
1459
  $ref: "#/components/schemas/DescriptiveValue"
1413
1460
  purl:
1414
- description: Stanford persistent URL associated with the related resource.
1415
- type: string
1416
- format: uri
1461
+ $ref: "#/components/schemas/Purl"
1417
1462
  access:
1418
1463
  $ref: "#/components/schemas/DescriptiveAccessMetadata"
1419
1464
  relatedResource:
@@ -1466,7 +1511,6 @@ components:
1466
1511
  type: string
1467
1512
  enum:
1468
1513
  - 'http://cocina.sul.stanford.edu/models/admin_policy.jsonld'
1469
- example: item
1470
1514
  label:
1471
1515
  type: string
1472
1516
  version:
@@ -1493,7 +1537,6 @@ components:
1493
1537
  - 'http://cocina.sul.stanford.edu/models/user-collection.jsonld'
1494
1538
  - 'http://cocina.sul.stanford.edu/models/exhibit.jsonld'
1495
1539
  - 'http://cocina.sul.stanford.edu/models/series.jsonld'
1496
- example: item
1497
1540
  label:
1498
1541
  type: string
1499
1542
  version:
@@ -1535,7 +1578,6 @@ components:
1535
1578
  - 'http://cocina.sul.stanford.edu/models/track.jsonld'
1536
1579
  - 'http://cocina.sul.stanford.edu/models/webarchive-binary.jsonld'
1537
1580
  - 'http://cocina.sul.stanford.edu/models/webarchive-seed.jsonld'
1538
- example: item
1539
1581
  label:
1540
1582
  type: string
1541
1583
  version:
@@ -1666,14 +1708,16 @@ components:
1666
1708
  type: object
1667
1709
  additionalProperties: false
1668
1710
  properties:
1669
- sourceId:
1670
- $ref: '#/components/schemas/SourceId'
1711
+ barcode:
1712
+ $ref: '#/components/schemas/Barcode'
1671
1713
  catalogLinks:
1672
1714
  type: array
1673
1715
  items:
1674
1716
  $ref: '#/components/schemas/CatalogLink'
1675
- barcode:
1676
- $ref: '#/components/schemas/Barcode'
1717
+ doi:
1718
+ $ref: '#/components/schemas/DOI'
1719
+ sourceId:
1720
+ $ref: '#/components/schemas/SourceId'
1677
1721
  required:
1678
1722
  - sourceId
1679
1723
  Sequence:
@@ -1757,7 +1801,7 @@ components:
1757
1801
  description: The standard barcode associated with a DRO object, prefixed with 36105
1758
1802
  type: string
1759
1803
  pattern: '^36105[0-9]{9}$'
1760
- example: 36105010362304
1804
+ example: '36105010362304'
1761
1805
  Title:
1762
1806
  type: object
1763
1807
  additionalProperties: false
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.59.0
4
+ version: 0.61.2
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-04-21 00:00:00.000000000 Z
11
+ date: 2021-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -284,6 +284,7 @@ files:
284
284
  - lib/cocina/models/descriptive_structured_value.rb
285
285
  - lib/cocina/models/descriptive_value.rb
286
286
  - lib/cocina/models/descriptive_value_language.rb
287
+ - lib/cocina/models/doi.rb
287
288
  - lib/cocina/models/dro.rb
288
289
  - lib/cocina/models/dro_access.rb
289
290
  - lib/cocina/models/dro_structural.rb
@@ -297,11 +298,13 @@ files:
297
298
  - lib/cocina/models/file_set_structural.rb
298
299
  - lib/cocina/models/geographic.rb
299
300
  - lib/cocina/models/identification.rb
301
+ - lib/cocina/models/lane_medical_barcode.rb
300
302
  - lib/cocina/models/language.rb
301
303
  - lib/cocina/models/location_based_access.rb
302
304
  - lib/cocina/models/location_based_download_access.rb
303
305
  - lib/cocina/models/message_digest.rb
304
306
  - lib/cocina/models/presentation.rb
307
+ - lib/cocina/models/purl.rb
305
308
  - lib/cocina/models/related_resource.rb
306
309
  - lib/cocina/models/release_tag.rb
307
310
  - lib/cocina/models/request_admin_policy.rb
@@ -342,7 +345,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
342
345
  - !ruby/object:Gem::Version
343
346
  version: '0'
344
347
  requirements: []
345
- rubygems_version: 3.0.3
348
+ rubygems_version: 3.1.4
346
349
  signing_key:
347
350
  specification_version: 4
348
351
  summary: Data models for the SDR