cocina-models 0.31.1 → 0.35.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/.github/pull_request_template.md +8 -1
  3. data/.rubocop.yml +53 -2
  4. data/README.md +7 -13
  5. data/cocina-models.gemspec +2 -2
  6. data/docs/index.html +20 -0
  7. data/docs/maps/DRO.json +1 -1
  8. data/lib/cocina/generator/generator.rb +3 -0
  9. data/lib/cocina/generator/schema_value.rb +2 -2
  10. data/lib/cocina/models.rb +1 -2
  11. data/lib/cocina/models/access.rb +4 -0
  12. data/lib/cocina/models/admin_policy_administrative.rb +1 -1
  13. data/lib/cocina/models/administrative.rb +1 -1
  14. data/lib/cocina/models/contributor.rb +3 -1
  15. data/lib/cocina/models/description.rb +4 -2
  16. data/lib/cocina/models/descriptive_access_metadata.rb +13 -0
  17. data/lib/cocina/models/descriptive_admin_metadata.rb +3 -1
  18. data/lib/cocina/models/descriptive_basic_value.rb +10 -3
  19. data/lib/cocina/models/descriptive_parallel_value.rb +9 -0
  20. data/lib/cocina/models/descriptive_structured_value.rb +1 -1
  21. data/lib/cocina/models/descriptive_value.rb +10 -4
  22. data/lib/cocina/models/descriptive_value_required.rb +10 -4
  23. data/lib/cocina/models/dro.rb +1 -1
  24. data/lib/cocina/models/dro_access.rb +7 -1
  25. data/lib/cocina/models/event.rb +1 -1
  26. data/lib/cocina/models/file.rb +1 -1
  27. data/lib/cocina/models/identification.rb +2 -0
  28. data/lib/cocina/models/language.rb +30 -0
  29. data/lib/cocina/models/related_resource.rb +21 -0
  30. data/lib/cocina/models/request_collection.rb +1 -1
  31. data/lib/cocina/models/request_dro.rb +2 -2
  32. data/lib/cocina/models/request_identification.rb +13 -0
  33. data/lib/cocina/models/sequence.rb +1 -0
  34. data/lib/cocina/models/source.rb +1 -0
  35. data/lib/cocina/models/standard.rb +16 -0
  36. data/lib/cocina/models/version.rb +1 -1
  37. data/openapi.yml +425 -113
  38. metadata +14 -12
  39. data/docs/README.md +0 -9
  40. data/docs/_config.yml +0 -1
  41. data/docs/meta.json +0 -9
  42. data/docs/schema.json +0 -1654
  43. data/docs/schema.md +0 -268
@@ -3,13 +3,13 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class Event < Struct
6
+ attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
6
7
  # Description of the event (creation, publication, etc.).
7
8
  attribute :type, Types::Strict::String.meta(omittable: true)
8
9
  attribute :date, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
9
10
  attribute :contributor, Types::Strict::Array.of(Contributor).meta(omittable: true)
10
11
  attribute :location, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
11
12
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
12
- attribute :structuredValue, Types::Strict::Array.of(DescriptiveBasicValue).meta(omittable: true)
13
13
  end
14
14
  end
15
15
  end
@@ -14,7 +14,7 @@ module Cocina
14
14
  # Primary processing label (can be same as title) for a File.
15
15
  attribute :label, Types::Strict::String
16
16
  # Filename for a file. Can be same as label.
17
- attribute :filename, Types::Strict::String.meta(omittable: true)
17
+ attribute :filename, Types::Strict::String
18
18
  # Size of the File (binary) in bytes.
19
19
  attribute :size, Types::Strict::Integer.meta(omittable: true)
20
20
  # Version for the File within SDR.
@@ -3,6 +3,8 @@
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.
7
+
6
8
  # example: sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026
7
9
  attribute :sourceId, Types::Strict::String.meta(omittable: true)
