cocina-models 0.74.1 → 0.77.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 +40 -11
- data/.rubocop_todo.yml +71 -2
- data/README.md +19 -3
- data/cocina-models.gemspec +2 -0
- data/description_types.yml +168 -39
- data/docs/description_types.md +471 -216
- data/lib/cocina/generator/generator.rb +7 -15
- data/lib/cocina/generator/schema.rb +1 -3
- data/lib/cocina/generator/schema_base.rb +0 -8
- data/lib/cocina/generator/schema_ref.rb +1 -1
- data/lib/cocina/generator/schema_value.rb +14 -4
- data/lib/cocina/models/access.rb +4 -4
- data/lib/cocina/models/admin_policy.rb +1 -1
- data/lib/cocina/models/admin_policy_access_template.rb +7 -7
- data/lib/cocina/models/admin_policy_administrative.rb +1 -1
- data/lib/cocina/models/admin_policy_with_metadata.rb +3 -3
- data/lib/cocina/models/builders/dro_rights_description_builder.rb +69 -0
- data/lib/cocina/models/builders/name_title_group_builder.rb +130 -0
- data/lib/cocina/models/builders/rights_description_builder.rb +83 -0
- data/lib/cocina/models/builders/title_builder.rb +211 -0
- data/lib/cocina/models/citation_only_access.rb +2 -2
- data/lib/cocina/models/collection_access.rb +4 -4
- data/lib/cocina/models/collection_identification.rb +1 -1
- data/lib/cocina/models/collection_with_metadata.rb +2 -2
- data/lib/cocina/models/contributor.rb +4 -4
- data/lib/cocina/models/controlled_digital_lending_access.rb +2 -2
- data/lib/cocina/models/dark_access.rb +4 -4
- data/lib/cocina/models/description.rb +3 -3
- data/lib/cocina/models/descriptive_basic_value.rb +13 -13
- data/lib/cocina/models/descriptive_parallel_contributor.rb +5 -5
- data/lib/cocina/models/descriptive_parallel_event.rb +3 -3
- data/lib/cocina/models/descriptive_value.rb +13 -13
- data/lib/cocina/models/descriptive_value_language.rb +6 -6
- data/lib/cocina/models/dro.rb +1 -1
- data/lib/cocina/models/dro_access.rb +8 -8
- data/lib/cocina/models/dro_with_metadata.rb +3 -3
- data/lib/cocina/models/embargo.rb +5 -5
- data/lib/cocina/models/event.rb +3 -3
- data/lib/cocina/models/file.rb +4 -4
- data/lib/cocina/models/file_access.rb +4 -4
- data/lib/cocina/models/identification.rb +2 -2
- data/lib/cocina/models/language.rb +12 -12
- data/lib/cocina/models/location_based_access.rb +1 -1
- data/lib/cocina/models/location_based_download_access.rb +1 -1
- data/lib/cocina/models/mapping/error_notifier.rb +36 -0
- data/lib/cocina/models/mapping/from_mods/access.rb +177 -0
- data/lib/cocina/models/mapping/from_mods/admin_metadata.rb +217 -0
- data/lib/cocina/models/mapping/from_mods/alt_rep_group.rb +26 -0
- data/lib/cocina/models/mapping/from_mods/authority.rb +51 -0
- data/lib/cocina/models/mapping/from_mods/contributor.rb +161 -0
- data/lib/cocina/models/mapping/from_mods/description.rb +98 -0
- data/lib/cocina/models/mapping/from_mods/description_builder.rb +61 -0
- data/lib/cocina/models/mapping/from_mods/event.rb +543 -0
- data/lib/cocina/models/mapping/from_mods/form.rb +381 -0
- data/lib/cocina/models/mapping/from_mods/geographic.rb +219 -0
- data/lib/cocina/models/mapping/from_mods/hydrus_default_title_builder.rb +28 -0
- data/lib/cocina/models/mapping/from_mods/identifier.rb +51 -0
- data/lib/cocina/models/mapping/from_mods/identifier_builder.rb +71 -0
- data/lib/cocina/models/mapping/from_mods/identifier_type.rb +292 -0
- data/lib/cocina/models/mapping/from_mods/language.rb +36 -0
- data/lib/cocina/models/mapping/from_mods/language_script.rb +30 -0
- data/lib/cocina/models/mapping/from_mods/language_term.rb +106 -0
- data/lib/cocina/models/mapping/from_mods/name_builder.rb +307 -0
- data/lib/cocina/models/mapping/from_mods/note.rb +162 -0
- data/lib/cocina/models/mapping/from_mods/part_builder.rb +147 -0
- data/lib/cocina/models/mapping/from_mods/primary.rb +27 -0
- data/lib/cocina/models/mapping/from_mods/purl.rb +53 -0
- data/lib/cocina/models/mapping/from_mods/related_resource.rb +105 -0
- data/lib/cocina/models/mapping/from_mods/subject.rb +413 -0
- data/lib/cocina/models/mapping/from_mods/subject_authority_codes.rb +794 -0
- data/lib/cocina/models/mapping/from_mods/title.rb +160 -0
- data/lib/cocina/models/mapping/from_mods/title_builder.rb +106 -0
- data/lib/cocina/models/mapping/from_mods/title_builder_strategy.rb +19 -0
- data/lib/cocina/models/mapping/from_mods/value_uri.rb +25 -0
- data/lib/cocina/models/mapping/normalizers/base.rb +16 -0
- data/lib/cocina/models/mapping/normalizers/mods/geo_extension_normalizer.rb +69 -0
- data/lib/cocina/models/mapping/normalizers/mods/name_normalizer.rb +191 -0
- data/lib/cocina/models/mapping/normalizers/mods/origin_info_normalizer.rb +157 -0
- data/lib/cocina/models/mapping/normalizers/mods/subject_normalizer.rb +296 -0
- data/lib/cocina/models/mapping/normalizers/mods/title_normalizer.rb +91 -0
- data/lib/cocina/models/mapping/normalizers/mods_normalizer.rb +409 -0
- data/lib/cocina/models/mapping/purl.rb +27 -0
- data/lib/cocina/models/mapping/to_mods/access.rb +155 -0
- data/lib/cocina/models/mapping/to_mods/admin_metadata.rb +129 -0
- data/lib/cocina/models/mapping/to_mods/contributor.rb +49 -0
- data/lib/cocina/models/mapping/to_mods/description.rb +63 -0
- data/lib/cocina/models/mapping/to_mods/event.rb +200 -0
- data/lib/cocina/models/mapping/to_mods/form.rb +292 -0
- data/lib/cocina/models/mapping/to_mods/geographic.rb +151 -0
- data/lib/cocina/models/mapping/to_mods/id_generator.rb +25 -0
- data/lib/cocina/models/mapping/to_mods/identifier.rb +57 -0
- data/lib/cocina/models/mapping/to_mods/language.rb +82 -0
- data/lib/cocina/models/mapping/to_mods/mods_writer.rb +38 -0
- data/lib/cocina/models/mapping/to_mods/name_title_group.rb +29 -0
- data/lib/cocina/models/mapping/to_mods/name_writer.rb +228 -0
- data/lib/cocina/models/mapping/to_mods/note.rb +105 -0
- data/lib/cocina/models/mapping/to_mods/part_writer.rb +115 -0
- data/lib/cocina/models/mapping/to_mods/related_resource.rb +108 -0
- data/lib/cocina/models/mapping/to_mods/role_writer.rb +50 -0
- data/lib/cocina/models/mapping/to_mods/subject.rb +486 -0
- data/lib/cocina/models/mapping/to_mods/title.rb +260 -0
- data/lib/cocina/models/object_metadata.rb +2 -2
- data/lib/cocina/models/presentation.rb +2 -2
- data/lib/cocina/models/related_resource.rb +9 -9
- data/lib/cocina/models/release_tag.rb +4 -4
- data/lib/cocina/models/request_admin_policy.rb +1 -1
- data/lib/cocina/models/request_administrative.rb +1 -1
- data/lib/cocina/models/request_collection.rb +2 -2
- data/lib/cocina/models/request_description.rb +3 -3
- data/lib/cocina/models/request_dro.rb +4 -4
- data/lib/cocina/models/request_file.rb +5 -5
- 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 +5 -5
- data/lib/cocina/models/stanford_access.rb +2 -2
- data/lib/cocina/models/title.rb +13 -13
- data/lib/cocina/models/validators/associated_name_validator.rb +77 -0
- data/lib/cocina/models/validators/dark_validator.rb +4 -2
- data/lib/cocina/models/validators/open_api_validator.rb +0 -4
- data/lib/cocina/models/validators/validator.rb +1 -0
- data/lib/cocina/models/version.rb +1 -1
- data/lib/cocina/models/world_access.rb +2 -2
- data/lib/cocina/models.rb +4 -0
- data/lib/cocina/rspec/factories.rb +205 -0
- data/lib/cocina/rspec.rb +2 -0
- data/openapi.yml +4 -4
- metadata +97 -24
- data/docs/_config.yml +0 -1
- data/docs/maps/Agent.json +0 -18
- data/docs/maps/Collection.json +0 -240
- data/docs/maps/DRO.json +0 -316
- data/docs/maps/Description.json +0 -17
- data/docs/maps/File.json +0 -196
- data/docs/maps/Fileset.json +0 -143
- data/docs/maps/README.md +0 -7
- data/docs/maps/ReleaseTag.json +0 -39
- data/docs/maps/Sequence.json +0 -46
- data/docs/maps/Title.json +0 -18
- data/docs/sampleETD/foxml-export.xml +0 -935
- data/docs/sampleETD/foxml.xml +0 -3475
- data/docs/sampleETD/xn109qc9773_bibframe.ttl +0 -95
- data/docs/sampleETD/xn109qc9773_taco.json +0 -158
- data/lib/cocina/models/dro_rights_description_builder.rb +0 -67
- data/lib/cocina/models/rights_description_builder.rb +0 -81
- data/lib/cocina/models/title_builder.rb +0 -208
@@ -23,8 +23,6 @@ module Cocina
|
|
23
23
|
raise ValidationError, e.message
|
24
24
|
end
|
25
25
|
|
26
|
-
# rubocop:disable Metrics/AbcSize
|
27
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
28
26
|
def self.operation_has_cocina_version?(request_operation)
|
29
27
|
schema = request_operation.operation_object.request_body.content['application/json'].schema
|
30
28
|
all_of_properties = Array(schema.all_of&.flat_map { |all_of| all_of.properties&.keys }).compact
|
@@ -32,8 +30,6 @@ module Cocina
|
|
32
30
|
properties = Array(schema.properties&.keys)
|
33
31
|
(properties + all_of_properties + one_of_properties).include?('cocinaVersion')
|
34
32
|
end
|
35
|
-
# rubocop:enable Metrics/AbcSize
|
36
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
37
33
|
private_class_method :operation_has_cocina_version?
|
38
34
|
|
39
35
|
# rubocop:disable Style/ClassVars
|
@@ -8,8 +8,8 @@ module Cocina
|
|
8
8
|
# Download access level.
|
9
9
|
attribute :download, Types::Strict::String.enum('none', 'stanford', 'world')
|
10
10
|
# Not used for this access type, must be null.
|
11
|
-
attribute :location, Types::Strict::String.optional.enum('')
|
12
|
-
attribute :controlledDigitalLending, Types::Strict::Bool.
|
11
|
+
attribute? :location, Types::Strict::String.optional.enum('')
|
12
|
+
attribute? :controlledDigitalLending, Types::Strict::Bool.default(false).enum(false)
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
data/lib/cocina/models.rb
CHANGED
@@ -9,8 +9,11 @@ require 'yaml'
|
|
9
9
|
require 'openapi_parser'
|
10
10
|
require 'openapi3_parser'
|
11
11
|
require 'active_support'
|
12
|
+
require 'active_support/core_ext/class/attribute'
|
13
|
+
require 'active_support/core_ext/enumerable'
|
12
14
|
require 'active_support/core_ext/hash/indifferent_access'
|
13
15
|
require 'active_support/core_ext/string'
|
16
|
+
require 'active_support/core_ext/object/deep_dup'
|
14
17
|
require 'thor'
|
15
18
|
|
16
19
|
# Help Zeitwerk find some of our classes
|
@@ -24,6 +27,7 @@ class CocinaModelsInflector < Zeitwerk::Inflector
|
|
24
27
|
'dro_with_metadata' => 'DROWithMetadata',
|
25
28
|
'request_dro_structural' => 'RequestDROStructural',
|
26
29
|
'rspec' => 'RSpec',
|
30
|
+
'value_uri' => 'ValueURI',
|
27
31
|
'version' => 'VERSION'
|
28
32
|
}.freeze
|
29
33
|
|
@@ -0,0 +1,205 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Cocina
|
4
|
+
module RSpec
|
5
|
+
# Factories for Cocina model objects.
|
6
|
+
class Factories
|
7
|
+
# Provides the build method.
|
8
|
+
module Methods
|
9
|
+
def build(type, ...)
|
10
|
+
# If we don't support this factory, maybe factory_bot does.
|
11
|
+
Factories.supported_type?(type) ? Factories.build(type, ...) : super
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
SUPPORTED_TYPES = %i[
|
16
|
+
admin_policy
|
17
|
+
admin_policy_with_metadata
|
18
|
+
collection
|
19
|
+
collection_with_metadata
|
20
|
+
dro
|
21
|
+
dro_with_metadata
|
22
|
+
request_admin_policy
|
23
|
+
request_collection
|
24
|
+
request_dro
|
25
|
+
].freeze
|
26
|
+
|
27
|
+
def self.supported_type?(type)
|
28
|
+
SUPPORTED_TYPES.include?(type)
|
29
|
+
end
|
30
|
+
|
31
|
+
WITH_METADATA_SUFFIX = '_with_metadata'
|
32
|
+
|
33
|
+
def self.build(type, attributes = {})
|
34
|
+
raise "Unsupported factory type #{type}" unless supported_type?(type)
|
35
|
+
|
36
|
+
build_type = type.to_s.delete_suffix(WITH_METADATA_SUFFIX)
|
37
|
+
|
38
|
+
fixture = public_send("build_#{build_type}".to_sym, attributes)
|
39
|
+
return fixture unless type.end_with?(WITH_METADATA_SUFFIX)
|
40
|
+
|
41
|
+
Cocina::Models.with_metadata(fixture, 'abc123')
|
42
|
+
end
|
43
|
+
|
44
|
+
DRO_DEFAULTS = {
|
45
|
+
type: Cocina::Models::ObjectType.object,
|
46
|
+
id: 'druid:bc234fg5678',
|
47
|
+
version: 1,
|
48
|
+
label: 'test object',
|
49
|
+
title: 'test object',
|
50
|
+
source_id: 'sul:1234',
|
51
|
+
admin_policy_id: 'druid:hv992ry2431'
|
52
|
+
}.freeze
|
53
|
+
|
54
|
+
REQUEST_DRO_DEFAULTS = DRO_DEFAULTS.except(:id)
|
55
|
+
|
56
|
+
COLLECTION_DEFAULTS = DRO_DEFAULTS.except(:source_id).merge(type: Cocina::Models::ObjectType.collection)
|
57
|
+
|
58
|
+
REQUEST_COLLECTION_DEFAULTS = COLLECTION_DEFAULTS.except(:id)
|
59
|
+
|
60
|
+
ADMIN_POLICY_DEFAULTS = {
|
61
|
+
type: Cocina::Models::ObjectType.admin_policy,
|
62
|
+
id: 'druid:bc234fg5678',
|
63
|
+
version: 1,
|
64
|
+
label: 'test admin policy',
|
65
|
+
title: 'test admin policy',
|
66
|
+
admin_policy_id: 'druid:hv992ry2431',
|
67
|
+
agreement_id: 'druid:hp308wm0436'
|
68
|
+
}.freeze
|
69
|
+
|
70
|
+
REQUEST_ADMIN_POLICY_DEFAULTS = ADMIN_POLICY_DEFAULTS.except(:id)
|
71
|
+
|
72
|
+
def self.build_dro_properties(id:, **kwargs)
|
73
|
+
build_request_dro_properties(**kwargs)
|
74
|
+
.merge(externalIdentifier: id)
|
75
|
+
.tap do |props|
|
76
|
+
props[:description][:purl] = "https://purl.stanford.edu/#{id.delete_prefix('druid:')}"
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
def self.build_dro(attributes)
|
81
|
+
Cocina::Models.build(build_dro_properties(**DRO_DEFAULTS.merge(attributes)))
|
82
|
+
end
|
83
|
+
|
84
|
+
# rubocop:disable Metrics/ParameterLists
|
85
|
+
def self.build_request_dro_properties(type:, version:, label:, title:, source_id:, admin_policy_id:,
|
86
|
+
barcode: nil, catkeys: [], collection_ids: [])
|
87
|
+
{
|
88
|
+
type: type,
|
89
|
+
version: version,
|
90
|
+
label: label,
|
91
|
+
access: {},
|
92
|
+
administrative: { hasAdminPolicy: admin_policy_id },
|
93
|
+
description: {
|
94
|
+
title: [{ value: title }]
|
95
|
+
},
|
96
|
+
identification: {
|
97
|
+
sourceId: source_id
|
98
|
+
},
|
99
|
+
structural: {
|
100
|
+
isMemberOf: collection_ids
|
101
|
+
}
|
102
|
+
}.tap do |props|
|
103
|
+
if catkeys.present?
|
104
|
+
props[:identification][:catalogLinks] = catkeys.map.with_index do |catkey, index|
|
105
|
+
{ catalog: 'symphony', catalogRecordId: catkey, refresh: index.zero? }
|
106
|
+
end
|
107
|
+
end
|
108
|
+
props[:identification][:barcode] = barcode if barcode
|
109
|
+
end
|
110
|
+
end
|
111
|
+
# rubocop:enable Metrics/ParameterLists
|
112
|
+
|
113
|
+
def self.build_request_dro(attributes)
|
114
|
+
Cocina::Models.build_request(build_request_dro_properties(**REQUEST_DRO_DEFAULTS.merge(attributes)))
|
115
|
+
end
|
116
|
+
|
117
|
+
def self.build_collection_properties(id:, **kwargs)
|
118
|
+
build_request_collection_properties(**kwargs)
|
119
|
+
.merge(externalIdentifier: id)
|
120
|
+
.tap do |props|
|
121
|
+
props[:description][:purl] = "https://purl.stanford.edu/#{id.delete_prefix('druid:')}"
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
# rubocop:disable Metrics/ParameterLists
|
126
|
+
def self.build_request_collection_properties(type:, version:, label:, title:, admin_policy_id:, source_id: nil, catkeys: [])
|
127
|
+
{
|
128
|
+
type: type,
|
129
|
+
version: version,
|
130
|
+
label: label,
|
131
|
+
access: {},
|
132
|
+
administrative: { hasAdminPolicy: admin_policy_id },
|
133
|
+
description: {
|
134
|
+
title: [{ value: title }]
|
135
|
+
},
|
136
|
+
identification: {}
|
137
|
+
}.tap do |props|
|
138
|
+
if catkeys.present?
|
139
|
+
props[:identification][:catalogLinks] = catkeys.map.with_index do |catkey, index|
|
140
|
+
{ catalog: 'symphony', catalogRecordId: catkey, refresh: index.zero? }
|
141
|
+
end
|
142
|
+
end
|
143
|
+
props[:identification][:sourceId] = source_id if source_id
|
144
|
+
end
|
145
|
+
end
|
146
|
+
# rubocop:enable Metrics/ParameterLists
|
147
|
+
|
148
|
+
def self.build_collection(attributes)
|
149
|
+
Cocina::Models.build(build_collection_properties(**COLLECTION_DEFAULTS.merge(attributes)))
|
150
|
+
end
|
151
|
+
|
152
|
+
def self.build_request_collection(attributes)
|
153
|
+
Cocina::Models.build_request(build_request_collection_properties(**REQUEST_COLLECTION_DEFAULTS.merge(attributes)))
|
154
|
+
end
|
155
|
+
|
156
|
+
def self.build_admin_policy(attributes)
|
157
|
+
Cocina::Models.build(build_admin_policy_properties(**ADMIN_POLICY_DEFAULTS.merge(attributes)))
|
158
|
+
end
|
159
|
+
|
160
|
+
def self.build_request_admin_policy(attributes)
|
161
|
+
Cocina::Models.build_request(build_request_admin_policy_properties(**REQUEST_ADMIN_POLICY_DEFAULTS.merge(attributes)))
|
162
|
+
end
|
163
|
+
|
164
|
+
def self.build_admin_policy_properties(id:, **kwargs)
|
165
|
+
build_request_admin_policy_properties(**kwargs)
|
166
|
+
.merge(externalIdentifier: id)
|
167
|
+
.tap do |props|
|
168
|
+
props[:description][:purl] = "https://purl.stanford.edu/#{id.delete_prefix('druid:')}"
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
# rubocop:disable Metrics/ParameterLists
|
173
|
+
def self.build_request_admin_policy_properties(type:, version:, label:, title:,
|
174
|
+
admin_policy_id:, agreement_id:,
|
175
|
+
use_statement: nil, copyright: nil, license: nil,
|
176
|
+
registration_workflow: nil, collections_for_registration: nil,
|
177
|
+
without_description: false)
|
178
|
+
{
|
179
|
+
type: type,
|
180
|
+
version: version,
|
181
|
+
label: label,
|
182
|
+
administrative: {
|
183
|
+
hasAdminPolicy: admin_policy_id,
|
184
|
+
hasAgreement: agreement_id,
|
185
|
+
accessTemplate: {
|
186
|
+
view: 'world',
|
187
|
+
download: 'world'
|
188
|
+
}
|
189
|
+
},
|
190
|
+
description: {
|
191
|
+
title: [{ value: title }]
|
192
|
+
}
|
193
|
+
}.tap do |props|
|
194
|
+
props[:administrative][:accessTemplate][:useAndReproductionStatement] = use_statement if use_statement
|
195
|
+
props[:administrative][:accessTemplate][:copyright] = copyright if copyright
|
196
|
+
props[:administrative][:accessTemplate][:license] = license if license
|
197
|
+
props[:administrative][:registrationWorkflow] = registration_workflow if registration_workflow
|
198
|
+
props[:administrative][:collectionsForRegistration] = collections_for_registration if collections_for_registration
|
199
|
+
props.delete(:description) if without_description
|
200
|
+
end
|
201
|
+
end
|
202
|
+
# rubocop:enable Metrics/ParameterLists
|
203
|
+
end
|
204
|
+
end
|
205
|
+
end
|
data/lib/cocina/rspec.rb
CHANGED
@@ -4,7 +4,9 @@ require 'rspec/core'
|
|
4
4
|
require 'rspec/matchers'
|
5
5
|
require 'super_diff/rspec'
|
6
6
|
require 'cocina/rspec/matchers'
|
7
|
+
require 'cocina/rspec/factories'
|
7
8
|
|
8
9
|
RSpec.configure do |config|
|
9
10
|
config.include Cocina::RSpec::Matchers
|
11
|
+
config.include Cocina::RSpec::Factories::Methods
|
10
12
|
end
|
data/openapi.yml
CHANGED
@@ -383,6 +383,7 @@ components:
|
|
383
383
|
catalogRecordId:
|
384
384
|
description: Record identifier that is unique within the context of the linked record's catalog.
|
385
385
|
type: string
|
386
|
+
pattern: '^\d+(:\d+)*$'
|
386
387
|
example: '11403803'
|
387
388
|
required:
|
388
389
|
- catalog
|
@@ -523,7 +524,7 @@ components:
|
|
523
524
|
items:
|
524
525
|
$ref: "#/components/schemas/DescriptiveValue"
|
525
526
|
type:
|
526
|
-
description: Entity type of the contributor (person, organization, etc.). See https://sul-dlss
|
527
|
+
description: Entity type of the contributor (person, organization, etc.). See https://github.com/sul-dlss/cocina-models/blob/main/docs/description_types.md for valid types.
|
527
528
|
type: string
|
528
529
|
status:
|
529
530
|
description: Status of the contributor relative to other parallel contributors
|
@@ -579,7 +580,6 @@ components:
|
|
579
580
|
required:
|
580
581
|
- view
|
581
582
|
- download
|
582
|
-
- controlledDigitalLending
|
583
583
|
DarkAccess:
|
584
584
|
type: object
|
585
585
|
properties:
|
@@ -712,7 +712,7 @@ components:
|
|
712
712
|
# https://github.com/interagent/committee/issues/286
|
713
713
|
# - type: integer
|
714
714
|
type:
|
715
|
-
description: Type of value provided by the descriptive element. See https://sul-dlss
|
715
|
+
description: Type of value provided by the descriptive element. See https://github.com/sul-dlss/cocina-models/blob/main/docs/description_types.md for valid types.
|
716
716
|
type: string
|
717
717
|
status:
|
718
718
|
description: Status of the descriptive element value relative to other instances
|
@@ -788,7 +788,7 @@ components:
|
|
788
788
|
items:
|
789
789
|
$ref: "#/components/schemas/DescriptiveValue"
|
790
790
|
type:
|
791
|
-
description: Entity type of the contributor (person, organization, etc.). See https://sul-dlss
|
791
|
+
description: Entity type of the contributor (person, organization, etc.). See https://github.com/sul-dlss/cocina-models/blob/main/docs/description_types.md for valid types.
|
792
792
|
type: string
|
793
793
|
status:
|
794
794
|
description: Status of the contributor relative to other parallel contributors (e.g. the primary author among a group of contributors).
|
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.77.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -66,6 +66,34 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.1'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: equivalent-xml
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: nokogiri
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
98
|
name: openapi3_parser
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -275,24 +303,9 @@ files:
|
|
275
303
|
- bin/setup
|
276
304
|
- cocina-models.gemspec
|
277
305
|
- description_types.yml
|
278
|
-
- docs/_config.yml
|
279
306
|
- docs/cocina-base.jsonld
|
280
307
|
- docs/description_types.md
|
281
308
|
- docs/index.html
|
282
|
-
- docs/maps/Agent.json
|
283
|
-
- docs/maps/Collection.json
|
284
|
-
- docs/maps/DRO.json
|
285
|
-
- docs/maps/Description.json
|
286
|
-
- docs/maps/File.json
|
287
|
-
- docs/maps/Fileset.json
|
288
|
-
- docs/maps/README.md
|
289
|
-
- docs/maps/ReleaseTag.json
|
290
|
-
- docs/maps/Sequence.json
|
291
|
-
- docs/maps/Title.json
|
292
|
-
- docs/sampleETD/foxml-export.xml
|
293
|
-
- docs/sampleETD/foxml.xml
|
294
|
-
- docs/sampleETD/xn109qc9773_bibframe.ttl
|
295
|
-
- docs/sampleETD/xn109qc9773_taco.json
|
296
309
|
- exe/generator
|
297
310
|
- lib/cocina/generator.rb
|
298
311
|
- lib/cocina/generator/datatype.rb
|
@@ -313,6 +326,10 @@ files:
|
|
313
326
|
- lib/cocina/models/admin_policy_with_metadata.rb
|
314
327
|
- lib/cocina/models/administrative.rb
|
315
328
|
- lib/cocina/models/applies_to.rb
|
329
|
+
- lib/cocina/models/builders/dro_rights_description_builder.rb
|
330
|
+
- lib/cocina/models/builders/name_title_group_builder.rb
|
331
|
+
- lib/cocina/models/builders/rights_description_builder.rb
|
332
|
+
- lib/cocina/models/builders/title_builder.rb
|
316
333
|
- lib/cocina/models/business_barcode.rb
|
317
334
|
- lib/cocina/models/catalog_link.rb
|
318
335
|
- lib/cocina/models/catkey_barcode.rb
|
@@ -341,7 +358,6 @@ files:
|
|
341
358
|
- lib/cocina/models/doi.rb
|
342
359
|
- lib/cocina/models/dro.rb
|
343
360
|
- lib/cocina/models/dro_access.rb
|
344
|
-
- lib/cocina/models/dro_rights_description_builder.rb
|
345
361
|
- lib/cocina/models/dro_structural.rb
|
346
362
|
- lib/cocina/models/dro_with_metadata.rb
|
347
363
|
- lib/cocina/models/druid.rb
|
@@ -360,6 +376,63 @@ files:
|
|
360
376
|
- lib/cocina/models/license.rb
|
361
377
|
- lib/cocina/models/location_based_access.rb
|
362
378
|
- lib/cocina/models/location_based_download_access.rb
|
379
|
+
- lib/cocina/models/mapping/error_notifier.rb
|
380
|
+
- lib/cocina/models/mapping/from_mods/access.rb
|
381
|
+
- lib/cocina/models/mapping/from_mods/admin_metadata.rb
|
382
|
+
- lib/cocina/models/mapping/from_mods/alt_rep_group.rb
|
383
|
+
- lib/cocina/models/mapping/from_mods/authority.rb
|
384
|
+
- lib/cocina/models/mapping/from_mods/contributor.rb
|
385
|
+
- lib/cocina/models/mapping/from_mods/description.rb
|
386
|
+
- lib/cocina/models/mapping/from_mods/description_builder.rb
|
387
|
+
- lib/cocina/models/mapping/from_mods/event.rb
|
388
|
+
- lib/cocina/models/mapping/from_mods/form.rb
|
389
|
+
- lib/cocina/models/mapping/from_mods/geographic.rb
|
390
|
+
- lib/cocina/models/mapping/from_mods/hydrus_default_title_builder.rb
|
391
|
+
- lib/cocina/models/mapping/from_mods/identifier.rb
|
392
|
+
- lib/cocina/models/mapping/from_mods/identifier_builder.rb
|
393
|
+
- lib/cocina/models/mapping/from_mods/identifier_type.rb
|
394
|
+
- lib/cocina/models/mapping/from_mods/language.rb
|
395
|
+
- lib/cocina/models/mapping/from_mods/language_script.rb
|
396
|
+
- lib/cocina/models/mapping/from_mods/language_term.rb
|
397
|
+
- lib/cocina/models/mapping/from_mods/name_builder.rb
|
398
|
+
- lib/cocina/models/mapping/from_mods/note.rb
|
399
|
+
- lib/cocina/models/mapping/from_mods/part_builder.rb
|
400
|
+
- lib/cocina/models/mapping/from_mods/primary.rb
|
401
|
+
- lib/cocina/models/mapping/from_mods/purl.rb
|
402
|
+
- lib/cocina/models/mapping/from_mods/related_resource.rb
|
403
|
+
- lib/cocina/models/mapping/from_mods/subject.rb
|
404
|
+
- lib/cocina/models/mapping/from_mods/subject_authority_codes.rb
|
405
|
+
- lib/cocina/models/mapping/from_mods/title.rb
|
406
|
+
- lib/cocina/models/mapping/from_mods/title_builder.rb
|
407
|
+
- lib/cocina/models/mapping/from_mods/title_builder_strategy.rb
|
408
|
+
- lib/cocina/models/mapping/from_mods/value_uri.rb
|
409
|
+
- lib/cocina/models/mapping/normalizers/base.rb
|
410
|
+
- lib/cocina/models/mapping/normalizers/mods/geo_extension_normalizer.rb
|
411
|
+
- lib/cocina/models/mapping/normalizers/mods/name_normalizer.rb
|
412
|
+
- lib/cocina/models/mapping/normalizers/mods/origin_info_normalizer.rb
|
413
|
+
- lib/cocina/models/mapping/normalizers/mods/subject_normalizer.rb
|
414
|
+
- lib/cocina/models/mapping/normalizers/mods/title_normalizer.rb
|
415
|
+
- lib/cocina/models/mapping/normalizers/mods_normalizer.rb
|
416
|
+
- lib/cocina/models/mapping/purl.rb
|
417
|
+
- lib/cocina/models/mapping/to_mods/access.rb
|
418
|
+
- lib/cocina/models/mapping/to_mods/admin_metadata.rb
|
419
|
+
- lib/cocina/models/mapping/to_mods/contributor.rb
|
420
|
+
- lib/cocina/models/mapping/to_mods/description.rb
|
421
|
+
- lib/cocina/models/mapping/to_mods/event.rb
|
422
|
+
- lib/cocina/models/mapping/to_mods/form.rb
|
423
|
+
- lib/cocina/models/mapping/to_mods/geographic.rb
|
424
|
+
- lib/cocina/models/mapping/to_mods/id_generator.rb
|
425
|
+
- lib/cocina/models/mapping/to_mods/identifier.rb
|
426
|
+
- lib/cocina/models/mapping/to_mods/language.rb
|
427
|
+
- lib/cocina/models/mapping/to_mods/mods_writer.rb
|
428
|
+
- lib/cocina/models/mapping/to_mods/name_title_group.rb
|
429
|
+
- lib/cocina/models/mapping/to_mods/name_writer.rb
|
430
|
+
- lib/cocina/models/mapping/to_mods/note.rb
|
431
|
+
- lib/cocina/models/mapping/to_mods/part_writer.rb
|
432
|
+
- lib/cocina/models/mapping/to_mods/related_resource.rb
|
433
|
+
- lib/cocina/models/mapping/to_mods/role_writer.rb
|
434
|
+
- lib/cocina/models/mapping/to_mods/subject.rb
|
435
|
+
- lib/cocina/models/mapping/to_mods/title.rb
|
363
436
|
- lib/cocina/models/message_digest.rb
|
364
437
|
- lib/cocina/models/object_metadata.rb
|
365
438
|
- lib/cocina/models/object_type.rb
|
@@ -377,7 +450,6 @@ files:
|
|
377
450
|
- lib/cocina/models/request_file_set.rb
|
378
451
|
- lib/cocina/models/request_file_set_structural.rb
|
379
452
|
- lib/cocina/models/request_identification.rb
|
380
|
-
- lib/cocina/models/rights_description_builder.rb
|
381
453
|
- lib/cocina/models/sequence.rb
|
382
454
|
- lib/cocina/models/source.rb
|
383
455
|
- lib/cocina/models/source_id.rb
|
@@ -385,8 +457,8 @@ files:
|
|
385
457
|
- lib/cocina/models/standard_barcode.rb
|
386
458
|
- lib/cocina/models/stanford_access.rb
|
387
459
|
- lib/cocina/models/title.rb
|
388
|
-
- lib/cocina/models/title_builder.rb
|
389
460
|
- lib/cocina/models/validatable.rb
|
461
|
+
- lib/cocina/models/validators/associated_name_validator.rb
|
390
462
|
- lib/cocina/models/validators/catalog_links_validator.rb
|
391
463
|
- lib/cocina/models/validators/dark_validator.rb
|
392
464
|
- lib/cocina/models/validators/description_types_validator.rb
|
@@ -397,13 +469,14 @@ files:
|
|
397
469
|
- lib/cocina/models/vocabulary.rb
|
398
470
|
- lib/cocina/models/world_access.rb
|
399
471
|
- lib/cocina/rspec.rb
|
472
|
+
- lib/cocina/rspec/factories.rb
|
400
473
|
- lib/cocina/rspec/matchers.rb
|
401
474
|
- openapi.yml
|
402
475
|
homepage: https://github.com/sul-dlss/cocina-models
|
403
476
|
licenses: []
|
404
477
|
metadata:
|
405
478
|
rubygems_mfa_required: 'true'
|
406
|
-
post_install_message:
|
479
|
+
post_install_message:
|
407
480
|
rdoc_options: []
|
408
481
|
require_paths:
|
409
482
|
- lib
|
@@ -418,8 +491,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
418
491
|
- !ruby/object:Gem::Version
|
419
492
|
version: '0'
|
420
493
|
requirements: []
|
421
|
-
rubygems_version: 3.
|
422
|
-
signing_key:
|
494
|
+
rubygems_version: 3.2.32
|
495
|
+
signing_key:
|
423
496
|
specification_version: 4
|
424
497
|
summary: Data models for the SDR
|
425
498
|
test_files: []
|
data/docs/_config.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
theme: jekyll-theme-tactile
|
data/docs/maps/Agent.json
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "http://json-schema.org/draft-06/schema#",
|
3
|
-
"id": "http://cocina.sul.stanford.edu/schemas/Agent",
|
4
|
-
"title": "Agent",
|
5
|
-
"description": "An Agent - Person, Group, Organization, or other Acting body.",
|
6
|
-
"type": "object",
|
7
|
-
"required": ["name"],
|
8
|
-
"properties": {
|
9
|
-
"name": {
|
10
|
-
"description": "Primary label or name for an Agent.",
|
11
|
-
"type": "string"
|
12
|
-
},
|
13
|
-
"sunetID": {
|
14
|
-
"description": "Stanford University NetID for the Agent.",
|
15
|
-
"type": "string"
|
16
|
-
}
|
17
|
-
}
|
18
|
-
}
|