cocina-models 0.47.0 → 0.50.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/models/access_role.rb +11 -0
- data/lib/cocina/models/access_role_member.rb +16 -0
- data/lib/cocina/models/admin_policy_administrative.rb +3 -1
- data/lib/cocina/models/collection_identification.rb +4 -0
- data/lib/cocina/models/descriptive_parallel_event.rb +28 -0
- data/lib/cocina/models/event.rb +1 -0
- data/lib/cocina/models/version.rb +1 -1
- data/openapi.yml +108 -3
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a55d992f499fd8f12826d186e7cca1d8ac9eea0fdc78863e8edcee8d04eb588e
|
4
|
+
data.tar.gz: 604b254a57b8760b65e1376d71bce54171ed6b539a013ad6efbd09e6a9305380
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0e746e2ba9ce5c02a7653f1fecfa833e59683f0fda8104d9caeec998cb6bb95c51d782f69eb3b2f80508e5f111c259ecd14bfdaa21fd7c1961b743c056b64c5
|
7
|
+
data.tar.gz: f24d9a01b2f1fbb1d4fad9d77c2e9b281f4c026ecedaa7ad0ab986302f61fea21b1349f6327a4eeb1b45a6293c3c9659a703ab186da58d8759de7e714ac93db5
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Cocina
|
4
|
+
module Models
|
5
|
+
class AccessRole < Struct
|
6
|
+
# Name of role
|
7
|
+
attribute :name, Types::Strict::String.enum('sdr-administrator', 'sdr-viewer', 'dor-apo-manager', 'hydrus-collection-creator', 'hydrus-collection-manager', 'hydrus-collection-depositor', 'hydrus-collection-item-depositor', 'hydrus-collection-reviewer', 'hydrus-collection-viewer')
|
8
|
+
attribute :members, Types::Strict::Array.of(AccessRoleMember).default([].freeze)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Cocina
|
4
|
+
module Models
|
5
|
+
class AccessRoleMember < Struct
|
6
|
+
include Checkable
|
7
|
+
|
8
|
+
TYPES = %w[sunetid
|
9
|
+
workgroup].freeze
|
10
|
+
|
11
|
+
# Name of role
|
12
|
+
attribute :type, Types::Strict::String.enum(*AccessRoleMember::TYPES)
|
13
|
+
attribute :identifier, Types::Strict::String
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -4,7 +4,9 @@ module Cocina
|
|
4
4
|
module Models
|
5
5
|
class AdminPolicyAdministrative < Struct
|
6
6
|
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)
|
7
|
-
attribute :registrationWorkflow, Types::Strict::String.meta(omittable: true)
|
7
|
+
attribute :registrationWorkflow, Types::Strict::Array.of(Types::Strict::String).meta(omittable: true)
|
8
|
+
attribute :collectionsForRegistration, Types::Strict::Array.of(Types::Strict::String).meta(omittable: true)
|
9
|
+
attribute :roles, Types::Strict::Array.of(AccessRole).meta(omittable: true)
|
8
10
|
attribute :hasAdminPolicy, Types::Strict::String
|
9
11
|
end
|
10
12
|
end
|
@@ -3,6 +3,10 @@
|
|
3
3
|
module Cocina
|
4
4
|
module Models
|
5
5
|
class CollectionIdentification < 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. The format is: "namespace:identifier"
|
7
|
+
|
8
|
+
# example: sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026
|
9
|
+
attribute :sourceId, Types::Strict::String.meta(omittable: true)
|
6
10
|
attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).meta(omittable: true)
|
7
11
|
end
|
8
12
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Cocina
|
4
|
+
module Models
|
5
|
+
class DescriptiveParallelEvent < 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
|
+
# The version of the standard or encoding.
|
14
|
+
attribute :version, Types::Strict::String.meta(omittable: true)
|
15
|
+
attribute :source, Source.optional.meta(omittable: true)
|
16
|
+
attribute :valueScript, Standard.optional.meta(omittable: true)
|
17
|
+
attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
18
|
+
# Description of the event (creation, publication, etc.).
|
19
|
+
attribute :type, Types::Strict::String.meta(omittable: true)
|
20
|
+
# The preferred display label to use for the event in access systems.
|
21
|
+
attribute :displayLabel, Types::Strict::String.meta(omittable: true)
|
22
|
+
attribute :date, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
23
|
+
attribute :contributor, Types::Strict::Array.of(Contributor).meta(omittable: true)
|
24
|
+
attribute :location, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
25
|
+
attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/lib/cocina/models/event.rb
CHANGED
@@ -13,6 +13,7 @@ module Cocina
|
|
13
13
|
attribute :location, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
14
14
|
attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
15
15
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
16
|
+
attribute :parallelEvent, Types::Strict::Array.of(DescriptiveParallelEvent).meta(omittable: true)
|
16
17
|
end
|
17
18
|
end
|
18
19
|
end
|
data/openapi.yml
CHANGED
@@ -118,6 +118,48 @@ components:
|
|
118
118
|
- 'art'
|
119
119
|
- 'hoover'
|
120
120
|
- 'm&m'
|
121
|
+
AccessRole:
|
122
|
+
description: Access role conferred by an AdminPolicy to objects within it. (used by Argo)
|
123
|
+
type: object
|
124
|
+
additionalProperties: false
|
125
|
+
properties:
|
126
|
+
name:
|
127
|
+
description: Name of role
|
128
|
+
type: string
|
129
|
+
enum:
|
130
|
+
- 'sdr-administrator'
|
131
|
+
- 'sdr-viewer'
|
132
|
+
- 'dor-apo-manager'
|
133
|
+
- 'hydrus-collection-creator'
|
134
|
+
- 'hydrus-collection-manager'
|
135
|
+
- 'hydrus-collection-depositor'
|
136
|
+
- 'hydrus-collection-item-depositor'
|
137
|
+
- 'hydrus-collection-reviewer'
|
138
|
+
- 'hydrus-collection-viewer'
|
139
|
+
members:
|
140
|
+
description: The users and groups that are members of the role
|
141
|
+
type: array
|
142
|
+
items:
|
143
|
+
$ref: '#/components/schemas/AccessRoleMember'
|
144
|
+
required:
|
145
|
+
- members
|
146
|
+
- name
|
147
|
+
AccessRoleMember:
|
148
|
+
description: Represents a user or group that is a member of an AccessRole
|
149
|
+
type: object
|
150
|
+
additionalProperties: false
|
151
|
+
properties:
|
152
|
+
type:
|
153
|
+
description: Name of role
|
154
|
+
type: string
|
155
|
+
enum:
|
156
|
+
- 'sunetid'
|
157
|
+
- 'workgroup'
|
158
|
+
identifier:
|
159
|
+
type: string
|
160
|
+
required:
|
161
|
+
- identifier
|
162
|
+
- type
|
121
163
|
Administrative:
|
122
164
|
type: object
|
123
165
|
additionalProperties: false
|
@@ -161,6 +203,7 @@ components:
|
|
161
203
|
- type
|
162
204
|
- version
|
163
205
|
AdminPolicyAdministrative:
|
206
|
+
description: Administrative properties for an AdminPolicy
|
164
207
|
type: object
|
165
208
|
additionalProperties: false
|
166
209
|
properties:
|
@@ -168,7 +211,20 @@ components:
|
|
168
211
|
type: string
|
169
212
|
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>
|
170
213
|
registrationWorkflow:
|
171
|
-
|
214
|
+
description: When you register an item with this admin policy, these are the workflows that are available.
|
215
|
+
type: array
|
216
|
+
items:
|
217
|
+
type: string
|
218
|
+
collectionsForRegistration:
|
219
|
+
description: When you register an item with this admin policy, these are the collections that are available.
|
220
|
+
type: array
|
221
|
+
items:
|
222
|
+
type: string
|
223
|
+
roles:
|
224
|
+
description: The access roles conferred by this AdminPolicy (used by Argo)
|
225
|
+
type: array
|
226
|
+
items:
|
227
|
+
$ref: '#/components/schemas/AccessRole'
|
172
228
|
hasAdminPolicy:
|
173
229
|
type: string
|
174
230
|
required:
|
@@ -239,6 +295,8 @@ components:
|
|
239
295
|
type: object
|
240
296
|
additionalProperties: false
|
241
297
|
properties:
|
298
|
+
sourceId:
|
299
|
+
$ref: '#/components/schemas/SourceId'
|
242
300
|
catalogLinks:
|
243
301
|
type: array
|
244
302
|
items:
|
@@ -430,14 +488,15 @@ components:
|
|
430
488
|
DescriptiveBasicValue:
|
431
489
|
description: Basic value model for descriptive elements.
|
432
490
|
type: object
|
433
|
-
# additionalProperties breaks the validator, unclear as to why.
|
491
|
+
# additionalProperties breaks the validator for allOf, unclear as to why.
|
434
492
|
# additionalProperties: false
|
435
493
|
allOf:
|
436
494
|
- $ref: "#/components/schemas/DescriptiveStructuredValue"
|
437
495
|
- $ref: "#/components/schemas/DescriptiveParallelValue"
|
438
496
|
- $ref: "#/components/schemas/DescriptiveGroupedValue"
|
439
497
|
- type: object
|
440
|
-
additionalProperties
|
498
|
+
# additionalProperties breaks the validator for DescriptiveValue, unclear as to why.
|
499
|
+
# additionalProperties: false
|
441
500
|
properties:
|
442
501
|
value:
|
443
502
|
description: String or integer value of the descriptive element.
|
@@ -513,6 +572,47 @@ components:
|
|
513
572
|
type: array
|
514
573
|
items:
|
515
574
|
$ref: "#/components/schemas/DescriptiveValue"
|
575
|
+
DescriptiveParallelEvent:
|
576
|
+
description: Value model for multiple representations of information about the same event (e.g. in different languages).
|
577
|
+
type: object
|
578
|
+
additionalProperties: false
|
579
|
+
allOf:
|
580
|
+
- $ref: "#/components/schemas/DescriptiveValueLanguage"
|
581
|
+
- $ref: "#/components/schemas/DescriptiveStructuredValue"
|
582
|
+
- type: object
|
583
|
+
additionalProperties: false
|
584
|
+
properties:
|
585
|
+
type:
|
586
|
+
description: Description of the event (creation, publication, etc.).
|
587
|
+
type: string
|
588
|
+
displayLabel:
|
589
|
+
description: The preferred display label to use for the event in access systems.
|
590
|
+
type: string
|
591
|
+
date:
|
592
|
+
description: Dates associated with the event.
|
593
|
+
type: array
|
594
|
+
items:
|
595
|
+
$ref: "#/components/schemas/DescriptiveValue"
|
596
|
+
contributor:
|
597
|
+
description: Contributors associated with the event.
|
598
|
+
type: array
|
599
|
+
items:
|
600
|
+
$ref: "#/components/schemas/Contributor"
|
601
|
+
location:
|
602
|
+
description: Locations associated with the event.
|
603
|
+
type: array
|
604
|
+
items:
|
605
|
+
$ref: "#/components/schemas/DescriptiveValue"
|
606
|
+
identifier:
|
607
|
+
description: Identifiers and URIs associated with the event.
|
608
|
+
type: array
|
609
|
+
items:
|
610
|
+
$ref: "#/components/schemas/DescriptiveValue"
|
611
|
+
note:
|
612
|
+
description: Other information about the event.
|
613
|
+
type: array
|
614
|
+
items:
|
615
|
+
$ref: "#/components/schemas/DescriptiveValue"
|
516
616
|
DescriptiveParallelValue:
|
517
617
|
description: Value model for multiple representations of the same information (e.g. in different languages).
|
518
618
|
type: object
|
@@ -769,6 +869,11 @@ components:
|
|
769
869
|
type: array
|
770
870
|
items:
|
771
871
|
$ref: "#/components/schemas/DescriptiveValue"
|
872
|
+
parallelEvent:
|
873
|
+
description: For multiple representations of information about the same event (e.g. in different languages)
|
874
|
+
type: array
|
875
|
+
items:
|
876
|
+
$ref: "#/components/schemas/DescriptiveParallelEvent"
|
772
877
|
File:
|
773
878
|
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.
|
774
879
|
type: object
|
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.50.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-
|
11
|
+
date: 2021-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -254,6 +254,8 @@ files:
|
|
254
254
|
- lib/cocina/generator/vocab.rb
|
255
255
|
- lib/cocina/models.rb
|
256
256
|
- lib/cocina/models/access.rb
|
257
|
+
- lib/cocina/models/access_role.rb
|
258
|
+
- lib/cocina/models/access_role_member.rb
|
257
259
|
- lib/cocina/models/admin_policy.rb
|
258
260
|
- lib/cocina/models/admin_policy_administrative.rb
|
259
261
|
- lib/cocina/models/administrative.rb
|
@@ -269,6 +271,7 @@ files:
|
|
269
271
|
- lib/cocina/models/descriptive_basic_value.rb
|
270
272
|
- lib/cocina/models/descriptive_geographic_metadata.rb
|
271
273
|
- lib/cocina/models/descriptive_grouped_value.rb
|
274
|
+
- lib/cocina/models/descriptive_parallel_event.rb
|
272
275
|
- lib/cocina/models/descriptive_parallel_value.rb
|
273
276
|
- lib/cocina/models/descriptive_structured_value.rb
|
274
277
|
- lib/cocina/models/descriptive_value.rb
|
@@ -326,7 +329,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
326
329
|
- !ruby/object:Gem::Version
|
327
330
|
version: '0'
|
328
331
|
requirements: []
|
329
|
-
rubygems_version: 3.
|
332
|
+
rubygems_version: 3.1.2
|
330
333
|
signing_key:
|
331
334
|
specification_version: 4
|
332
335
|
summary: Data models for the SDR
|