cocina-models 0.53.1 → 0.56.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: 22b0ca5c4990804a27c1325b95d329f8e2bd807004f9478735aa22003024ec70
4
- data.tar.gz: 3dce580621ecbf4ee7d5d04977373ef67e4c91d39aafaf3ac8a4ca0f6a8148fc
3
+ metadata.gz: 352ed5623ee930889067e73d3d306dcdd552cc37cd5234c1a63b587d4c203721
4
+ data.tar.gz: a7bc8f6b3162e3e72eda861a99bf3e06fe0e94f8a94b0be155922848ba0aff24
5
5
  SHA512:
6
- metadata.gz: 752315b42f3ec4f316a53a8660f5fdff8b439771efada674d96cde94a6b853e5ef2468c50395a1afa255a22c685f54c08cad14655ea8d7b477b162af8f3d1405
7
- data.tar.gz: ac22bccd06f161a69306dfc31bafe6602b638a57837019566570b4f16403098c7a25cdc1de8baa095ff0d8fa1b5cbd75d095d30b2973c36269d2733e02eabc2c
6
+ metadata.gz: 8527592a36ba28a38d00086db7e3f37e5aaed274d98b65a8c71a5b8cd3b3c9e7da8fb1f29ca5c213f62bc278e42253c5a3cf955ad10918bc009b444170e3ef6d
7
+ data.tar.gz: 676a84548def7a9993383f356e3315d440ebec5dfd5efad611be323fed8aee543d1669520779ffa6555a836da5d0fb2ced503099651da96b2039d39db5af4c02
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'fileutils'
4
+
3
5
  module Cocina
4
6
  module Generator
5
7
  # Class for generating Cocina models from openapi.
@@ -96,7 +96,7 @@ module Cocina
96
96
  doc.properties.map do |key, properties_doc|
97
97
  property_class_for(properties_doc).new(properties_doc,
98
98
  key: key,
99
- required: doc.requires?(properties_doc),
99
+ required: doc.requires?(key),
100
100
  parent: self)
101
101
  end
102
102
  end
@@ -33,23 +33,40 @@ module Cocina
33
33
 
34
34
  attr_reader :schemas
35
35
 
36
- # rubocop:disable Style/MultilineBlockChain
36
+ BASE = 'http://cocina.sul.stanford.edu/models/'
37
+
37
38
  def vocabs
38
- schemas.values.map do |schema|
39
- type_property = schema.properties['type']
40
- type_property.nil? ? [] : type_property.enum.to_a
41
- end
42
- .flatten
43
- .uniq
44
- .sort
45
- .filter { |vocab| vocab.start_with?('http://cocina.sul.stanford.edu/models') }
39
+ type_properties = schemas.values.map { |schema| schema.properties['type'] }.compact
40
+ type_properties.map(&:enum).flat_map(&:to_a)
41
+ .filter { |vocab| vocab.start_with?(BASE) }
42
+ .uniq
43
+ .sort
46
44
  end
47
- # rubocop:enable Style/MultilineBlockChain
48
45
 
49
46
  def vocab_methods
50
- # Note special handling of 3d
51
- vocabs.map do |vocab|
52
- name = vocab[38, vocab.size - 45].gsub('-', '_').gsub('3d', 'three_dimensional')
47
+ names = vocabs.each_with_object({}) do |vocab, object|
48
+ # Note special handling of 3d
49
+ namespaced = vocab.delete_prefix(BASE).delete_suffix('.jsonld')
50
+ .gsub('-', '_').gsub('3d', 'three_dimensional')
51
+ namespace, name = namespaced.include?('/') ? namespaced.split('/') : [:root, namespaced]
52
+ object[namespace] ||= {}
53
+ object[namespace][name] = vocab
54
+ end
55
+ draw_namespaced_methods(names)
56
+ end
57
+
58
+ def draw_namespaced_methods(names)
59
+ names.flat_map do |namespace, methods|
60
+ [].tap do |items|
61
+ items << "class #{namespace.capitalize}" unless namespace == :root
62
+ items << draw_ruby_methods(methods)
63
+ items << 'end' unless namespace == :root
64
+ end
65
+ end.join("\n")
66
+ end
67
+
68
+ def draw_ruby_methods(methods)
69
+ methods.map do |name, vocab|
53
70
  <<~RUBY