8
10
  attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).meta(omittable: true)
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class Language < Struct
6
+ attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
7
+ attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
8
+ # String value of the descriptive element.
9
+ attribute :value, Types::Strict::String.meta(omittable: true)
10
+ # Type of value provided by the descriptive element.
11
+ attribute :type, Types::Strict::String.meta(omittable: true)
12
+ # Status of the descriptive element value relative to other instances of the element.
13
+ attribute :status, Types::Strict::String.meta(omittable: true)
14
+ # Code value of the descriptive element.
15
+ attribute :code, Types::Strict::String.meta(omittable: true)
16
+ # URI value of the descriptive element.
17
+ attribute :uri, Types::Strict::String.meta(omittable: true)
18
+ attribute :standard, Standard.optional.meta(omittable: true)
19
+ attribute :encoding, Standard.optional.meta(omittable: true)
20
+ attribute :source, Source.optional.meta(omittable: true)
21
+ # The preferred display label to use for the descriptive element in access systems.
22
+ attribute :displayLabel, Types::Strict::String.meta(omittable: true)
23
+ # A term providing information about the circumstances of the statement (e.g., approximate dates).
24
+ attribute :qualifier, Types::Strict::String.meta(omittable: true)
25
+ attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
26
+ attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).meta(omittable: true)
27
+ attribute :script, DescriptiveValue.optional.meta(omittable: true)
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class RelatedResource < Struct
6
+ # The relationship of the related resource to the described resource.
7
+ attribute :type, Types::Strict::String.meta(omittable: true)
8
+ attribute :title, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
9
+ attribute :contributor, Types::Strict::Array.of(Contributor).meta(omittable: true)
10
+ attribute :event, Types::Strict::Array.of(Event).meta(omittable: true)
11
+ attribute :form, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
12
+ attribute :language, Types::Strict::Array.of(Language).meta(omittable: true)
13
+ attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
14
+ attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
15
+ attribute :subject, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
16
+ # Stanford persistent URL associated with the related resource.
17
+ attribute :purl, Types::Strict::String.meta(omittable: true)
18
+ attribute :access, DescriptiveAccessMetadata.optional.meta(omittable: true)
19
+ end
20
+ end
21
+ end
@@ -16,7 +16,7 @@ module Cocina
16
16
  attribute :label, Types::Strict::String
17
17
  attribute :version, Types::Strict::Integer
18
18
  attribute(:access, Access.default { Access.new })
19
- attribute :administrative, Administrative.optional.meta(omittable: true)
19
+ attribute(:administrative, Administrative.default { Administrative.new })
20
20
  attribute :description, Description.optional.meta(omittable: true)
21
21
  attribute :identification, CollectionIdentification.optional.meta(omittable: true)
22
22
 
@@ -26,9 +26,9 @@ module Cocina
26
26
  attribute :label, Types::Strict::String
27
27
  attribute :version, Types::Strict::Integer
28
28
  attribute :access, DROAccess.optional.meta(omittable: true)
29
- attribute :administrative, Administrative.optional.meta(omittable: true)
29
+ attribute(:administrative, Administrative.default { Administrative.new })
30
30
  attribute :description, Description.optional.meta(omittable: true)
31
- attribute :identification, Identification.optional.meta(omittable: true)
31
+ attribute(:identification, RequestIdentification.default { RequestIdentification.new })
32
32
  attribute :structural, RequestDROStructural.optional.meta(omittable: true)
33
33
  attribute :geographic, Geographic.optional.meta(omittable: true)
34
34
 
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
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.
7
+
8
+ # example: sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026
9
+ attribute :sourceId, Types::Strict::String
10
+ attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).meta(omittable: true)
11
+ end
12
+ end
13
+ end
@@ -3,6 +3,7 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class Sequence < Struct
6
+ attribute :members, Types::Strict::Array.of(Types::Strict::String).meta(omittable: true)
6
7
  # The direction that a sequence of canvases should be displayed to the user
7
8
  attribute :viewingDirection, Types::Strict::String.enum('right-to-left', 'left-to-right').meta(omittable: true)
8
9
  end
@@ -9,6 +9,7 @@ module Cocina
9
9
  attribute :uri, Types::Strict::String.meta(omittable: true)
10
10
  # String describing the value source.
11
11
  attribute :value, Types::Strict::String.meta(omittable: true)
12
+ attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
12
13
  end
13
14
  end
14
15
  end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class Standard < 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
+ end
15
+ end
16
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.31.1'
5
+ VERSION = '0.35.0'
6
6
  end
7
7
  end
@@ -96,6 +96,7 @@ components:
96
96
  Access:
97
97
  description: Access metadata
98
98
  type: object
99
+ additionalProperties: false
99
100
  properties:
100
101
  access:
101
102
  description: Access level
@@ -107,8 +108,28 @@ components:
107
108
  - 'citation-only'
108
109
  - 'dark'
109
110
  default: 'dark'
111
+ download:
112
+ description: Download access level for a file
113
+ type: string
114
+ enum:
115
+ - 'world'
116
+ - 'stanford'
117
+ - 'location-based'
118
+ - 'none'
119
+ default: 'none'
120
+ readLocation:
121
+ description: If access is "location-based", which location should have access.
122
+ type: string
123
+ enum:
124
+ - 'spec'
125
+ - 'music'
126
+ - 'ars'
127
+ - 'art'
128
+ - 'hoover'
129
+ - 'm&m'
110
130
  Administrative:
111
131
  type: object
132
+ additionalProperties: false
112
133
  properties:
113
134
  hasAdminPolicy:
114
135
  $ref: '#/components/schemas/Druid'
@@ -121,8 +142,11 @@ components:
121
142
  description: Administrative or Internal project this resource is a part of
122
143
  example: Google Books
123
144
  type: string
145
+ required:
146
+ - hasAdminPolicy
124
147
  AdminPolicy:
125
148
  type: object
149
+ additionalProperties: false
126
150
  properties:
127
151
  type:
128
152
  type: string
@@ -140,13 +164,14 @@ components:
140
164
  description:
141
165
  $ref: '#/components/schemas/Description'
142
166
  required:
167
+ - administrative
143
168
  - externalIdentifier
144
169
  - label
145
170
  - type
146
171
  - version
147
- - administrative
148
172
  AdminPolicyAdministrative:
149
173
  type: object
174
+ additionalProperties: false
150
175
  properties:
151
176
  defaultObjectRights:
152
177
  type: string
@@ -155,10 +180,13 @@ components:
155
180
  type: string
156
181
  hasAdminPolicy:
157
182
  type: string
183
+ required:
184
+ - hasAdminPolicy
158
185
  AppliesTo:
159
186
  description: Property model for indicating the parts, aspects, or versions of the resource to which a
160
187
  descriptive element is applicable.
161
188
  type: object
189
+ additionalProperties: false
162
190
  properties:
163
191
  appliesTo:
164
192
  type: array
@@ -166,6 +194,7 @@ components:
166
194
  $ref: "#/components/schemas/DescriptiveBasicValue"
167
195
  CatalogLink:
168
196
  type: object
197
+ additionalProperties: false
169
198
  required:
170
199
  - catalog
171
200
  - catalogRecordId
@@ -181,6 +210,7 @@ components:
181
210
  Collection:
182
211
  description: A group of Digital Repository Objects that indicate some type of conceptual grouping within the domain that is worth reusing across the system.
183
212
  type: object
213
+ additionalProperties: false
184
214
  properties:
185
215
  type:
186
216
  description: The content type of the Collection. Selected from an established set of values.
@@ -216,6 +246,7 @@ components:
216
246
  - access
217
247
  CollectionIdentification:
218
248
  type: object
249
+ additionalProperties: false
219
250
  properties:
220
251
  catalogLinks:
221
252
  type: array
@@ -223,8 +254,9 @@ components:
223
254
  $ref: '#/components/schemas/CatalogLink'
224
255
  Contributor:
225
256
  description: Property model for describing agents contributing in some way to
226
- the creation and history of the resource
257
+ the creation and history of the resource.
227
258
  type: object
259
+ additionalProperties: false
228
260
  properties:
229
261
  name:
230
262
  description: Names associated with a contributor.
@@ -235,7 +267,8 @@ components:
235
267
  description: Entity type of the contributor (person, organization, etc.).
236
268
  type: string
237
269
  status:
238
- description: Status of the contributor relative to other parallel contributors.
270
+ description: Status of the contributor relative to other parallel contributors
271
+ (e.g. the primary author among a group of contributors).
239
272
  type: string
240
273
  role:
241
274
  description: Relationships of the contributor to the resource or to an event
@@ -243,87 +276,19 @@ components:
243
276
  type: array
244
277
  items:
245
278
  $ref: "#/components/schemas/DescriptiveValue"
246
- DescriptiveAdminMetadata:
247
- description: Information about this description of the resource.
248
- type: object
249
- properties:
250
- contributor:
251
- type: array
252
- items:
253
- $ref: "#/components/schemas/Contributor"
254
- event:
255
- type: array
256
- items:
257
- $ref: "#/components/schemas/Event"
258
- language:
279
+ identifier:
280
+ description: Identifiers and URIs associated with the contributor entity.
259
281
  type: array
260
282
  items:
261
283
  $ref: "#/components/schemas/DescriptiveValue"
262
284
  note:
285
+ description: Other information associated with the contributor.
263
286
  type: array
264
287
  items:
265
288
  $ref: "#/components/schemas/DescriptiveValue"
266
- DescriptiveBasicValue:
267
- description: Value model for descriptive elements without recursive properties.
268
- type: object
269
- properties:
270
- value:
271
- description: String value of the descriptive element.
272
- type: string
273
- type:
274
- description: Type of value provided by the descriptive element.
275
- type: string
276
- status:
277
- description: Status of the descriptive element relative to other instances
278
- of the element.
279
- type: string
280
- code:
281
- description: Code value of the descriptive element.
282
- type: string
283
- uri:
284
- description: URI value of the descriptive element.
285
- type: string
286
- format: uri
287
- standard:
288
- description: Descriptive or content standard to which the value conforms.
289
- type: array
290
- items:
291
- type: string
292
- encoding:
293
- description: Encoding schema, standard, or syntax to which the value conforms.
294
- type: array
295
- items:
296
- type: string
297
- source:
298
- $ref: "#/components/schemas/Source"
299
- DescriptiveStructuredValue:
300
- description: Value model for descriptive elements structured as typed values.
301
- type: object
302
- properties:
303
- structuredValue:
304
- type: array
305
- items:
306
- $ref: "#/components/schemas/DescriptiveBasicValue"
307
- DescriptiveValue:
308
- description: Default value model for descriptive elements.
309
- type: object
310
- allOf:
311
- - $ref: "#/components/schemas/DescriptiveBasicValue"
312
- - $ref: "#/components/schemas/DescriptiveStructuredValue"
313
- - $ref: "#/components/schemas/AppliesTo"
314
- DescriptiveValueRequired:
315
- type: object
316
- allOf:
317
- - $ref: "#/components/schemas/DescriptiveValue"
318
- - anyOf:
319
- - type: object
320
- required:
321
- - value
322
- - type: object
323
- required:
324
- - structuredValue
325
289
  Description:
326
290
  type: object
291
+ additionalProperties: false
327
292
  properties:
328
293
  title:
329
294
  description: Titles of the resource.
@@ -349,17 +314,23 @@ components:
349
314
  items:
350
315
  $ref: "#/components/schemas/DescriptiveValue"
351
316
  language:
352
- description: Languages, scripts, and notations used in all or part of a resource.
317
+ description: Languages, scripts, symbolic systems, and notations used in all or
318
+ part of a resource.
353
319
  type: array
354
320
  items:
355
- $ref: "#/components/schemas/DescriptiveValue"
321
+ $ref: "#/components/schemas/Language"
356
322
  note:
357
323
  description: Additional information relevant to a resource.
358
324
  type: array
359
325
  items:
360
326
  $ref: "#/components/schemas/DescriptiveValue"
361
327
  identifier:
362
- description: Unique strings associated with the resource.
328
+ description: Identifiers and URIs associated with the resource.
329
+ type: array
330
+ items:
331
+ $ref: "#/components/schemas/DescriptiveValue"
332
+ subject:
333
+ description: Terms associated with the intellectual content of the resource.
363
334
  type: array
364
335
  items:
365
336
  $ref: "#/components/schemas/DescriptiveValue"
@@ -367,11 +338,13 @@ components:
367
338
  description: Stanford persistent URL associated with the resource.
368
339
  type: string
369
340
  format: uri
370
- url:
371
- description: URLs where the resource may be accessed in full or part.
341
+ access:
342
+ $ref: "#/components/schemas/DescriptiveAccessMetadata"
343
+ relatedResource:
344
+ description: Other resources associated with the described resource.
372
345
  type: array
373
346
  items:
374
- $ref: "#/components/schemas/DescriptiveValue"
347
+ $ref: "#/components/schemas/RelatedResource"
375
348
  marcEncodedData:
376
349
  description: Data about the resource represented in MARC fixed fields and codes.
377
350
  type: array
@@ -381,9 +354,158 @@ components:
381
354
  $ref: "#/components/schemas/DescriptiveAdminMetadata"
382
355
  required:
383
356
  - title
