cocina-models 0.47.1 → 0.51.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 +6 -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 +111 -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: f26933441485daf9b322a702e2e72955a2632ff9ea840ed4b700a8130361dfb2
|
4
|
+
data.tar.gz: 877293aa8b242869413b025634e1c44e52ea1cc9aaf856b82a8986a170fedd0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e6919371f789202c7f17b5c8a6036ab68b3ce1dc4486ec8b1f62cf60a5eb3c4857b424b3a19198c74f4fcc1265e5de32a84085aaa11eaa405f41df13f7728b9
|
7
|
+
data.tar.gz: f287df923a3d9bdf37f7c012e5aa222197e953f9e8ed0c86c65df64a5345b402e399b9d6515fc12e5d605f0fc38d7e801393096cdb55d67c856365ef80b8ec34
|
@@ -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,12 @@ 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
|
+
# An additional workflow to start for objects managed by this admin policy once the end-accession workflow step is complete
|
9
|
+
# example: wasCrawlPreassemblyWF
|
10
|
+
attribute :disseminationWorkflow, Types::Strict::String.meta(omittable: true)
|
11
|
+
attribute :collectionsForRegistration, Types::Strict::Array.of(Types::Strict::String).meta(omittable: true)
|
12
|
+
attribute :roles, Types::Strict::Array.of(AccessRole).meta(omittable: true)
|
8
13
|
attribute :hasAdminPolicy, Types::Strict::String
|
9
14
|
end
|
10
15
|
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,24 @@ 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:
|
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
|
+
disseminationWorkflow:
|
219
|
+
description: An additional workflow to start for objects managed by this admin policy once the end-accession workflow step is complete
|
220
|
+
example: wasCrawlPreassemblyWF
|
171
221
|
type: string
|
222
|
+
collectionsForRegistration:
|
223
|
+
description: When you register an item with this admin policy, these are the collections that are available.
|
224
|
+
type: array
|
225
|
+
items:
|
226
|
+
type: string
|
227
|
+
roles:
|
228
|
+
description: The access roles conferred by this AdminPolicy (used by Argo)
|
229
|
+
type: array
|
230
|
+
items:
|
231
|
+
$ref: '#/components/schemas/AccessRole'
|
172
232
|
hasAdminPolicy:
|
173
233
|
type: string
|
174
234
|
required:
|
@@ -239,6 +299,8 @@ components:
|
|
239
299
|
type: object
|
240
300
|
additionalProperties: false
|
241
301
|
properties:
|
302
|
+
sourceId:
|
303
|
+
$ref: '#/components/schemas/SourceId'
|
242
304
|
catalogLinks:
|
243
305
|
type: array
|
244
306
|
items:
|
@@ -437,7 +499,8 @@ components:
|
|
437
499
|
- $ref: "#/components/schemas/DescriptiveParallelValue"
|
438
500
|
- $ref: "#/components/schemas/DescriptiveGroupedValue"
|
439
501
|
- type: object
|
440
|
-
additionalProperties
|
502
|
+
# additionalProperties breaks the validator for DescriptiveValue, unclear as to why.
|
503
|
+
# additionalProperties: false
|
441
504
|
properties:
|
442
505
|
value:
|
443
506
|
description: String or integer value of the descriptive element.
|
@@ -513,6 +576,47 @@ components:
|
|
513
576
|
type: array
|
514
577
|
items:
|
515
578
|
$ref: "#/components/schemas/DescriptiveValue"
|
579
|
+
DescriptiveParallelEvent:
|
580
|
+
description: Value model for multiple representations of information about the same event (e.g. in different languages).
|
581
|
+
type: object
|
582
|
+
additionalProperties: false
|
583
|
+
allOf:
|
584
|
+
- $ref: "#/components/schemas/DescriptiveValueLanguage"
|
585
|
+
- $ref: "#/components/schemas/DescriptiveStructuredValue"
|
586
|
+
- type: object
|
587
|
+
additionalProperties: false
|
588
|
+
properties:
|
589
|
+
type:
|
590
|
+
description: Description of the event (creation, publication, etc.).
|
591
|
+
type: string
|
592
|
+
displayLabel:
|
593
|
+
description: The preferred display label to use for the event in access systems.
|
594
|
+
type: string
|
595
|
+
date:
|
596
|
+
description: Dates associated with the event.
|
597
|
+
type: array
|
598
|
+
items:
|
599
|
+
$ref: "#/components/schemas/DescriptiveValue"
|
600
|
+
contributor:
|
601
|
+
description: Contributors associated with the event.
|
602
|
+
type: array
|
603
|
+
items:
|
604
|
+
$ref: "#/components/schemas/Contributor"
|
605
|
+
location:
|
606
|
+
description: Locations associated with the event.
|
607
|
+
type: array
|
608
|
+
items:
|
609
|
+
$ref: "#/components/schemas/DescriptiveValue"
|
610
|
+
identifier:
|
611
|
+
description: Identifiers and URIs associated with the event.
|
612
|
+
type: array
|
613
|
+
items:
|
614
|
+
$ref: "#/components/schemas/DescriptiveValue"
|
615
|
+
note:
|
616
|
+
description: Other information about the event.
|
617
|
+
type: array
|
618
|
+
items:
|
619
|
+
$ref: "#/components/schemas/DescriptiveValue"
|
516
620
|
DescriptiveParallelValue:
|
517
621
|
description: Value model for multiple representations of the same information (e.g. in different languages).
|
518
622
|
type: object
|
@@ -534,8 +638,7 @@ components:
|
|
534
638
|
DescriptiveValue:
|
535
639
|
description: Default value model for descriptive elements.
|
536
640
|
type: object
|
537
|
-
|
538
|
-
# additionalProperties: false
|
641
|
+
additionalProperties: false
|
539
642
|
allOf:
|
540
643
|
- $ref: "#/components/schemas/DescriptiveBasicValue"
|
541
644
|
- $ref: "#/components/schemas/AppliesTo"
|
@@ -770,6 +873,11 @@ components:
|
|
770
873
|
type: array
|
771
874
|
items:
|
772
875
|
$ref: "#/components/schemas/DescriptiveValue"
|
876
|
+
parallelEvent:
|
877
|
+
description: For multiple representations of information about the same event (e.g. in different languages)
|
878
|
+
type: array
|
879
|
+
items:
|
880
|
+
$ref: "#/components/schemas/DescriptiveParallelEvent"
|
773
881
|
File:
|
774
882
|
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.
|
775
883
|
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.51.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
|