54
71
  def self.#{name}
55
72
  "#{vocab}"
@@ -7,6 +7,11 @@ module Cocina
7
7
  attribute :access, Types::Strict::String.default('dark').enum('world', 'stanford', 'location-based', 'citation-only', 'dark').meta(omittable: true)
8
8
  # If access is "location-based", which location should have access.
9
9
  attribute :readLocation, Types::Strict::String.enum('spec', 'music', 'ars', 'art', 'hoover', 'm&m').meta(omittable: true)
10
+ # The human readable use and reproduction statement that applies
11
+ # 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).
12
+ attribute :useAndReproductionStatement, Types::Strict::String.meta(omittable: true)
13
+ # The license governing reuse of the Collection. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
14
+ attribute :license, Types::Strict::String.meta(omittable: true)
10
15
  end
11
16
  end
12
17
  end
@@ -3,14 +3,19 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class AdminPolicyAdministrative < Struct
6
+ # This is an XML expression of the default access (see defaultAccess)
6
7
  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)
8
+ attribute :defaultAccess, DROAccess.optional.meta(omittable: true)
7
9
  attribute :registrationWorkflow, Types::Strict::Array.of(Types::Strict::String).meta(omittable: true)
8
10
  # An additional workflow to start for objects managed by this admin policy once the end-accession workflow step is complete
9
11
  # example: wasCrawlPreassemblyWF
10
12
  attribute :disseminationWorkflow, Types::Strict::String.meta(omittable: true)
11
13
  attribute :collectionsForRegistration, Types::Strict::Array.of(Types::Strict::String).meta(omittable: true)
12
- attribute :roles, Types::Strict::Array.of(AccessRole).meta(omittable: true)
14
+ # example: druid:bc123df4567
13
15
  attribute :hasAdminPolicy, Types::Strict::String
16
+ # example: druid:bc123df4567
17
+ attribute :referencesAgreement, Types::Strict::String.meta(omittable: true)
18
+ attribute :roles, Types::Strict::Array.of(AccessRole).meta(omittable: true)
14
19
  end
15
20
  end
16
21
  end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class AdminPolicyDefaultAccess < Struct
6
+ attribute :access, Types::Strict::String.enum('world', 'stanford', 'location-based', 'citation-only', 'dark').meta(omittable: true)
7
+ # Available for controlled digital lending.
8
+ attribute :controlledDigitalLending, Types::Strict::Bool.meta(omittable: true)
9
+ # The human readable copyright statement that applies
10
+ # example: Copyright World Trade Organization
11
+ attribute :copyright, Types::Strict::String.meta(omittable: true)
12
+ attribute :embargo, Embargo.optional.meta(omittable: true)
13
+ # Download access level. This is used in the transition from Fedora as a way to set a default download level at registration that is copied down to all the files.
14
+
15
+ attribute :download, Types::Strict::String.enum('world', 'stanford', 'location-based', 'none').meta(omittable: true)
16
+ # If access is "location-based", which location should have access. This is used in the transition from Fedora as a way to set a default readLocation at registration that is copied down to all the files.
17
+
18
+ attribute :readLocation, Types::Strict::String.enum('spec', 'music', 'ars', 'art', 'hoover', 'm&m').meta(omittable: true)
19
+ # The human readable use and reproduction statement that applies
20
+ # 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).
21
+ attribute :useAndReproductionStatement, Types::Strict::String.meta(omittable: true)
22
+ # The license governing reuse of the Collection. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
23
+ attribute :license, Types::Strict::String.meta(omittable: true)
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ BusinessBarcode = Types::String.constrained(
6
+ format: /^2050[0-9]{7}$/i
7
+ )
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ CatkeyBarcode = Types::String.constrained(
6
+ format: /^[0-9]+-[0-9]+$/i
7
+ )
8
+ end
9
+ end
@@ -13,6 +13,7 @@ module Cocina
13
13
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
14
14
  # URL or other pointer to the location of the contributor information.