357
+ DescriptiveAccessMetadata:
358
+ description: Information about how to access digital and physical versions of the object.
359
+ type: object
360
+ additionalProperties: false
361
+ properties:
362
+ url:
363
+ description: URLs where the resource may be accessed in full or part.
364
+ type: array
365
+ items:
366
+ $ref: "#/components/schemas/DescriptiveValue"
367
+ physicalLocation:
368
+ description: Location of a physical version of the resource.
369
+ type: array
370
+ items:
371
+ $ref: "#/components/schemas/DescriptiveValue"
372
+ accessContact:
373
+ description: The library, organization, or person responsible for access to the resource.
374
+ type: array
375
+ items:
376
+ $ref: "#/components/schemas/DescriptiveValue"
377
+ digitalRepository:
378
+ description: The digital repositories that hold the resource.
379
+ type: array
380
+ items:
381
+ $ref: "#/components/schemas/DescriptiveValue"
382
+ note:
383
+ description: Other information related to accessing the resource.
384
+ type: array
385
+ items:
386
+ $ref: "#/components/schemas/DescriptiveValue"
387
+ DescriptiveAdminMetadata:
388
+ description: Information about this resource description.
389
+ type: object
390
+ additionalProperties: false
391
+ properties:
392
+ contributor:
393
+ description: Contributors to this resource description.
394
+ type: array
395
+ items:
396
+ $ref: "#/components/schemas/Contributor"
397
+ event:
398
+ description: Events in the history of this resource description.
399
+ type: array
400
+ items:
401
+ $ref: "#/components/schemas/Event"
402
+ language:
403
+ description: Languages, scripts, symbolic systems, and notations used
404
+ in this resource description.
405
+ type: array
406
+ items:
407
+ $ref: "#/components/schemas/Language"
408
+ note:
409
+ description: Other information related to this resource description.
410
+ type: array
411
+ items:
412
+ $ref: "#/components/schemas/DescriptiveValue"
413
+ standard:
414
+ # description: Descriptive or content standard to which this resource description conforms.
415
+ $ref: "#/components/schemas/Standard"
416
+ identifier:
417
+ description: Identifiers associated with this resource description.
418
+ type: array
419
+ items:
420
+ $ref: "#/components/schemas/DescriptiveValue"
421
+ DescriptiveBasicValue:
422
+ description: Basic value model for descriptive elements.
423
+ type: object
424
+ # additionalProperties breaks the validator, unclear as to why.
425
+ # additionalProperties: false
426
+ allOf:
427
+ - $ref: "#/components/schemas/DescriptiveStructuredValue"
428
+ - $ref: "#/components/schemas/DescriptiveParallelValue"
429
+ - type: object
430
+ additionalProperties: false
431
+ properties:
432
+ value:
433
+ description: String value of the descriptive element.
434
+ type: string
435
+ type:
436
+ description: Type of value provided by the descriptive element.
437
+ type: string
438
+ status:
439
+ description: Status of the descriptive element value relative to other instances
440
+ of the element.
441
+ type: string
442
+ code:
443
+ description: Code value of the descriptive element.
444
+ type: string
445
+ uri:
446
+ description: URI value of the descriptive element.
447
+ type: string
448
+ format: uri
449
+ standard:
450
+ # description: Descriptive or content standard to which the value conforms.
451
+ $ref: "#/components/schemas/Standard"
452
+ encoding:
453
+ # description: Encoding schema, standard, or syntax to which the value conforms.
454
+ $ref: "#/components/schemas/Standard"
455
+ source:
456
+ $ref: "#/components/schemas/Source"
457
+ displayLabel:
458
+ description: The preferred display label to use for the descriptive element in access systems.
459
+ type: string
460
+ qualifier:
461
+ description: A term providing information about the circumstances of the statement (e.g., approximate dates).
462
+ type: string
463
+ note:
464
+ description: Other information related to the descriptive element.
465
+ type: array
466
+ items:
467
+ $ref: "#/components/schemas/DescriptiveValue"
468
+ DescriptiveParallelValue:
469
+ description: Value model for multiple representations of the same information (e.g. in different languages).
470
+ type: object
471
+ additionalProperties: false
472
+ properties:
473
+ parallelValue:
474
+ type: array
475
+ items:
476
+ $ref: "#/components/schemas/DescriptiveValue"
477
+ DescriptiveStructuredValue:
478
+ description: Value model for descriptive elements structured as typed, ordered values.
479
+ type: object
480
+ additionalProperties: false
481
+ properties:
482
+ structuredValue:
483
+ type: array
484
+ items:
485
+ $ref: "#/components/schemas/DescriptiveValue"
486
+ DescriptiveValue:
487
+ description: Default value model for descriptive elements.
488
+ type: object
489
+ additionalProperties: false
490
+ allOf:
491
+ - $ref: "#/components/schemas/DescriptiveBasicValue"
492
+ - $ref: "#/components/schemas/AppliesTo"
493
+ DescriptiveValueRequired:
494
+ type: object
495
+ additionalProperties: false
496
+ allOf:
497
+ - $ref: "#/components/schemas/DescriptiveValue"
498
+ - anyOf:
499
+ - type: object
500
+ required:
501
+ - value
502
+ - type: object
503
+ required:
504
+ - structuredValue
384
505
  DRO:
385
506
  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.
386
507
  type: object
508
+ additionalProperties: false
387
509
  properties:
388
510
  type:
389
511
  description: The content type of the DRO. Selected from an established set of values.
@@ -426,13 +548,15 @@ components:
426
548
  geographic:
427
549
  $ref: '#/components/schemas/Geographic'
428
550
  required:
551
+ - access
552
+ - administrative
429
553
  - externalIdentifier
430
554
  - label
431
555
  - type
432
556
  - version
433
- - access
434
557
  DROAccess:
435
558
  type: object
559
+ additionalProperties: false
436
560
  properties:
437
561
  access:
438
562
  type: string
@@ -447,15 +571,43 @@ components:
447
571
  description: The human readable copyright statement that applies
448
572
  example: Copyright World Trade Organization
449
573
  type: string
574
+ embargo:
575
+ $ref: '#/components/schemas/Embargo'
576
+ download:
577
+ description: >
578
+ Download access level. This is used in the transition from Fedora as
579
+ a way to set a default download level at registration that is copied
580
+ down to all the files.
581
+
582
+ type: string
583
+ enum:
584
+ - 'world'
585
+ - 'stanford'
586
+ - 'location-based'
587
+ - 'none'
588
+ default: 'none'
589
+ readLocation:
590
+ description: >
591
+ If access is "location-based", which location should have access.
592
+ This is used in the transition from Fedora as a way to set a default
593
+ readLocation at registration that is copied down to all the files.
594
+
595
+ type: string
596
+ enum:
597
+ - 'spec'
598
+ - 'music'
599
+ - 'ars'
600
+ - 'art'
601
+ - 'hoover'
602
+ - 'm&m'
450
603
  useAndReproductionStatement:
451
604
  description: The human readable use and reproduction statement that applies
452
605
  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).
453
606
  type: string
454
- embargo:
455
- $ref: '#/components/schemas/Embargo'
456
607
  DROStructural:
457
608
  description: Structural metadata
458
609
  type: object
610
+ additionalProperties: false
459
611
  properties:
460
612
  contains:
461
613
  description: Filesets that contain the digital representations (Files)
@@ -478,6 +630,7 @@ components:
478
630
  example: 'druid:bc123df4567'
479
631
  Embargo:
480
632
  type: object
633
+ additionalProperties: false
481
634
  properties:
482
635
  releaseDate:
483
636
  description: Date when the Collection is released from an embargo.
@@ -503,35 +656,39 @@ components:
503
656
  Event:
504
657
  description: Property model for describing events in the history of the resource.
505
658
  type: object
506
- properties:
507
- type:
508
- description: Description of the event (creation, publication, etc.).
509
- type: string
510
- date:
511
- description: Dates associated with the event.
512
- type: array
513
- items:
514
- $ref: "#/components/schemas/DescriptiveValue"
515
- contributor:
516
- description: Contributors associated with the event.
517
- type: array
518
- items:
519
- $ref: "#/components/schemas/Contributor"
520
- location:
521
- description: Locations associated with the event.
522
- type: array
523
- items:
524
- $ref: "#/components/schemas/DescriptiveValue"
525
- note:
526
- description: Other information about the event.
527
- type: array
528
- items:
529
- $ref: "#/components/schemas/DescriptiveValue"
659
+ additionalProperties: false
530
660
  allOf:
531
661
  - $ref: "#/components/schemas/DescriptiveStructuredValue"
662
+ - type: object
663
+ additionalProperties: false
664
+ properties:
665
+ type:
666
+ description: Description of the event (creation, publication, etc.).
667
+ type: string
668
+ date:
669
+ description: Dates associated with the event.
670
+ type: array
671
+ items:
672
+ $ref: "#/components/schemas/DescriptiveValue"
673
+ contributor:
674
+ description: Contributors associated with the event.
675
+ type: array
676
+ items:
677
+ $ref: "#/components/schemas/Contributor"
678
+ location:
679
+ description: Locations associated with the event.
680
+ type: array
681
+ items:
682
+ $ref: "#/components/schemas/DescriptiveValue"
683
+ note:
684
+ description: Other information about the event.
685
+ type: array
686
+ items:
687
+ $ref: "#/components/schemas/DescriptiveValue"
532
688
  File:
533
689
  description: Binaries that are the basis of what our domain manages. Binaries here do not include metadata files generated for the domain's own management purposes.
534
690
  type: object
691
+ additionalProperties: false
535
692
  properties:
536
693
  type:
537
694
  description: The content type of the File.
@@ -572,6 +729,7 @@ components:
572
729
  required:
573
730
  - externalIdentifier
574
731
  - label
732
+ - filename
575
733
  - type
576
734
  - version
577
735
  - access
@@ -579,6 +737,7 @@ components:
579
737
  - hasMessageDigests
580
738
  FileAdministrative:
581
739
  type: object
740
+ additionalProperties: false
582
741
  properties:
583
742
  sdrPreserve:
584
743
  type: boolean
@@ -592,6 +751,7 @@ components:
592
751
  FileSet:
593
752
  description: Relevant groupings of Files. Also called a File Grouping.
594
753
  type: object
754
+ additionalProperties: false
595
755
  properties:
596
756
  type:
597
757
  description: The content type of the Fileset.
@@ -616,6 +776,7 @@ components:
616
776
  FileSetStructural:
617
777
  description: Structural metadata
618
778
  type: object
779
+ additionalProperties: false
619
780
  properties:
620
781
  contains:
621
782
  type: array
@@ -624,6 +785,7 @@ components:
624
785
  Geographic:
625
786
  description: Geographic metadata
626
787
  type: object
788
+ additionalProperties: false
627
789
  properties:
628
790
  iso19139:
629
791
  description: Geographic ISO 19139 XML metadata
@@ -632,17 +794,42 @@ components:
632
794
  - iso19139
633
795
  Identification:
634
796
  type: object
797
+ additionalProperties: false
635
798
  properties:
636
799
  sourceId:
637
800
  type: string
801
+ description: >
802
+ Unique identifier in some other system. This is because a large proportion of what is deposited in SDR,
803
+ historically and currently, are representations of objects that are also represented in other systems.
804
+ For example, digitized paper and A/V collections have physical manifestations, and those physical objects are managed
805
+ in systems that have their own identifiers. Similarly, books have barcodes, archival materials have collection numbers
806
+ and physical locations, etc. The sourceId allows determining if an item has been deposited before and where to
807
+ look for the original item if you're looking at its SDR representation.
638
808
  example: 'sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026'
639
809
  catalogLinks:
