cocina-models 0.58.0 → 0.60.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/.rubocop_todo.yml +5 -5
- data/README.md +33 -24
- data/lib/cocina/generator/schema.rb +30 -2
- data/lib/cocina/generator/schema_array.rb +1 -1
- data/lib/cocina/generator/schema_base.rb +18 -8
- data/lib/cocina/generator/schema_ref.rb +1 -1
- data/lib/cocina/generator/schema_value.rb +2 -2
- data/lib/cocina/models/access.rb +10 -11
- data/lib/cocina/models/admin_policy_administrative.rb +3 -3
- data/lib/cocina/models/admin_policy_default_access.rb +4 -4
- data/lib/cocina/models/administrative.rb +1 -1
- data/lib/cocina/models/citation_only_access.rb +15 -0
- data/lib/cocina/models/collection.rb +1 -1
- data/lib/cocina/models/collection_access.rb +18 -0
- data/lib/cocina/models/collection_identification.rb +1 -1
- data/lib/cocina/models/contributor.rb +3 -3
- data/lib/cocina/models/controlled_digital_lending_access.rb +16 -0
- data/lib/cocina/models/dark_access.rb +15 -0
- data/lib/cocina/models/description.rb +2 -2
- data/lib/cocina/models/descriptive_basic_value.rb +8 -8
- data/lib/cocina/models/descriptive_parallel_contributor.rb +3 -3
- data/lib/cocina/models/descriptive_parallel_event.rb +2 -2
- data/lib/cocina/models/descriptive_value.rb +8 -8
- data/lib/cocina/models/descriptive_value_language.rb +4 -4
- data/lib/cocina/models/dro_access.rb +12 -10
- data/lib/cocina/models/dro_structural.rb +1 -1
- data/lib/cocina/models/embargo.rb +12 -3
- data/lib/cocina/models/event.rb +2 -2
- data/lib/cocina/models/file.rb +3 -3
- data/lib/cocina/models/file_access.rb +10 -7
- data/lib/cocina/models/identification.rb +2 -2
- data/lib/cocina/models/lane_medical_barcode.rb +9 -0
- data/lib/cocina/models/language.rb +7 -7
- data/lib/cocina/models/location_based_access.rb +15 -0
- data/lib/cocina/models/location_based_download_access.rb +15 -0
- data/lib/cocina/models/presentation.rb +2 -2
- data/lib/cocina/models/related_resource.rb +6 -6
- data/lib/cocina/models/release_tag.rb +4 -4
- data/lib/cocina/models/request_collection.rb +1 -1
- data/lib/cocina/models/request_dro_structural.rb +1 -1
- data/lib/cocina/models/request_file.rb +4 -4
- data/lib/cocina/models/request_identification.rb +1 -1
- data/lib/cocina/models/sequence.rb +1 -1
- data/lib/cocina/models/source.rb +4 -4
- data/lib/cocina/models/standard.rb +4 -4
- data/lib/cocina/models/stanford_access.rb +15 -0
- data/lib/cocina/models/title.rb +8 -8
- data/lib/cocina/models/version.rb +1 -1
- data/lib/cocina/models/world_access.rb +15 -0
- data/openapi.yml +320 -146
- metadata +11 -2
@@ -5,15 +5,15 @@ module Cocina
|
|
5
5
|
class ReleaseTag < Struct
|
6
6
|
# Who did this release
|
7
7
|
# example: petucket
|
8
|
-
attribute :who, Types::Strict::String.
|
8
|
+
attribute :who, Types::Strict::String.meta(omittable: true)
|
9
9
|
# What is being released. This item or the whole collection.
|
10
10
|
# example: self
|
11
|
-
attribute :what, Types::Strict::String.enum('self', 'collection').
|
11
|
+
attribute :what, Types::Strict::String.enum('self', 'collection').meta(omittable: true)
|
12
12
|
# When did this action happen
|
13
|
-
attribute :date, Types::Params::DateTime.
|
13
|
+
attribute :date, Types::Params::DateTime.meta(omittable: true)
|
14
14
|
# What platform is it released to
|
15
15
|
# example: Searchworks
|
16
|
-
attribute :to, Types::Strict::String.
|
16
|
+
attribute :to, Types::Strict::String.meta(omittable: true)
|
17
17
|
attribute :release, Types::Strict::Bool.default(false)
|
18
18
|
end
|
19
19
|
end
|
@@ -15,7 +15,7 @@ module Cocina
|
|
15
15
|
attribute :type, Types::Strict::String.enum(*RequestCollection::TYPES)
|
16
16
|
attribute :label, Types::Strict::String
|
17
17
|
attribute :version, Types::Strict::Integer
|
18
|
-
attribute(:access,
|
18
|
+
attribute(:access, CollectionAccess.default { CollectionAccess.new })
|
19
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)
|
@@ -6,7 +6,7 @@ module Cocina
|
|
6
6
|
attribute :contains, Types::Strict::Array.of(RequestFileSet).meta(omittable: true)
|
7
7
|
attribute :hasMemberOrders, Types::Strict::Array.of(Sequence).meta(omittable: true)
|
8
8
|
attribute :isMemberOf, Types::Strict::Array.of(Druid).meta(omittable: true)
|
9
|
-
attribute :hasAgreement, Types::Strict::String.
|
9
|
+
attribute :hasAgreement, Types::Strict::String.meta(omittable: true)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -10,11 +10,11 @@ module Cocina
|
|
10
10
|
attribute :type, Types::Strict::String.enum(*RequestFile::TYPES)
|
11
11
|
attribute :label, Types::Strict::String
|
12
12
|
attribute :filename, Types::Strict::String
|
13
|
-
attribute :size, Types::Strict::Integer.
|
13
|
+
attribute :size, Types::Strict::Integer.meta(omittable: true)
|
14
14
|
attribute :version, Types::Strict::Integer
|
15
|
-
attribute :hasMimeType, Types::Strict::String.
|
16
|
-
attribute :externalIdentifier, Types::Strict::String.
|
17
|
-
attribute :use, Types::Strict::String.
|
15
|
+
attribute :hasMimeType, Types::Strict::String.meta(omittable: true)
|
16
|
+
attribute :externalIdentifier, Types::Strict::String.meta(omittable: true)
|
17
|
+
attribute :use, Types::Strict::String.meta(omittable: true)
|
18
18
|
attribute :hasMessageDigests, Types::Strict::Array.of(MessageDigest).default([].freeze)
|
19
19
|
attribute(:access, FileAccess.default { FileAccess.new })
|
20
20
|
attribute(:administrative, FileAdministrative.default { FileAdministrative.new })
|
@@ -9,7 +9,7 @@ module Cocina
|
|
9
9
|
attribute :sourceId, Types::Strict::String
|
10
10
|
attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).meta(omittable: true)
|
11
11
|
# A barcode
|
12
|
-
attribute :barcode, Types::Nominal::Any.
|
12
|
+
attribute :barcode, Types::Nominal::Any.meta(omittable: true)
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -5,7 +5,7 @@ module Cocina
|
|
5
5
|
class Sequence < Struct
|
6
6
|
attribute :members, Types::Strict::Array.of(Types::Strict::String).meta(omittable: true)
|
7
7
|
# The direction that a sequence of canvases should be displayed to the user
|
8
|
-
attribute :viewingDirection, Types::Strict::String.enum('right-to-left', 'left-to-right').
|
8
|
+
attribute :viewingDirection, Types::Strict::String.enum('right-to-left', 'left-to-right').meta(omittable: true)
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
data/lib/cocina/models/source.rb
CHANGED
@@ -4,14 +4,14 @@ module Cocina
|
|
4
4
|
module Models
|
5
5
|
class Source < Struct
|
6
6
|
# Code representing the value source.
|
7
|
-
attribute :code, Types::Strict::String.
|
7
|
+
attribute :code, Types::Strict::String.meta(omittable: true)
|
8
8
|
# URI for the value source.
|
9
|
-
attribute :uri, Types::Strict::String.
|
9
|
+
attribute :uri, Types::Strict::String.meta(omittable: true)
|
10
10
|
# String describing the value source.
|
11
|
-
attribute :value, Types::Strict::String.
|
11
|
+
attribute :value, Types::Strict::String.meta(omittable: true)
|
12
12
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
13
13
|
# The version of the value source.
|
14
|
-
attribute :version, Types::Strict::String.
|
14
|
+
attribute :version, Types::Strict::String.meta(omittable: true)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -4,14 +4,14 @@ module Cocina
|
|
4
4
|
module Models
|
5
5
|
class Standard < Struct
|
6
6
|
# Code representing the standard or encoding.
|
7
|
-
attribute :code, Types::Strict::String.
|
7
|
+
attribute :code, Types::Strict::String.meta(omittable: true)
|
8
8
|
# URI for the standard or encoding.
|
9
|
-
attribute :uri, Types::Strict::String.
|
9
|
+
attribute :uri, Types::Strict::String.meta(omittable: true)
|
10
10
|
# String describing the standard or encoding.
|
11
|
-
attribute :value, Types::Strict::String.
|
11
|
+
attribute :value, Types::Strict::String.meta(omittable: true)
|
12
12
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
13
13
|
# The version of the standard or encoding.
|
14
|
-
attribute :version, Types::Strict::String.
|
14
|
+
attribute :version, Types::Strict::String.meta(omittable: true)
|
15
15
|
attribute :source, Source.optional.meta(omittable: true)
|
16
16
|
end
|
17
17
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Cocina
|
4
|
+
module Models
|
5
|
+
class StanfordAccess < Struct
|
6
|
+
# Access level.
|
7
|
+
attribute :access, Types::Strict::String.enum('stanford')
|
8
|
+
# Download access level.
|
9
|
+
attribute :download, Types::Strict::String.enum('stanford')
|
10
|
+
# If access is "location-based", which location should have access.
|
11
|
+
attribute :readLocation, Types::Strict::String.optional.enum('').meta(omittable: true)
|
12
|
+
attribute :controlledDigitalLending, Types::Strict::Bool.enum(false).meta(omittable: true)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/cocina/models/title.rb
CHANGED
@@ -7,27 +7,27 @@ module Cocina
|
|
7
7
|
attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
8
8
|
attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
9
9
|
# String or integer value of the descriptive element.
|
10
|
-
attribute :value, Types::Nominal::Any.
|
10
|
+
attribute :value, Types::Nominal::Any.meta(omittable: true)
|
11
11
|
# Type of value provided by the descriptive element.
|
12
|
-
attribute :type, Types::Strict::String.
|
12
|
+
attribute :type, Types::Strict::String.meta(omittable: true)
|
13
13
|
# Status of the descriptive element value relative to other instances of the element.
|
14
|
-
attribute :status, Types::Strict::String.
|
14
|
+
attribute :status, Types::Strict::String.meta(omittable: true)
|
15
15
|
# Code value of the descriptive element.
|
16
|
-
attribute :code, Types::Strict::String.
|
16
|
+
attribute :code, Types::Strict::String.meta(omittable: true)
|
17
17
|
# URI value of the descriptive element.
|
18
|
-
attribute :uri, Types::Strict::String.
|
18
|
+
attribute :uri, Types::Strict::String.meta(omittable: true)
|
19
19
|
attribute :standard, Standard.optional.meta(omittable: true)
|
20
20
|
attribute :encoding, Standard.optional.meta(omittable: true)
|
21
21
|
attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
22
22
|
attribute :source, Source.optional.meta(omittable: true)
|
23
23
|
# The preferred display label to use for the descriptive element in access systems.
|
24
|
-
attribute :displayLabel, Types::Strict::String.
|
24
|
+
attribute :displayLabel, Types::Strict::String.meta(omittable: true)
|
25
25
|
# A term providing information about the circumstances of the statement (e.g., approximate dates).
|
26
|
-
attribute :qualifier, Types::Strict::String.
|
26
|
+
attribute :qualifier, Types::Strict::String.meta(omittable: true)
|
27
27
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
28
28
|
attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
|
29
29
|
# URL or other pointer to the location of the value of the descriptive element.
|
30
|
-
attribute :valueAt, Types::Strict::String.
|
30
|
+
attribute :valueAt, Types::Strict::String.meta(omittable: true)
|
31
31
|
attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).meta(omittable: true)
|
32
32
|
end
|
33
33
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Cocina
|
4
|
+
module Models
|
5
|
+
class WorldAccess < Struct
|
6
|
+
# Access level.
|
7
|
+
attribute :access, Types::Strict::String.enum('world')
|
8
|
+
# Download access level.
|
9
|
+
attribute :download, Types::Strict::String.enum('none', 'stanford', 'world')
|
10
|
+
# If access is "location-based", which location should have access.
|
11
|
+
attribute :readLocation, Types::Strict::String.optional.enum('').meta(omittable: true)
|
12
|
+
attribute :controlledDigitalLending, Types::Strict::Bool.enum(false).meta(omittable: true)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/openapi.yml
CHANGED
@@ -94,41 +94,16 @@ paths:
|
|
94
94
|
components:
|
95
95
|
schemas:
|
96
96
|
Access:
|
97
|
-
description: Access metadata for collections
|
98
97
|
type: object
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
- 'citation-only'
|
109
|
-
- 'dark'
|
110
|
-
default: 'dark'
|
111
|
-
copyright:
|
112
|
-
description: The human readable copyright statement that applies
|
113
|
-
example: Copyright World Trade Organization
|
114
|
-
type: string
|
115
|
-
readLocation:
|
116
|
-
description: If access is "location-based", which location should have access.
|
117
|
-
type: string
|
118
|
-
enum:
|
119
|
-
- 'spec'
|
120
|
-
- 'music'
|
121
|
-
- 'ars'
|
122
|
-
- 'art'
|
123
|
-
- 'hoover'
|
124
|
-
- 'm&m'
|
125
|
-
useAndReproductionStatement:
|
126
|
-
description: The human readable use and reproduction statement that applies
|
127
|
-
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).
|
128
|
-
type: string
|
129
|
-
license:
|
130
|
-
description: The license governing reuse of the Collection. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
|
131
|
-
type: string
|
98
|
+
oneOf:
|
99
|
+
# Being first, makes DarkAccess the default.
|
100
|
+
- $ref: '#/components/schemas/DarkAccess'
|
101
|
+
- $ref: '#/components/schemas/CitationOnlyAccess'
|
102
|
+
- $ref: '#/components/schemas/ControlledDigitalLendingAccess'
|
103
|
+
- $ref: '#/components/schemas/LocationBasedAccess'
|
104
|
+
- $ref: '#/components/schemas/LocationBasedDownloadAccess'
|
105
|
+
- $ref: '#/components/schemas/StanfordAccess'
|
106
|
+
- $ref: '#/components/schemas/WorldAccess'
|
132
107
|
AccessRole:
|
133
108
|
description: Access role conferred by an AdminPolicy to objects within it. (used by Argo)
|
134
109
|
type: object
|
@@ -275,6 +250,7 @@ components:
|
|
275
250
|
description: The human readable copyright statement that applies
|
276
251
|
example: Copyright World Trade Organization
|
277
252
|
type: string
|
253
|
+
nullable: true
|
278
254
|
download:
|
279
255
|
description: >
|
280
256
|
Download access level. This is used in the transition from Fedora as
|
@@ -294,6 +270,7 @@ components:
|
|
294
270
|
readLocation at registration that is copied down to all the files.
|
295
271
|
|
296
272
|
type: string
|
273
|
+
nullable: true
|
297
274
|
enum:
|
298
275
|
- 'spec'
|
299
276
|
- 'music'
|
@@ -305,9 +282,11 @@ components:
|
|
305
282
|
description: The human readable use and reproduction statement that applies
|
306
283
|
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).
|
307
284
|
type: string
|
285
|
+
nullable: true
|
308
286
|
license:
|
309
287
|
description: The license governing reuse of the Collection. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
|
310
288
|
type: string
|
289
|
+
nullable: true
|
311
290
|
AppliesTo:
|
312
291
|
description: Property model for indicating the parts, aspects, or versions of the resource to which a
|
313
292
|
descriptive element is applicable.
|
@@ -322,6 +301,7 @@ components:
|
|
322
301
|
description: 'A barcode'
|
323
302
|
oneOf:
|
324
303
|
- $ref: '#/components/schemas/BusinessBarcode'
|
304
|
+
- $ref: '#/components/schemas/LaneMedicalBarcode'
|
325
305
|
- $ref: '#/components/schemas/CatkeyBarcode'
|
326
306
|
- $ref: '#/components/schemas/StandardBarcode'
|
327
307
|
BusinessBarcode:
|
@@ -329,6 +309,11 @@ components:
|
|
329
309
|
type: string
|
330
310
|
pattern: '^2050[0-9]{7}$'
|
331
311
|
example: 20503740296
|
312
|
+
LaneMedicalBarcode:
|
313
|
+
description: The barcode associated with a Lane Medical Library DRO object, prefixed with 245
|
314
|
+
type: string
|
315
|
+
pattern: '^245[0-9]{8}$'
|
316
|
+
example: 24503259768
|
332
317
|
CatalogLink:
|
333
318
|
type: object
|
334
319
|
additionalProperties: false
|
@@ -349,6 +334,33 @@ components:
|
|
349
334
|
type: string
|
350
335
|
pattern: '^[0-9]+-[0-9]+$'
|
351
336
|
example: 6772719-1001
|
337
|
+
CitationOnlyAccess:
|
338
|
+
type: object
|
339
|
+
properties:
|
340
|
+
access:
|
341
|
+
description: Access level.
|
342
|
+
type: string
|
343
|
+
enum:
|
344
|
+
- citation-only
|
345
|
+
download:
|
346
|
+
description: Download access level.
|
347
|
+
type: string
|
348
|
+
enum:
|
349
|
+
- 'none'
|
350
|
+
readLocation:
|
351
|
+
description: If access is "location-based", which location should have access.
|
352
|
+
type: string
|
353
|
+
nullable: true
|
354
|
+
enum:
|
355
|
+
- null
|
356
|
+
controlledDigitalLending:
|
357
|
+
type: boolean
|
358
|
+
default: false
|
359
|
+
enum:
|
360
|
+
- false
|
361
|
+
required:
|
362
|
+
- access
|
363
|
+
- download
|
352
364
|
Collection:
|
353
365
|
description: A group of Digital Repository Objects that indicate some type of conceptual grouping within the domain that is worth reusing across the system.
|
354
366
|
type: object
|
@@ -373,7 +385,7 @@ components:
|
|
373
385
|
description: Version for the Collection within SDR.
|
374
386
|
type: integer
|
375
387
|
access:
|
376
|
-
$ref: '#/components/schemas/
|
388
|
+
$ref: '#/components/schemas/CollectionAccess'
|
377
389
|
administrative:
|
378
390
|
$ref: '#/components/schemas/Administrative'
|
379
391
|
description:
|
@@ -386,6 +398,30 @@ components:
|
|
386
398
|
- type
|
387
399
|
- version
|
388
400
|
- access
|
401
|
+
CollectionAccess:
|
402
|
+
description: Access metadata for collections
|
403
|
+
type: object
|
404
|
+
additionalProperties: false
|
405
|
+
properties:
|
406
|
+
access:
|
407
|
+
description: Access level
|
408
|
+
type: string
|
409
|
+
enum:
|
410
|
+
- 'world'
|
411
|
+
- 'dark'
|
412
|
+
default: 'dark'
|
413
|
+
copyright:
|
414
|
+
description: The human readable copyright statement that applies
|
415
|
+
example: Copyright World Trade Organization
|
416
|
+
type: string
|
417
|
+
nullable: true
|
418
|
+
useAndReproductionStatement:
|
419
|
+
description: The human readable use and reproduction statement that applies
|
420
|
+
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).
|
421
|
+
type: string
|
422
|
+
license:
|
423
|
+
description: The license governing reuse of the Collection. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
|
424
|
+
type: string
|
389
425
|
CollectionIdentification:
|
390
426
|
type: object
|
391
427
|
additionalProperties: false
|
@@ -438,6 +474,60 @@ components:
|
|
438
474
|
type: array
|
439
475
|
items:
|
440
476
|
$ref: "#/components/schemas/DescriptiveParallelContributor"
|
477
|
+
ControlledDigitalLendingAccess:
|
478
|
+
type: object
|
479
|
+
properties:
|
480
|
+
access:
|
481
|
+
description: Access level.
|
482
|
+
type: string
|
483
|
+
enum:
|
484
|
+
- stanford
|
485
|
+
download:
|
486
|
+
description: Download access level.
|
487
|
+
type: string
|
488
|
+
enum:
|
489
|
+
- none
|
490
|
+
readLocation:
|
491
|
+
description: If access is "location-based", which location should have access.
|
492
|
+
type: string
|
493
|
+
nullable: true
|
494
|
+
enum:
|
495
|
+
- null
|
496
|
+
controlledDigitalLending:
|
497
|
+
description: Available for controlled digital lending.
|
498
|
+
type: boolean
|
499
|
+
default: false
|
500
|
+
required:
|
501
|
+
- access
|
502
|
+
- download
|
503
|
+
- controlledDigitalLending
|
504
|
+
DarkAccess:
|
505
|
+
type: object
|
506
|
+
properties:
|
507
|
+
access:
|
508
|
+
description: Access level.
|
509
|
+
type: string
|
510
|
+
default: 'dark'
|
511
|
+
enum:
|
512
|
+
- dark
|
513
|
+
download:
|
514
|
+
description: Download access level.
|
515
|
+
type: string
|
516
|
+
default: 'none'
|
517
|
+
enum:
|
518
|
+
- 'none'
|
519
|
+
readLocation:
|
520
|
+
description: If access is "location-based", which location should have access.
|
521
|
+
type: string
|
522
|
+
nullable: true
|
523
|
+
default: null
|
524
|
+
enum:
|
525
|
+
- null
|
526
|
+
controlledDigitalLending:
|
527
|
+
type: boolean
|
528
|
+
default: false
|
529
|
+
enum:
|
530
|
+
- false
|
441
531
|
Description:
|
442
532
|
type: object
|
443
533
|
additionalProperties: false
|
@@ -844,60 +934,55 @@ components:
|
|
844
934
|
DROAccess:
|
845
935
|
type: object
|
846
936
|
additionalProperties: false
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
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).
|
897
|
-
type: string
|
898
|
-
license:
|
899
|
-
description: The license governing reuse of the DRO. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
|
900
|
-
type: string
|
937
|
+
allOf:
|
938
|
+
- $ref: "#/components/schemas/Access"
|
939
|
+
- type: object
|
940
|
+
properties:
|
941
|
+
copyright:
|
942
|
+
description: The human readable copyright statement that applies
|
943
|
+
example: Copyright World Trade Organization
|
944
|
+
type: string
|
945
|
+
nullable: true
|
946
|
+
embargo:
|
947
|
+
$ref: '#/components/schemas/Embargo'
|
948
|
+
useAndReproductionStatement:
|
949
|
+
description: The human readable use and reproduction statement that applies
|
950
|
+
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).
|
951
|
+
type: string
|
952
|
+
license:
|
953
|
+
description: The license governing reuse of the DRO. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
|
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.
|
901
986
|
DROStructural:
|
902
987
|
description: Structural metadata
|
903
988
|
type: object
|
@@ -928,28 +1013,21 @@ components:
|
|
928
1013
|
Embargo:
|
929
1014
|
type: object
|
930
1015
|
additionalProperties: false
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
-
|
946
|
-
useAndReproductionStatement:
|
947
|
-
description: The human readable use and reproduction statement that applies when the embargo expires.
|
948
|
-
example: These materials are in the public domain.
|
949
|
-
type: string
|
950
|
-
required:
|
951
|
-
- releaseDate
|
952
|
-
- access
|
1016
|
+
allOf:
|
1017
|
+
- $ref: "#/components/schemas/Access"
|
1018
|
+
- type: object
|
1019
|
+
properties:
|
1020
|
+
releaseDate:
|
1021
|
+
description: Date when the Collection is released from an embargo.
|
1022
|
+
type: string
|
1023
|
+
format: date-time
|
1024
|
+
example: '2029-06-22T07:00:00.000+00:00'
|
1025
|
+
useAndReproductionStatement:
|
1026
|
+
description: The human readable use and reproduction statement that applies when the embargo expires.
|
1027
|
+
example: These materials are in the public domain.
|
1028
|
+
type: string
|
1029
|
+
required:
|
1030
|
+
- releaseDate
|
953
1031
|
Event:
|
954
1032
|
description: Property model for describing events in the history of the resource.
|
955
1033
|
type: object
|
@@ -1052,40 +1130,14 @@ components:
|
|
1052
1130
|
description: Access metadata for files
|
1053
1131
|
type: object
|
1054
1132
|
additionalProperties: false
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
- 'citation-only'
|
1064
|
-
- 'dark'
|
1065
|
-
default: 'dark'
|
1066
|
-
controlledDigitalLending:
|
1067
|
-
description: Available for controlled digital lending.
|
1068
|
-
type: boolean
|
1069
|
-
default: false
|
1070
|
-
download:
|
1071
|
-
description: Download access level for a file
|
1072
|
-
type: string
|
1073
|
-
enum:
|
1074
|
-
- 'world'
|
1075
|
-
- 'stanford'
|
1076
|
-
- 'location-based'
|
1077
|
-
- 'none'
|
1078
|
-
default: 'none'
|
1079
|
-
readLocation:
|
1080
|
-
description: If access is "location-based", which location should have access.
|
1081
|
-
type: string
|
1082
|
-
enum:
|
1083
|
-
- 'spec'
|
1084
|
-
- 'music'
|
1085
|
-
- 'ars'
|
1086
|
-
- 'art'
|
1087
|
-
- 'hoover'
|
1088
|
-
- 'm&m'
|
1133
|
+
oneOf:
|
1134
|
+
# Being first, makes DarkAccess the default.
|
1135
|
+
- $ref: '#/components/schemas/DarkAccess'
|
1136
|
+
- $ref: '#/components/schemas/ControlledDigitalLendingAccess'
|
1137
|
+
- $ref: '#/components/schemas/LocationBasedAccess'
|
1138
|
+
- $ref: '#/components/schemas/LocationBasedDownloadAccess'
|
1139
|
+
- $ref: '#/components/schemas/StanfordAccess'
|
1140
|
+
- $ref: '#/components/schemas/WorldAccess'
|
1089
1141
|
FileAdministrative:
|
1090
1142
|
type: object
|
1091
1143
|
additionalProperties: false
|
@@ -1243,6 +1295,72 @@ components:
|
|
1243
1295
|
valueLanguage:
|
1244
1296
|
# description: present for mapping to additional schemas in the future and for consistency but not otherwise used
|
1245
1297
|
$ref: "#/components/schemas/DescriptiveValueLanguage"
|
1298
|
+
LocationBasedAccess:
|
1299
|
+
type: object
|
1300
|
+
properties:
|
1301
|
+
access:
|
1302
|
+
description: Access level.
|
1303
|
+
type: string
|
1304
|
+
enum:
|
1305
|
+
- location-based
|
1306
|
+
download:
|
1307
|
+
description: Download access level.
|
1308
|
+
type: string
|
1309
|
+
enum:
|
1310
|
+
- location-based
|
1311
|
+
- none
|
1312
|
+
readLocation:
|
1313
|
+
description: If access is "location-based", which location should have access.
|
1314
|
+
type: string
|
1315
|
+
enum:
|
1316
|
+
- 'spec'
|
1317
|
+
- 'music'
|
1318
|
+
- 'ars'
|
1319
|
+
- 'art'
|
1320
|
+
- 'hoover'
|
1321
|
+
- 'm&m'
|
1322
|
+
controlledDigitalLending:
|
1323
|
+
type: boolean
|
1324
|
+
default: false
|
1325
|
+
enum:
|
1326
|
+
- false
|
1327
|
+
required:
|
1328
|
+
- access
|
1329
|
+
- download
|
1330
|
+
- readLocation
|
1331
|
+
LocationBasedDownloadAccess:
|
1332
|
+
type: object
|
1333
|
+
properties:
|
1334
|
+
access:
|
1335
|
+
description: Access level.
|
1336
|
+
type: string
|
1337
|
+
enum:
|
1338
|
+
- stanford
|
1339
|
+
- world
|
1340
|
+
download:
|
1341
|
+
description: Download access level.
|
1342
|
+
type: string
|
1343
|
+
enum:
|
1344
|
+
- location-based
|
1345
|
+
readLocation:
|
1346
|
+
description: If access is "location-based", which location should have access.
|
1347
|
+
type: string
|
1348
|
+
enum:
|
1349
|
+
- 'spec'
|
1350
|
+
- 'music'
|
1351
|
+
- 'ars'
|
1352
|
+
- 'art'
|
1353
|
+
- 'hoover'
|
1354
|
+
- 'm&m'
|
1355
|
+
controlledDigitalLending:
|
1356
|
+
type: boolean
|
1357
|
+
default: false
|
1358
|
+
enum:
|
1359
|
+
- false
|
1360
|
+
required:
|
1361
|
+
- access
|
1362
|
+
- download
|
1363
|
+
- readLocation
|
1246
1364
|
MessageDigest:
|
1247
1365
|
description: The output of the message digest algorithm.
|
1248
1366
|
type: object
|
@@ -1420,7 +1538,7 @@ components:
|
|
1420
1538
|
version:
|
1421
1539
|
type: integer
|
1422
1540
|
access:
|
1423
|
-
$ref: '#/components/schemas/
|
1541
|
+
$ref: '#/components/schemas/CollectionAccess'
|
1424
1542
|
administrative:
|
1425
1543
|
$ref: '#/components/schemas/Administrative'
|
1426
1544
|
description:
|
@@ -1700,3 +1818,59 @@ components:
|
|
1700
1818
|
- type: object
|
1701
1819
|
required:
|
1702
1820
|
- valueAt
|
1821
|
+
StanfordAccess:
|
1822
|
+
type: object
|
1823
|
+
properties:
|
1824
|
+
access:
|
1825
|
+
description: Access level.
|
1826
|
+
type: string
|
1827
|
+
enum:
|
1828
|
+
- stanford
|
1829
|
+
download:
|
1830
|
+
description: Download access level.
|
1831
|
+
type: string
|
1832
|
+
enum:
|
1833
|
+
- stanford
|
1834
|
+
readLocation:
|
1835
|
+
description: If access is "location-based", which location should have access.
|
1836
|
+
type: string
|
1837
|
+
nullable: true
|
1838
|
+
enum:
|
1839
|
+
- null
|
1840
|
+
controlledDigitalLending:
|
1841
|
+
type: boolean
|
1842
|
+
default: false
|
1843
|
+
enum:
|
1844
|
+
- false
|
1845
|
+
required:
|
1846
|
+
- access
|
1847
|
+
- download
|
1848
|
+
WorldAccess:
|
1849
|
+
type: object
|
1850
|
+
properties:
|
1851
|
+
access:
|
1852
|
+
description: Access level.
|
1853
|
+
type: string
|
1854
|
+
enum:
|
1855
|
+
- world
|
1856
|
+
download:
|
1857
|
+
description: Download access level.
|
1858
|
+
type: string
|
1859
|
+
enum:
|
1860
|
+
- none
|
1861
|
+
- stanford
|
1862
|
+
- world
|
1863
|
+
readLocation:
|
1864
|
+
description: If access is "location-based", which location should have access.
|
1865
|
+
type: string
|
1866
|
+
nullable: true
|
1867
|
+
enum:
|
1868
|
+
- null
|
1869
|
+
controlledDigitalLending:
|
1870
|
+
type: boolean
|
1871
|
+
default: false
|
1872
|
+
enum:
|
1873
|
+
- false
|
1874
|
+
required:
|
1875
|
+
- access
|
1876
|
+
- download
|