15
15
  attribute :valueAt, Types::Strict::String.meta(omittable: true)
16
+ attribute :parallelContributor, Types::Strict::Array.of(DescriptiveParallelContributor).meta(omittable: true)
16
17
  end
17
18
  end
18
19
  end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class DescriptiveParallelContributor < Struct
6
+ attribute :name, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
7
+ # Entity type of the contributor (person, organization, etc.).
8
+ attribute :type, Types::Strict::String.meta(omittable: true)
9
+ # Status of the contributor relative to other parallel contributors (e.g. the primary author among a group of contributors).
10
+ attribute :status, Types::Strict::String.meta(omittable: true)
11
+ attribute :role, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
12
+ attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
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)
16
+ attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
17
+ end
18
+ end
19
+ end
@@ -19,6 +19,8 @@ module Cocina
19
19
  # The human readable use and reproduction statement that applies
20
20
  # 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).
21
21
  attribute :useAndReproductionStatement, Types::Strict::String.meta(omittable: true)
22
+ # The license governing reuse of the DRO. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
23
+ attribute :license, Types::Strict::String.meta(omittable: true)
22
24
  end
23
25
  end
24
26
  end
@@ -3,6 +3,7 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class FileAdministrative < Struct
6
+ attribute :publish, Types::Strict::Bool.default(false)
6
7
  attribute :sdrPreserve, Types::Strict::Bool.default(true)
7
8
  attribute :shelve, Types::Strict::Bool.default(false)
8
9
  end
@@ -5,7 +5,22 @@ module Cocina
5
5
  class FileSet < Struct
6
6
  include Checkable
7
7
 
8
- TYPES = ['http://cocina.sul.stanford.edu/models/fileset.jsonld'].freeze
8
+ TYPES = ['http://cocina.sul.stanford.edu/models/resources/audio.jsonld',
9
+ 'http://cocina.sul.stanford.edu/models/resources/attachment.jsonld',
10
+ 'http://cocina.sul.stanford.edu/models/resources/document.jsonld',
11
+ 'http://cocina.sul.stanford.edu/models/resources/file.jsonld',
12
+ 'http://cocina.sul.stanford.edu/models/resources/image.jsonld',
13
+ 'http://cocina.sul.stanford.edu/models/resources/main-augmented.jsonld',
14
+ 'http://cocina.sul.stanford.edu/models/resources/main-original.jsonld',
15
+ 'http://cocina.sul.stanford.edu/models/resources/media.jsonld',
16
+ 'http://cocina.sul.stanford.edu/models/resources/object.jsonld',
17
+ 'http://cocina.sul.stanford.edu/models/resources/page.jsonld',
18
+ 'http://cocina.sul.stanford.edu/models/resources/permissions.jsonld',
19
+ 'http://cocina.sul.stanford.edu/models/resources/preview.jsonld',
20
+ 'http://cocina.sul.stanford.edu/models/resources/supplement.jsonld',
21
+ 'http://cocina.sul.stanford.edu/models/resources/3d.jsonld',
22
+ 'http://cocina.sul.stanford.edu/models/resources/thumb.jsonld',
23
+ 'http://cocina.sul.stanford.edu/models/resources/video.jsonld'].freeze
9
24
 
10
25
  # The content type of the Fileset.
11
26
  attribute :type, Types::Strict::String.enum(*FileSet::TYPES)
@@ -8,6 +8,8 @@ module Cocina
8
8
  # example: sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026
9
9
  attribute :sourceId, Types::Strict::String.meta(omittable: true)
10
10
  attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).meta(omittable: true)
11
+ # A barcode
12
+ attribute :barcode, Types::Nominal::Any.meta(omittable: true)
11
13
  end
12
14
  end
13
15
  end
@@ -5,7 +5,22 @@ module Cocina
5
5
  class RequestFileSet < Struct
6
6
  include Checkable
7
7
 