640
810
  type: array
641
811
  items:
642
812
  $ref: '#/components/schemas/CatalogLink'
813
+ Language:
814
+ description: Languages, scripts, symbolic systems, and notations used in all
815
+ or part of a resource.
816
+ type: object
817
+ additionalProperties: false
818
+ allOf:
819
+ - $ref: '#/components/schemas/DescriptiveValue'
820
+ - type: object
821
+ # additionalProperties breaks the validator, presumably because it can't
822
+ # conform to other schemas (allOf) and not have additionalProperties
823
+ # additionalProperties: false
824
+ properties:
825
+ script:
826
+ $ref: '#/components/schemas/DescriptiveValue'
827
+ # description: An alphabet or other notation used to represent a
828
+ # language or other symbolic system associated with the resource.
643
829
  MessageDigest:
644
830
  description: The output of the message digest algorithm.
645
831
  type: object
832
+ additionalProperties: false
646
833
  properties:
647
834
  type:
648
835
  description: The algorithm that was used
@@ -659,6 +846,7 @@ components:
659
846
  Presentation:
660
847
  description: Presentation data for the File.
661
848
  type: object
849
+ additionalProperties: false
662
850
  properties:
663
851
  height:
664
852
  description: Height in pixels
@@ -666,9 +854,67 @@ components:
666
854
  width:
667
855
  description: Width in pixels
668
856
  type: integer
857
+ RelatedResource:
858
+ description: Other resource associated with the described resource.
859
+ type: object
860
+ additionalProperties: false
861
+ properties:
862
+ type:
863
+ description: The relationship of the related resource to the described resource.
864
+ type: string
865
+ title:
866
+ description: Titles of the related resource.
867
+ type: array
868
+ items:
869
+ $ref: "#/components/schemas/DescriptiveValue"
870
+ contributor:
871
+ description: Agents contributing in some way to the creation and history of the
872
+ related resource.
873
+ type: array
874
+ items:
875
+ $ref: "#/components/schemas/Contributor"
876
+ event:
877
+ description: Events in the history of the related resource.
878
+ type: array
879
+ items:
880
+ $ref: "#/components/schemas/Event"
881
+ form:
882
+ description: Characteristics of the related resource's physical, digital, and intellectual
883
+ form and genre.
884
+ type: array
885
+ items:
886
+ $ref: "#/components/schemas/DescriptiveValue"
887
+ language:
888
+ description: Languages, scripts, symbolic systems, and notations used in all or
889
+ part of a related resource.
890
+ type: array
891
+ items:
892
+ $ref: "#/components/schemas/Language"
893
+ note:
894
+ description: Additional information relevant to a related resource.
895
+ type: array
896
+ items:
897
+ $ref: "#/components/schemas/DescriptiveValue"
898
+ identifier:
899
+ description: Identifiers and URIs associated with the related resource.
900
+ type: array
901
+ items:
902
+ $ref: "#/components/schemas/DescriptiveValue"
903
+ subject:
904
+ description: Terms associated with the intellectual content of the related resource.
905
+ type: array
906
+ items:
907
+ $ref: "#/components/schemas/DescriptiveValue"
908
+ purl:
909
+ description: Stanford persistent URL associated with the related resource.
910
+ type: string
911
+ format: uri
912
+ access:
913
+ $ref: "#/components/schemas/DescriptiveAccessMetadata"
669
914
  ReleaseTag:
670
915
  description: A tag that indicates the item or collection should be released.
671
916
  type: object
917
+ additionalProperties: false
672
918
  required:
673
919
  - release
674
920
  properties:
@@ -696,6 +942,7 @@ components:
696
942
  RequestAdminPolicy:
697
943
  description: Same as an AdminPolicy, but doesn't have an externalIdentifier as one will be created
698
944
  type: object
945
+ additionalProperties: false
699
946
  properties:
700
947
  type:
701
948
  type: string
@@ -711,13 +958,14 @@ components:
711
958
  description:
712
959
  $ref: '#/components/schemas/Description'
713
960
  required:
961
+ - administrative
714
962
  - label
715
963
  - type
716
964
  - version
717
- - administrative
718
965
  RequestCollection:
719
966
  description: Same as a Collection, but doesn't have an externalIdentifier as one will be created
720
967
  type: object
968
+ additionalProperties: false
721
969
  properties:
722
970
  type:
723
971
  type: string
@@ -741,13 +989,15 @@ components:
741
989
  identification:
742
990
  $ref: '#/components/schemas/CollectionIdentification'
743
991
  required:
992
+ - access
993
+ - administrative
744
994
  - label
745
995
  - type
746
996
  - version
747
- - access
748
997
  RequestDRO:
749
998
  description: A request to create a DRO. This has the same general structure as a DRO but doesn't have externalIdentifier and doesn't require the access subschema. If no access subschema is provided, these values will be inherited from the AdminPolicy.
