cocina-models 0.55.0 → 0.56.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocina/generator/schema.rb +1 -1
- data/lib/cocina/models/access.rb +5 -0
- data/lib/cocina/models/admin_policy_administrative.rb +6 -1
- data/lib/cocina/models/admin_policy_default_access.rb +26 -0
- data/lib/cocina/models/business_barcode.rb +9 -0
- data/lib/cocina/models/catkey_barcode.rb +9 -0
- data/lib/cocina/models/dro_access.rb +2 -0
- data/lib/cocina/models/identification.rb +2 -0
- data/lib/cocina/models/request_identification.rb +2 -0
- data/lib/cocina/models/standard_barcode.rb +9 -0
- data/lib/cocina/models/version.rb +1 -1
- data/openapi.yml +98 -2
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 352ed5623ee930889067e73d3d306dcdd552cc37cd5234c1a63b587d4c203721
|
4
|
+
data.tar.gz: a7bc8f6b3162e3e72eda861a99bf3e06fe0e94f8a94b0be155922848ba0aff24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8527592a36ba28a38d00086db7e3f37e5aaed274d98b65a8c71a5b8cd3b3c9e7da8fb1f29ca5c213f62bc278e42253c5a3cf955ad10918bc009b444170e3ef6d
|
7
|
+
data.tar.gz: 676a84548def7a9993383f356e3315d440ebec5dfd5efad611be323fed8aee543d1669520779ffa6555a836da5d0fb2ced503099651da96b2039d39db5af4c02
|
data/lib/cocina/models/access.rb
CHANGED
@@ -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
|
-
|
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
|
@@ -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
|
@@ -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
|
@@ -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
|
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
|
@@ -809,6 +893,9 @@ components:
|
|
809
893
|
description: The human readable use and reproduction statement that applies
|
810
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).
|
811
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
|
812
899
|
DROStructural:
|
813
900
|
description: Structural metadata
|
814
901
|
type: object
|
@@ -1083,6 +1170,8 @@ components:
|
|
1083
1170
|
type: array
|
1084
1171
|
items:
|
1085
1172
|
$ref: '#/components/schemas/CatalogLink'
|
1173
|
+
barcode:
|
1174
|
+
$ref: '#/components/schemas/Barcode'
|
1086
1175
|
Language:
|
1087
1176
|
description: Languages, scripts, symbolic systems, and notations used in all
|
1088
1177
|
or part of a resource or its descriptive metadata.
|
@@ -1502,6 +1591,8 @@ components:
|
|
1502
1591
|
type: array
|
1503
1592
|
items:
|
1504
1593
|
$ref: '#/components/schemas/CatalogLink'
|
1594
|
+
barcode:
|
1595
|
+
$ref: '#/components/schemas/Barcode'
|
1505
1596
|
required:
|
1506
1597
|
- sourceId
|
1507
1598
|
Sequence:
|
@@ -1581,6 +1672,11 @@ components:
|
|
1581
1672
|
type: string
|
1582
1673
|
source:
|
1583
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
|
1584
1680
|
Title:
|
1585
1681
|
type: object
|
1586
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.
|
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
|
+
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
|
@@ -307,6 +310,7 @@ files:
|
|
307
310
|
- lib/cocina/models/source.rb
|
308
311
|
- lib/cocina/models/source_id.rb
|
309
312
|
- lib/cocina/models/standard.rb
|
313
|
+
- lib/cocina/models/standard_barcode.rb
|
310
314
|
- lib/cocina/models/title.rb
|
311
315
|
- lib/cocina/models/validator.rb
|
312
316
|
- lib/cocina/models/version.rb
|
@@ -330,7 +334,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
330
334
|
- !ruby/object:Gem::Version
|
331
335
|
version: '0'
|
332
336
|
requirements: []
|
333
|
-
rubygems_version: 3.
|
337
|
+
rubygems_version: 3.0.3
|
334
338
|
signing_key:
|
335
339
|
specification_version: 4
|
336
340
|
summary: Data models for the SDR
|