8
- TYPES = ['http://cocina.sul.stanford.edu/models/fileset.jsonld'].freeze
8
+ TYPES = ['http://cocina.sul.stanford.edu/models/resources/audio.jsonld',
9
+ 'http://cocina.sul.stanford.edu/models/resources/attachment.jsonld',
10
+ 'http://cocina.sul.stanford.edu/models/resources/document.jsonld',
11
+ 'http://cocina.sul.stanford.edu/models/resources/file.jsonld',
12
+ 'http://cocina.sul.stanford.edu/models/resources/image.jsonld',
13
+ 'http://cocina.sul.stanford.edu/models/resources/main-augmented.jsonld',
14
+ 'http://cocina.sul.stanford.edu/models/resources/main-original.jsonld',
15
+ 'http://cocina.sul.stanford.edu/models/resources/media.jsonld',
16
+ 'http://cocina.sul.stanford.edu/models/resources/object.jsonld',
17
+ 'http://cocina.sul.stanford.edu/models/resources/page.jsonld',
18
+ 'http://cocina.sul.stanford.edu/models/resources/permissions.jsonld',
19
+ 'http://cocina.sul.stanford.edu/models/resources/preview.jsonld',
20
+ 'http://cocina.sul.stanford.edu/models/resources/supplement.jsonld',
21
+ 'http://cocina.sul.stanford.edu/models/resources/3d.jsonld',
22
+ 'http://cocina.sul.stanford.edu/models/resources/thumb.jsonld',
23
+ 'http://cocina.sul.stanford.edu/models/resources/video.jsonld'].freeze
9
24
 
10
25
  attribute :type, Types::Strict::String.enum(*RequestFileSet::TYPES)
11
26
  attribute :label, Types::Strict::String
@@ -8,6 +8,8 @@ module Cocina
8
8
  # example: sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026
9
9
  attribute :sourceId, Types::Strict::String
10
10
  attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).meta(omittable: true)
11
+ # A barcode
12
+ attribute :barcode, Types::Nominal::Any.meta(omittable: true)
11
13
  end
12
14
  end
13
15
  end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ StandardBarcode = Types::String.constrained(
6
+ format: /^36105[0-9]{9}$/i
7
+ )
8
+ end
9
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.53.1'
5
+ VERSION = '0.56.0'
6
6
  end
7
7
  end
@@ -40,10 +40,6 @@ module Cocina
40
40
  'http://cocina.sul.stanford.edu/models/file.jsonld'
41
41
  end
42
42
 
43
- def self.fileset
44
- 'http://cocina.sul.stanford.edu/models/fileset.jsonld'
45
- end
46
-
47
43
  def self.geo
48
44
  'http://cocina.sul.stanford.edu/models/geo.jsonld'
49
45
  end
@@ -95,6 +91,72 @@ module Cocina
95
91
  def self.webarchive_seed
96
92
  'http://cocina.sul.stanford.edu/models/webarchive-seed.jsonld'
97
93
  end
94
+
95
+ class Resources
96
+ def self.three_dimensional
97
+ 'http://cocina.sul.stanford.edu/models/resources/3d.jsonld'
98
+ end
99
+
100
+ def self.attachment
101
+ 'http://cocina.sul.stanford.edu/models/resources/attachment.jsonld'
102
+ end
103
+
104
+ def self.audio
105
+ 'http://cocina.sul.stanford.edu/models/resources/audio.jsonld'
106
+ end
107
+
108
+ def self.document
109
+ 'http://cocina.sul.stanford.edu/models/resources/document.jsonld'
110
+ end
111
+
112
+ def self.file
113
+ 'http://cocina.sul.stanford.edu/models/resources/file.jsonld'
114
+ end
115
+
116
+ def self.image
117
+ 'http://cocina.sul.stanford.edu/models/resources/image.jsonld'
118
+ end
119
+
120
+ def self.main_augmented
121
+ 'http://cocina.sul.stanford.edu/models/resources/main-augmented.jsonld'
122
+ end
123
+
124
+ def self.main_original
125
+ 'http://cocina.sul.stanford.edu/models/resources/main-original.jsonld'
126
+ end
127
+
128
+ def self.media
129
+ 'http://cocina.sul.stanford.edu/models/resources/media.jsonld'
130
+ end
131
+
132
+ def self.object
133
+ 'http://cocina.sul.stanford.edu/models/resources/object.jsonld'
134
+ end
135
+
136
+ def self.page
137
+ 'http://cocina.sul.stanford.edu/models/resources/page.jsonld'
138
+ end
139
+
140
+ def self.permissions
141
+ 'http://cocina.sul.stanford.edu/models/resources/permissions.jsonld'
142
+ end
143
+
144
+ def self.preview
145
+ 'http://cocina.sul.stanford.edu/models/resources/preview.jsonld'
146
+ end
147
+
148
+ def self.supplement
149
+ 'http://cocina.sul.stanford.edu/models/resources/supplement.jsonld'
150
+ end
151
+
152
+ def self.thumb
153
+ 'http://cocina.sul.stanford.edu/models/resources/thumb.jsonld'
154
+ end
155
+
156
+ def self.video
157
+ 'http://cocina.sul.stanford.edu/models/resources/video.jsonld'
158
+ end
159
+ end
98
160
  end