750
999
  type: object
1000
+ additionalProperties: false
751
1001
  properties:
752
1002
  type:
753
1003
  type: string
@@ -779,18 +1029,21 @@ components:
779
1029
  description:
780
1030
  $ref: '#/components/schemas/Description'
781
1031
  identification:
782
- $ref: '#/components/schemas/Identification'
1032
+ $ref: '#/components/schemas/RequestIdentification'
783
1033
  structural:
784
1034
  $ref: '#/components/schemas/RequestDROStructural'
785
1035
  geographic:
786
1036
  $ref: '#/components/schemas/Geographic'
787
1037
  required:
1038
+ - administrative
1039
+ - identification
788
1040
  - label
789
1041
  - type
790
1042
  - version
791
1043
  RequestDROStructural:
792
1044
  description: Structural metadata
793
1045
  type: object
1046
+ additionalProperties: false
794
1047
  properties:
795
1048
  contains:
796
1049
  type: array
@@ -806,6 +1059,7 @@ components:
806
1059
  type: string
807
1060
  RequestFile:
808
1061
  type: object
1062
+ additionalProperties: false
809
1063
  properties:
810
1064
  type:
811
1065
  type: string
@@ -845,6 +1099,7 @@ components:
845
1099
  - hasMessageDigests
846
1100
  RequestFileSet:
847
1101
  type: object
1102
+ additionalProperties: false
848
1103
  properties:
849
1104
  type:
850
1105
  type: string
@@ -864,15 +1119,43 @@ components:
864
1119
  RequestFileSetStructural:
865
1120
  description: Structural metadata
866
1121
  type: object
1122
+ additionalProperties: false
867
1123
  properties:
868
1124
  contains:
869
1125
  type: array
870
1126
  items:
871
1127
  $ref: '#/components/schemas/RequestFile'
1128
+ RequestIdentification:
1129
+ description: Same as a Identification, but requires a sourceId.
1130
+ type: object
1131
+ additionalProperties: false
1132
+ properties:
1133
+ sourceId:
1134
+ type: string
1135
+ description: >
1136
+ Unique identifier in some other system. This is because a large proportion of what is deposited in SDR,
1137
+ historically and currently, are representations of objects that are also represented in other systems.
1138
+ For example, digitized paper and A/V collections have physical manifestations, and those physical objects are managed
1139
+ in systems that have their own identifiers. Similarly, books have barcodes, archival materials have collection numbers
1140
+ and physical locations, etc. The sourceId allows determining if an item has been deposited before and where to
1141
+ look for the original item if you're looking at its SDR representation.
1142
+ example: 'sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026'
1143
+ catalogLinks:
1144
+ type: array
1145
+ items:
1146
+ $ref: '#/components/schemas/CatalogLink'
1147
+ required:
1148
+ - sourceId
872
1149
  Sequence:
873
1150
  description: A sequence or ordering of resources within a Collection or Object.
874
1151
  type: object
1152
+ additionalProperties: false
875
1153
  properties:
1154
+ members:
1155
+ description: "Identifiers for Members in their stated Order for the Sequence."
1156
+ type: array
1157
+ items:
1158
+ type: string
876
1159
  viewingDirection:
877
1160
  description: The direction that a sequence of canvases should be displayed to the user
878
1161
  type: string
@@ -880,9 +1163,10 @@ components:
880
1163
  - right-to-left
881
1164
  - left-to-right
882
1165
  Source:
883
- description: Property model for indicating the vocabulary, authority, or other
884
- origin for a term, code, or identifier.
1166
+ description: Property model for indicating the vocabulary, authority, or
1167
+ other origin for a term, code, or identifier.
885
1168
  type: object
1169
+ additionalProperties: false
886
1170
  properties:
887
1171
  code:
888
1172
  description: Code representing the value source.
@@ -894,3 +1178,31 @@ components:
894
1178
  value:
895
1179
  description: String describing the value source.
896
1180
  type: string
1181
+ note:
1182
+ description: Other information related to the value source.
1183
+ type: array
1184
+ items:
1185
+ $ref: "#/components/schemas/DescriptiveValue"
1186
+ Standard:
1187
+ description: Property model for indicating the encoding, standard, or syntax
1188
+ to which a value conforms.
1189
+ type: object
1190
+ additionalProperties: false
1191
+ properties:
1192
+ code:
1193
+ description: Code representing the standard or encoding.
1194
+ type: string
1195
+ uri:
1196
+ description: URI for the standard or encoding.
1197
+ type: string
1198
+ format: uri
1199
+ value:
1200
+ description: String describing the standard or encoding.
1201
+ type: string
1202
+ note:
1203
+ description: Other information related to the standard or encoding.
1204
+ type: array
1205
+ items:
1206
+ $ref: "#/components/schemas/DescriptiveValue"
1207
+ source:
1208
+ $ref: "#/components/schemas/Source"