99
161
  end
100
162
  end
data/openapi.yml CHANGED
@@ -118,6 +118,13 @@ components:
118
118
  - 'art'
119
119
  - 'hoover'
120
120
  - 'm&m'
121
+ useAndReproductionStatement:
122
+ description: The human readable use and reproduction statement that applies
123
+ 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).
124
+ type: string
125
+ license:
126
+ description: The license governing reuse of the Collection. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
127
+ type: string
121
128
  AccessRole:
122
129
  description: Access role conferred by an AdminPolicy to objects within it. (used by Argo)
123
130
  type: object
@@ -214,7 +221,11 @@ components:
214
221
  properties:
215
222
  defaultObjectRights:
216
223
  type: string
224
+ description: This is an XML expression of the default access (see defaultAccess)
225
+ deprecated: true
217
226
  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>
227
+ defaultAccess:
228
+ $ref: '#/components/schemas/DROAccess'
218
229
  registrationWorkflow:
219
230
  description: When you register an item with this admin policy, these are the workflows that are available.
220
231
  type: array
@@ -229,15 +240,72 @@ components:
229
240
  type: array
230
241
  items:
231
242
  type: string
243
+ hasAdminPolicy:
244
+ $ref: '#/components/schemas/Druid'
245
+ referencesAgreement:
246
+ $ref: '#/components/schemas/Druid'
232
247
  roles:
233
248
  description: The access roles conferred by this AdminPolicy (used by Argo)
234
249
  type: array
235
250
  items:
236
251
  $ref: '#/components/schemas/AccessRole'
237
- hasAdminPolicy:
238
- type: string
239
252
  required:
240
253
  - hasAdminPolicy
254
+ AdminPolicyDefaultAccess:
255
+ description: 'Provides the default access settings for an AdminPolicy. This is almost the same as DROAccess, but it provides no defaults.'
256
+ type: object
257
+ additionalProperties: false
258
+ properties:
259
+ access:
260
+ type: string
261
+ enum:
262
+ - 'world'
263
+ - 'stanford'
264
+ - 'location-based'
265
+ - 'citation-only'
266
+ - 'dark'
267
+ controlledDigitalLending:
268
+ description: Available for controlled digital lending.
269
+ type: boolean
270
+ copyright:
271
+ description: The human readable copyright statement that applies
272
+ example: Copyright World Trade Organization
273
+ type: string
274
+ embargo:
275
+ $ref: '#/components/schemas/Embargo'
276
+ download:
277
+ description: >
278
+ Download access level. This is used in the transition from Fedora as
279
+ a way to set a default download level at registration that is copied
280
+ down to all the files.
281
+
282
+ type: string
283
+ enum:
284
+ - 'world'
285
+ - 'stanford'
286
+ - 'location-based'
287
+ - 'none'
288
+ readLocation:
289
+ description: >
290
+ If access is "location-based", which location should have access.
291
+ This is used in the transition from Fedora as a way to set a default
292
+ readLocation at registration that is copied down to all the files.
293
+
294
+ type: string
295
+ enum:
296
+ - 'spec'
297
+ - 'music'
298
+ - 'ars'
299
+ - 'art'
300
+ - 'hoover'
301
+ - 'm&m'
302
+ useAndReproductionStatement:
303
+ description: The human readable use and reproduction statement that applies
304
+ 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).
305
+ type: string
306
+ license:
307
+ description: The license governing reuse of the Collection. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
308
+ type: string
241
309
  AppliesTo:
242
310
  description: Property model for indicating the parts, aspects, or versions of the resource to which a
243
311
  descriptive element is applicable.
@@ -248,6 +316,17 @@ components:
248
316
  type: array
249
317
  items:
250
318
  $ref: "#/components/schemas/DescriptiveBasicValue"
319
+ Barcode:
320
+ description: 'A barcode'
321
+ oneOf:
322
+ - $ref: '#/components/schemas/BusinessBarcode'
323
+ - $ref: '#/components/schemas/CatkeyBarcode'
324
+ - $ref: '#/components/schemas/StandardBarcode'
325
+ BusinessBarcode:
326
+ description: The barcode associated with a business library DRO object, prefixed with 2050
327
+ type: string
328
+ pattern: '^2050[0-9]{7}$'
329
+ example: 20503740296
251
330
  CatalogLink:
252
331
  type: object
253
332
  additionalProperties: false
@@ -263,6 +342,11 @@ components:
263
342
  description: Record identifier that is unique within the context of the linked record's catalog.
264
343
  type: string
265
344
  example: 11403803
345
+ CatkeyBarcode:
346
+ description: The barcode associated with a DRO object based on catkey, prefixed with 36105
347
+ type: string
348
+ pattern: '^[0-9]+-[0-9]+$'
349
+ example: 6772719-1001
266
350
  Collection:
267
351
  description: A group of Digital Repository Objects that indicate some type of conceptual grouping within the domain that is worth reusing across the system.
268
352
  type: object
@@ -347,6 +431,11 @@ components:
347
431
  valueAt:
348
432
  description: URL or other pointer to the location of the contributor information.
349
433
  type: string
434
+ parallelContributor:
435
+ description: For multiple representations of information about the same contributor (e.g. in different languages).
436
+ type: array
437
+ items:
438
+ $ref: "#/components/schemas/DescriptiveParallelContributor"
350
439
  Description:
351
440
  type: object
352
441
  additionalProperties: false
@@ -581,6 +670,43 @@ components:
581
670
  type: array
582
671
  items:
583
672
  $ref: "#/components/schemas/DescriptiveValue"
673
+ DescriptiveParallelContributor:
674
+ description: Value model for multiple representations of information about the same contributor (e.g. in different languages).
675
+ type: object
676
+ additionalProperties: false
677
+ properties:
678
+ name:
679
+ description: Names associated with a contributor.
680
+ type: array
681
+ items:
682
+ $ref: "#/components/schemas/DescriptiveValue"
683
+ type:
684
+ description: Entity type of the contributor (person, organization, etc.).
685
+ type: string
686
+ status:
687
+ description: Status of the contributor relative to other parallel contributors (e.g. the primary author among a group of contributors).
688
+ type: string
689
+ role:
690
+ description: Relationships of the contributor to the resource or to an event in its history.
691
+ type: array
692
+ items:
693
+ $ref: "#/components/schemas/DescriptiveValue"
694
+ identifier:
695
+ description: Identifiers and URIs associated with the contributor entity.
696
+ type: array
697
+ items:
698
+ $ref: "#/components/schemas/DescriptiveValue"
699
+ note:
700
+ description: Other information associated with the contributor.
701
+ type: array
702
+ items:
703
+ $ref: "#/components/schemas/DescriptiveValue"
704
+ valueAt:
705
+ description: URL or other pointer to the location of the contributor information.
706
+ type: string
707
+ valueLanguage:
708
+ # description: Language of the descriptive element value
709
+ $ref: "#/components/schemas/DescriptiveValueLanguage"
584
710
  DescriptiveParallelEvent:
585
711
  description: Value model for multiple representations of information about the same event (e.g. in different languages).
586
712
  type: object
@@ -767,6 +893,9 @@ components:
767
893
  description: The human readable use and reproduction statement that applies
768
894
  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).
769
895
  type: string
896
+ license:
897
+ description: The license governing reuse of the DRO. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
898
+ type: string
770
899
  DROStructural:
771
900
  description: Structural metadata
772
901
  type: object
@@ -959,6 +1088,9 @@ components:
959
1088
  type: object
960
1089
  additionalProperties: false
961
1090
  properties:
1091
+ publish:
1092
+ type: boolean
1093
+ default: false
962
1094
  sdrPreserve:
963
1095
  type: boolean
964
1096
  default: true
@@ -966,6 +1098,7 @@ components:
966
1098
  type: boolean
967
1099
  default: false
968
1100
  required:
1101
+ - publish
969
1102
  - sdrPreserve
970
1103
  - shelve
971
1104
  FileSet:
@@ -977,7 +1110,22 @@ components:
977
1110
  description: The content type of the Fileset.
978
1111
  type: string
979
1112
  enum:
980
- - 'http://cocina.sul.stanford.edu/models/fileset.jsonld'
1113
+ - 'http://cocina.sul.stanford.edu/models/resources/audio.jsonld'
1114
+ - 'http://cocina.sul.stanford.edu/models/resources/attachment.jsonld'
1115
+ - 'http://cocina.sul.stanford.edu/models/resources/document.jsonld'
1116
+ - 'http://cocina.sul.stanford.edu/models/resources/file.jsonld'
1117
+ - 'http://cocina.sul.stanford.edu/models/resources/image.jsonld'
1118
+ - 'http://cocina.sul.stanford.edu/models/resources/main-augmented.jsonld'
1119
+ - 'http://cocina.sul.stanford.edu/models/resources/main-original.jsonld'
1120
+ - 'http://cocina.sul.stanford.edu/models/resources/media.jsonld'
1121
+ - 'http://cocina.sul.stanford.edu/models/resources/object.jsonld'
1122
+ - 'http://cocina.sul.stanford.edu/models/resources/page.jsonld'
1123
+ - 'http://cocina.sul.stanford.edu/models/resources/permissions.jsonld'
1124
+ - 'http://cocina.sul.stanford.edu/models/resources/preview.jsonld'
1125
+ - 'http://cocina.sul.stanford.edu/models/resources/supplement.jsonld'
1126
+ - 'http://cocina.sul.stanford.edu/models/resources/3d.jsonld'
1127
+ - 'http://cocina.sul.stanford.edu/models/resources/thumb.jsonld'
1128
+ - 'http://cocina.sul.stanford.edu/models/resources/video.jsonld'
981
1129
  externalIdentifier:
982
1130
  type: string
983
1131
  label:
@@ -1022,6 +1170,8 @@ components:
1022
1170
  type: array
1023
1171
  items:
1024
1172
  $ref: '#/components/schemas/CatalogLink'
1173
+ barcode:
1174
+ $ref: '#/components/schemas/Barcode'
1025
1175
  Language:
1026
1176
  description: Languages, scripts, symbolic systems, and notations used in all
1027
1177
  or part of a resource or its descriptive metadata.
@@ -1394,7 +1544,22 @@ components:
1394
1544
  type:
1395
1545
  type: string
1396
1546
  enum:
1397
- - 'http://cocina.sul.stanford.edu/models/fileset.jsonld'
1547
+ - 'http://cocina.sul.stanford.edu/models/resources/audio.jsonld'
1548
+ - 'http://cocina.sul.stanford.edu/models/resources/attachment.jsonld'
1549
+ - 'http://cocina.sul.stanford.edu/models/resources/document.jsonld'
1550
+ - 'http://cocina.sul.stanford.edu/models/resources/file.jsonld'
1551
+ - 'http://cocina.sul.stanford.edu/models/resources/image.jsonld'
1552
+ - 'http://cocina.sul.stanford.edu/models/resources/main-augmented.jsonld'
1553
+ - 'http://cocina.sul.stanford.edu/models/resources/main-original.jsonld'
1554
+ - 'http://cocina.sul.stanford.edu/models/resources/media.jsonld'
1555
+ - 'http://cocina.sul.stanford.edu/models/resources/object.jsonld'
1556
+ - 'http://cocina.sul.stanford.edu/models/resources/page.jsonld'
1557
+ - 'http://cocina.sul.stanford.edu/models/resources/permissions.jsonld'
1558
+ - 'http://cocina.sul.stanford.edu/models/resources/preview.jsonld'
1559
+ - 'http://cocina.sul.stanford.edu/models/resources/supplement.jsonld'
1560
+ - 'http://cocina.sul.stanford.edu/models/resources/3d.jsonld'
1561
+ - 'http://cocina.sul.stanford.edu/models/resources/thumb.jsonld'
1562
+ - 'http://cocina.sul.stanford.edu/models/resources/video.jsonld'
1398
1563
  label:
1399
1564
  type: string
1400
1565
  version:
@@ -1426,6 +1591,8 @@ components:
1426
1591
  type: array
1427
1592
  items:
1428
1593
  $ref: '#/components/schemas/CatalogLink'
1594
+ barcode:
1595
+ $ref: '#/components/schemas/Barcode'
1429
1596
  required:
1430
1597
  - sourceId
1431
1598
  Sequence:
@@ -1505,6 +1672,11 @@ components:
1505
1672
  type: string
1506
1673
  source:
1507
1674
  $ref: "#/components/schemas/Source"
1675
+ StandardBarcode:
1676
+ description: The standard barcode associated with a DRO object, prefixed with 36105
1677
+ type: string
1678
+ pattern: '^36105[0-9]{9}$'
1679
+ example: 36105010362304
1508
1680
  Title:
1509
1681
  type: object
1510
1682
  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.53.1
4
+ version: 0.56.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-03-11 00:00:00.000000000 Z
11
+ date: 2021-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -258,9 +258,12 @@ files:
258
258
  - lib/cocina/models/access_role_member.rb
259
259
  - lib/cocina/models/admin_policy.rb
260
260
  - lib/cocina/models/admin_policy_administrative.rb
261
+ - lib/cocina/models/admin_policy_default_access.rb
261
262
  - lib/cocina/models/administrative.rb
262
263
  - lib/cocina/models/applies_to.rb
264
+ - lib/cocina/models/business_barcode.rb
263
265
  - lib/cocina/models/catalog_link.rb
266
+ - lib/cocina/models/catkey_barcode.rb
264
267
  - lib/cocina/models/checkable.rb
265
268
  - lib/cocina/models/collection.rb
266
269
  - lib/cocina/models/collection_identification.rb
@@ -271,6 +274,7 @@ files:
271
274
  - lib/cocina/models/descriptive_basic_value.rb
272
275
  - lib/cocina/models/descriptive_geographic_metadata.rb
273
276
  - lib/cocina/models/descriptive_grouped_value.rb
277
+ - lib/cocina/models/descriptive_parallel_contributor.rb
274
278
  - lib/cocina/models/descriptive_parallel_event.rb
275
279
  - lib/cocina/models/descriptive_parallel_value.rb
276
280
  - lib/cocina/models/descriptive_structured_value.rb
@@ -306,6 +310,7 @@ files:
306
310
  - lib/cocina/models/source.rb
307
311
  - lib/cocina/models/source_id.rb
308
312
  - lib/cocina/models/standard.rb
313
+ - lib/cocina/models/standard_barcode.rb
309
314
  - lib/cocina/models/title.rb
310
315
  - lib/cocina/models/validator.rb
311
316
  - lib/cocina/models/version.rb
@@ -329,7 +334,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
329
334
  - !ruby/object:Gem::Version
330
335
  version: '0'
331
336
  requirements: []
332
- rubygems_version: 3.1.4
337
+ rubygems_version: 3.0.3
333
338
  signing_key:
334
339
  specification_version: 4
335
340
  summary: Data models for the SDR