cocina-models 0.107.1 → 0.108.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +33 -11
- data/lib/cocina/generator/datatype.rb +1 -1
- data/lib/cocina/generator/schema_array.rb +1 -1
- data/lib/cocina/generator/schema_base.rb +10 -2
- data/lib/cocina/generator/schema_ref.rb +2 -2
- data/lib/cocina/generator/union_type.rb +1 -1
- data/lib/cocina/generator/vocab.rb +6 -5
- data/lib/cocina/models/access_role.rb +1 -0
- data/lib/cocina/models/admin_policy.rb +1 -0
- data/lib/cocina/models/admin_policy_access_template.rb +9 -3
- data/lib/cocina/models/admin_policy_administrative.rb +10 -1
- data/lib/cocina/models/admin_policy_lite.rb +3 -0
- data/lib/cocina/models/admin_policy_with_metadata.rb +1 -0
- data/lib/cocina/models/applies_to.rb +2 -1
- data/lib/cocina/models/barcode.rb +1 -0
- data/lib/cocina/models/business_barcode.rb +2 -0
- data/lib/cocina/models/catalog_link.rb +1 -0
- data/lib/cocina/models/catkey_barcode.rb +3 -0
- data/lib/cocina/models/citation_only_access.rb +2 -1
- data/lib/cocina/models/cocina_version.rb +2 -0
- data/lib/cocina/models/collection.rb +3 -1
- data/lib/cocina/models/collection_access.rb +6 -2
- data/lib/cocina/models/collection_identification.rb +8 -1
- data/lib/cocina/models/collection_lite.rb +7 -1
- data/lib/cocina/models/collection_with_metadata.rb +1 -0
- data/lib/cocina/models/contributor.rb +13 -3
- data/lib/cocina/models/copyright.rb +2 -0
- data/lib/cocina/models/created_in_folio_identifier.rb +2 -0
- data/lib/cocina/models/description.rb +14 -0
- data/lib/cocina/models/descriptive_access_metadata.rb +7 -0
- data/lib/cocina/models/descriptive_admin_metadata.rb +6 -0
- data/lib/cocina/models/descriptive_basic_value.rb +15 -3
- data/lib/cocina/models/descriptive_geographic_metadata.rb +1 -0
- data/lib/cocina/models/descriptive_grouped_value.rb +2 -1
- data/lib/cocina/models/descriptive_parallel_contributor.rb +11 -3
- data/lib/cocina/models/descriptive_parallel_event.rb +8 -1
- data/lib/cocina/models/descriptive_parallel_value.rb +2 -1
- data/lib/cocina/models/descriptive_value.rb +13 -2
- data/lib/cocina/models/descriptive_value_language.rb +5 -0
- data/lib/cocina/models/doi.rb +2 -1
- data/lib/cocina/models/doi_exceptions.rb +6 -1
- data/lib/cocina/models/dro.rb +4 -1
- data/lib/cocina/models/dro_access.rb +6 -2
- data/lib/cocina/models/dro_lite.rb +10 -1
- data/lib/cocina/models/dro_structural.rb +4 -0
- data/lib/cocina/models/dro_with_metadata.rb +2 -0
- data/lib/cocina/models/druid.rb +1 -0
- data/lib/cocina/models/embargo.rb +4 -1
- data/lib/cocina/models/event.rb +8 -0
- data/lib/cocina/models/file.rb +8 -3
- data/lib/cocina/models/file_set.rb +1 -0
- data/lib/cocina/models/file_use.rb +1 -0
- data/lib/cocina/models/folio_catalog_link.rb +3 -1
- data/lib/cocina/models/identification.rb +8 -1
- data/lib/cocina/models/lane_medical_barcode.rb +2 -0
- data/lib/cocina/models/language.rb +22 -3
- data/lib/cocina/models/language_tag.rb +2 -0
- data/lib/cocina/models/libraries_doi.rb +11 -0
- data/lib/cocina/models/license.rb +2 -0
- data/lib/cocina/models/migrated_from_symphony_identifier.rb +2 -0
- data/lib/cocina/models/migrated_from_voyager_identifier.rb +2 -0
- data/lib/cocina/models/preregistered_repository_doi.rb +12 -0
- data/lib/cocina/models/purl.rb +1 -0
- data/lib/cocina/models/related_resource.rb +17 -1
- data/lib/cocina/models/repository_doi.rb +13 -0
- data/lib/cocina/models/request_admin_policy.rb +3 -0
- data/lib/cocina/models/request_administrative.rb +2 -1
- data/lib/cocina/models/request_collection.rb +3 -0
- data/lib/cocina/models/request_description.rb +16 -1
- data/lib/cocina/models/request_dro.rb +8 -1
- data/lib/cocina/models/request_dro_structural.rb +1 -0
- data/lib/cocina/models/request_file.rb +4 -1
- data/lib/cocina/models/request_file_set.rb +1 -0
- data/lib/cocina/models/request_identification.rb +8 -1
- data/lib/cocina/models/sequence.rb +1 -0
- data/lib/cocina/models/source.rb +3 -1
- data/lib/cocina/models/source_id.rb +10 -0
- data/lib/cocina/models/standard.rb +5 -1
- data/lib/cocina/models/standard_barcode.rb +2 -0
- data/lib/cocina/models/symphony_catalog_link.rb +3 -1
- data/lib/cocina/models/title.rb +13 -2
- data/lib/cocina/models/use_and_reproduction_statement.rb +5 -0
- data/lib/cocina/models/version.rb +1 -1
- data/lib/cocina/models.rb +5 -1
- data/openapi.yml +24 -13
- metadata +6 -4
- data/lib/cocina/models/doi_pattern.rb +0 -7
|
@@ -6,25 +6,41 @@ module Cocina
|
|
|
6
6
|
class RelatedResource < Struct
|
|
7
7
|
# The relationship of the related resource to the described resource.
|
|
8
8
|
attribute? :type, Types::Strict::String
|
|
9
|
-
# The DataCite relationType describing the relationship from the related resource to
|
|
9
|
+
# The DataCite relationType describing the relationship from the related resource to
|
|
10
|
+
# the described resource. See https://datacite-metadata-schema.readthedocs.io/en/4.6/appendices/appendix-1/relationType
|
|
10
11
|
attribute? :dataCiteRelationType, Types::Strict::String.enum('IsCitedBy', 'Cites', 'IsSupplementTo', 'IsSupplementedBy', 'IsContinuedBy', 'Continues', 'Describes', 'IsDescribedBy', 'HasMetadata', 'IsMetadataFor', 'HasVersion', 'IsVersionOf', 'IsNewVersionOf', 'IsPreviousVersionOf', 'IsPartOf', 'HasPart', 'IsPublishedIn', 'IsReferencedBy', 'References', 'IsDocumentedBy', 'Documents', 'IsCompiledBy', 'Compiles', 'IsVariantFormOf', 'IsOriginalFormOf', 'IsIdenticalTo', 'IsReviewedBy', 'Reviews', 'IsDerivedFrom', 'IsSourceOf', 'IsRequiredBy', 'Requires', 'Obsoletes', 'IsObsoletedBy', 'IsCollectedBy', 'Collects', 'IsTranslationOf', 'HasTranslation')
|
|
11
12
|
# Status of the related resource relative to other related resources.
|
|
12
13
|
attribute? :status, Types::Strict::String
|
|
13
14
|
# The preferred display label to use for the related resource in access systems.
|
|
14
15
|
attribute? :displayLabel, Types::Strict::String
|
|
16
|
+
# Titles of the related resource.
|
|
15
17
|
attribute :title, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
|
|
18
|
+
# Agents contributing in some way to the creation and history of the related resource.
|
|
16
19
|
attribute :contributor, Types::Strict::Array.of(Contributor).default([].freeze)
|
|
20
|
+
# Events in the history of the related resource.
|
|
17
21
|
attribute :event, Types::Strict::Array.of(Event).default([].freeze)
|
|
22
|
+
# Characteristics of the related resource's physical, digital, and intellectual form
|
|
23
|
+
# and genre, and of its process of creation.
|
|
18
24
|
attribute :form, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
|
|
25
|
+
# Languages, scripts, symbolic systems, and notations used in all or part of a related
|
|
26
|
+
# resource.
|
|
19
27
|
attribute :language, Types::Strict::Array.of(Language).default([].freeze)
|
|
28
|
+
# Additional information relevant to a related resource.
|
|
20
29
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
|
|
30
|
+
# Identifiers and URIs associated with the related resource.
|
|
21
31
|
attribute :identifier, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
|
|
32
|
+
# Property model for indicating the encoding, standard, or syntax to which a value
|
|
33
|
+
# conforms (e.g. RDA).
|
|
22
34
|
attribute? :standard, Standard.optional
|
|
35
|
+
# Terms associated with the intellectual content of the related resource.
|
|
23
36
|
attribute :subject, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
|
|
24
37
|
# Stanford persistent URL associated with the related resource.
|
|
25
38
|
attribute? :purl, Purl.optional
|
|
39
|
+
# Information about how to access digital and physical versions of the object.
|
|
26
40
|
attribute? :access, DescriptiveAccessMetadata.optional
|
|
41
|
+
# Other resources associated with the related resource.
|
|
27
42
|
attribute :relatedResource, Types::Strict::Array.of(RelatedResource).default([].freeze)
|
|
43
|
+
# Information about this resource description.
|
|
28
44
|
attribute? :adminMetadata, DescriptiveAdminMetadata.optional
|
|
29
45
|
# The version of the related resource.
|
|
30
46
|
attribute? :version, Types::Strict::String
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cocina
|
|
4
|
+
module Models
|
|
5
|
+
# The DOI (Digital Object Identifier, https://www.doi.org) pattern for SDR objects,
|
|
6
|
+
# based on the object's repository identifier. Permits both production and text prefixes
|
|
7
|
+
# to be used to account for objects in different SDR environments. Please note that
|
|
8
|
+
# while DOIs are *not* case-sensitive, we constrain the DOIs we mint for SDR to lowercase
|
|
9
|
+
# for consistency.
|
|
10
|
+
# example: 10.25740/bc123df4567
|
|
11
|
+
RepositoryDOI = Types::String.constrained(format: %r{^10\.(25740|80343)/[b-df-hjkmnp-tv-z]{2}[0-9]{3}[b-df-hjkmnp-tv-z]{2}[0-9]{4}$})
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -16,7 +16,10 @@ module Cocina
|
|
|
16
16
|
attribute :type, Types::Strict::String.enum(*RequestAdminPolicy::TYPES)
|
|
17
17
|
attribute :label, Types::Strict::String
|
|
18
18
|
attribute :version, Types::Strict::Integer.default(1).enum(1)
|
|
19
|
+
# Administrative properties for an AdminPolicy
|
|
19
20
|
attribute(:administrative, AdminPolicyAdministrative.default { AdminPolicyAdministrative.new })
|
|
21
|
+
# Description that is included in a request to create a DRO. This is the same as a
|
|
22
|
+
# Description, except excludes PURL.
|
|
20
23
|
attribute? :description, RequestDescription.optional
|
|
21
24
|
end
|
|
22
25
|
end
|
|
@@ -5,7 +5,8 @@ module Cocina
|
|
|
5
5
|
class RequestAdministrative < Struct
|
|
6
6
|
# example: druid:bc123df4567
|
|
7
7
|
attribute :hasAdminPolicy, Druid
|
|
8
|
-
# Internal project this resource is a part of. This governs routing of messages about
|
|
8
|
+
# Internal project this resource is a part of. This governs routing of messages about
|
|
9
|
+
# this object.
|
|
9
10
|
# example: Google Books
|
|
10
11
|
attribute? :partOfProject, Types::Strict::String
|
|
11
12
|
end
|
|
@@ -20,8 +20,11 @@ module Cocina
|
|
|
20
20
|
attribute :type, Types::Strict::String.enum(*RequestCollection::TYPES)
|
|
21
21
|
attribute :label, Types::Strict::String
|
|
22
22
|
attribute :version, Types::Strict::Integer.default(1).enum(1)
|
|
23
|
+
# Access metadata for collections
|
|
23
24
|
attribute(:access, CollectionAccess.default { CollectionAccess.new })
|
|
24
25
|
attribute(:administrative, RequestAdministrative.default { RequestAdministrative.new })
|
|
26
|
+
# Description that is included in a request to create a DRO. This is the same as a
|
|
27
|
+
# Description, except excludes PURL.
|
|
25
28
|
attribute? :description, RequestDescription.optional
|
|
26
29
|
attribute? :identification, CollectionIdentification.optional
|
|
27
30
|
end
|
|
@@ -2,22 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
module Cocina
|
|
4
4
|
module Models
|
|
5
|
-
# Description that is included in a request to create a DRO. This is the same as a
|
|
5
|
+
# Description that is included in a request to create a DRO. This is the same as a
|
|
6
|
+
# Description, except excludes PURL.
|
|
6
7
|
class RequestDescription < Struct
|
|
7
8
|
include Validatable
|
|
8
9
|
|
|
10
|
+
# Titles of the resource.
|
|
9
11
|
attribute :title, Types::Strict::Array.of(Title).default([].freeze)
|
|
12
|
+
# Agents contributing in some way to the creation and history of the resource.
|
|
10
13
|
attribute :contributor, Types::Strict::Array.of(Contributor).default([].freeze)
|
|
14
|
+
# Events in the history of the resource.
|
|
11
15
|
attribute :event, Types::Strict::Array.of(Event).default([].freeze)
|
|
16
|
+
# Characteristics of the resource's physical, digital, and intellectual form and genre,
|
|
17
|
+
# and of its process of creation.
|
|
12
18
|
attribute :form, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
|
|
19
|
+
# Geographic description for items with coordinates or bounding boxes.
|
|
13
20
|
attribute :geographic, Types::Strict::Array.of(DescriptiveGeographicMetadata).default([].freeze)
|
|
21
|
+
# Languages, scripts, symbolic systems, and notations used in all or part of a resource.
|
|
14
22
|
attribute :language, Types::Strict::Array.of(Language).default([].freeze)
|
|
23
|
+
# Additional information relevant to a resource.
|
|
15
24
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
|
|
25
|
+
# Identifiers and URIs associated with the resource.
|
|
16
26
|
attribute :identifier, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
|
|
27
|
+
# Terms associated with the intellectual content of the resource.
|
|
17
28
|
attribute :subject, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
|
|
29
|
+
# Information about how to access digital and physical versions of the object.
|
|
18
30
|
attribute? :access, DescriptiveAccessMetadata.optional
|
|
31
|
+
# Other resources associated with the described resource.
|
|
19
32
|
attribute :relatedResource, Types::Strict::Array.of(RelatedResource).default([].freeze)
|
|
33
|
+
# Data about the resource represented in MARC fixed fields and codes.
|
|
20
34
|
attribute :marcEncodedData, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
|
|
35
|
+
# Information about this resource description.
|
|
21
36
|
attribute? :adminMetadata, DescriptiveAdminMetadata.optional
|
|
22
37
|
# URL or other pointer to the location of the resource description.
|
|
23
38
|
attribute? :valueAt, Types::Strict::String
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
module Cocina
|
|
4
4
|
module Models
|
|
5
|
-
# A request to create a DRO. This has the same general structure as a DRO but doesn't
|
|
5
|
+
# A request to create a DRO. This has the same general structure as a DRO but doesn't
|
|
6
|
+
# have externalIdentifier and doesn't require the access subschema. If no access subschema
|
|
7
|
+
# is provided, these values will be inherited from the AdminPolicy.
|
|
6
8
|
class RequestDRO < Struct
|
|
7
9
|
include Validatable
|
|
8
10
|
|
|
@@ -32,9 +34,14 @@ module Cocina
|
|
|
32
34
|
attribute :version, Types::Strict::Integer.default(1).enum(1)
|
|
33
35
|
attribute? :access, DROAccess.optional
|
|
34
36
|
attribute(:administrative, RequestAdministrative.default { RequestAdministrative.new })
|
|
37
|
+
# Description that is included in a request to create a DRO. This is the same as a
|
|
38
|
+
# Description, except excludes PURL.
|
|
35
39
|
attribute? :description, RequestDescription.optional
|
|
40
|
+
# Same as a Identification, but requires a sourceId and doesn't permit a DOI.
|
|
36
41
|
attribute(:identification, RequestIdentification.default { RequestIdentification.new })
|
|
42
|
+
# Structural metadata
|
|
37
43
|
attribute? :structural, RequestDROStructural.optional
|
|
44
|
+
# Geographic metadata
|
|
38
45
|
attribute? :geographic, Geographic.optional
|
|
39
46
|
end
|
|
40
47
|
end
|
|
@@ -6,6 +6,7 @@ module Cocina
|
|
|
6
6
|
class RequestDROStructural < Struct
|
|
7
7
|
attribute :contains, Types::Strict::Array.of(RequestFileSet).default([].freeze)
|
|
8
8
|
attribute :hasMemberOrders, Types::Strict::Array.of(Sequence).default([].freeze)
|
|
9
|
+
# Collections that this DRO is a member of
|
|
9
10
|
attribute :isMemberOf, Types::Strict::Array.of(Druid).default([].freeze)
|
|
10
11
|
end
|
|
11
12
|
end
|
|
@@ -13,7 +13,8 @@ module Cocina
|
|
|
13
13
|
attribute? :size, Types::Strict::Integer
|
|
14
14
|
attribute :version, Types::Strict::Integer
|
|
15
15
|
attribute? :hasMimeType, Types::Strict::String
|
|
16
|
-
# BCP 47 language tag: https://www.rfc-editor.org/rfc/rfc4646.txt -- other applications
|
|
16
|
+
# BCP 47 language tag: https://www.rfc-editor.org/rfc/rfc4646.txt -- other applications
|
|
17
|
+
# (like media players) expect language codes of this format, see e.g. https://videojs.com/guides/text-tracks/#srclang
|
|
17
18
|
attribute? :languageTag, LanguageTag.optional
|
|
18
19
|
attribute? :externalIdentifier, Types::Strict::String
|
|
19
20
|
# Use for the File (e.g. "transcription" for OCR).
|
|
@@ -23,8 +24,10 @@ module Cocina
|
|
|
23
24
|
# Indicates if text that has been verified for accessibility/correctness.
|
|
24
25
|
attribute? :correctedForAccessibility, Types::Strict::Bool.default(false)
|
|
25
26
|
attribute :hasMessageDigests, Types::Strict::Array.of(MessageDigest).default([].freeze)
|
|
27
|
+
# Access metadata for files
|
|
26
28
|
attribute(:access, FileAccess.default { FileAccess.new })
|
|
27
29
|
attribute(:administrative, FileAdministrative.default { FileAdministrative.new })
|
|
30
|
+
# Presentation data for the File.
|
|
28
31
|
attribute? :presentation, Presentation.optional
|
|
29
32
|
end
|
|
30
33
|
end
|
|
@@ -21,6 +21,7 @@ module Cocina
|
|
|
21
21
|
attribute :type, Types::Strict::String.enum(*RequestFileSet::TYPES)
|
|
22
22
|
attribute :label, Types::Strict::String
|
|
23
23
|
attribute :version, Types::Strict::Integer
|
|
24
|
+
# Structural metadata
|
|
24
25
|
attribute(:structural, RequestFileSetStructural.default { RequestFileSetStructural.new })
|
|
25
26
|
end
|
|
26
27
|
end
|
|
@@ -7,7 +7,14 @@ module Cocina
|
|
|
7
7
|
# A barcode
|
|
8
8
|
attribute? :barcode, Barcode.optional
|
|
9
9
|
attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).default([].freeze)
|
|
10
|
-
# Unique identifier in some other system. This is because a large proportion of what
|
|
10
|
+
# Unique identifier in some other system. This is because a large proportion of what
|
|
11
|
+
# is deposited in SDR, historically and currently, are representations of objects that
|
|
12
|
+
# are also represented in other systems. For example, digitized paper and A/V collections
|
|
13
|
+
# have physical manifestations, and those physical objects are managed in systems that
|
|
14
|
+
# have their own identifiers. Similarly, books have barcodes, archival materials have
|
|
15
|
+
# collection numbers and physical locations, etc. The sourceId allows determining if
|
|
16
|
+
# an item has been deposited before and where to look for the original item if you're
|
|
17
|
+
# looking at its SDR representation. The format is: "namespace:identifier"
|
|
11
18
|
|
|
12
19
|
# example: sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026
|
|
13
20
|
attribute :sourceId, SourceId
|
|
@@ -4,6 +4,7 @@ module Cocina
|
|
|
4
4
|
module Models
|
|
5
5
|
# A sequence or ordering of resources within a Collection or Object.
|
|
6
6
|
class Sequence < Struct
|
|
7
|
+
# Identifiers for Members in their stated Order for the Sequence.
|
|
7
8
|
attribute :members, Types::Strict::Array.of(Types::Strict::String).default([].freeze)
|
|
8
9
|
# The direction that a sequence of canvases should be displayed to the user
|
|
9
10
|
attribute? :viewingDirection, Types::Strict::String.enum('right-to-left', 'left-to-right')
|
data/lib/cocina/models/source.rb
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Cocina
|
|
4
4
|
module Models
|
|
5
|
-
# Property model for indicating the vocabulary, authority, or other origin for a term,
|
|
5
|
+
# Property model for indicating the vocabulary, authority, or other origin for a term,
|
|
6
|
+
# code, or identifier.
|
|
6
7
|
class Source < Struct
|
|
7
8
|
# Code representing the value source.
|
|
8
9
|
attribute? :code, Types::Strict::String
|
|
@@ -10,6 +11,7 @@ module Cocina
|
|
|
10
11
|
attribute? :uri, Types::Strict::String
|
|
11
12
|
# String describing the value source.
|
|
12
13
|
attribute? :value, Types::Strict::String
|
|
14
|
+
# Other information related to the value source.
|
|
13
15
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
|
|
14
16
|
# The version of the value source.
|
|
15
17
|
attribute? :version, Types::Strict::String
|
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
module Cocina
|
|
4
4
|
module Models
|
|
5
|
+
# Unique identifier in some other system. This is because a large proportion of what
|
|
6
|
+
# is deposited in SDR, historically and currently, are representations of objects that
|
|
7
|
+
# are also represented in other systems. For example, digitized paper and A/V collections
|
|
8
|
+
# have physical manifestations, and those physical objects are managed in systems that
|
|
9
|
+
# have their own identifiers. Similarly, books have barcodes, archival materials have
|
|
10
|
+
# collection numbers and physical locations, etc. The sourceId allows determining if
|
|
11
|
+
# an item has been deposited before and where to look for the original item if you're
|
|
12
|
+
# looking at its SDR representation. The format is: "namespace:identifier"
|
|
13
|
+
|
|
14
|
+
# example: sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026
|
|
5
15
|
SourceId = Types::String.constrained(format: /^.+:.+$/)
|
|
6
16
|
end
|
|
7
17
|
end
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Cocina
|
|
4
4
|
module Models
|
|
5
|
-
# Property model for indicating the encoding, standard, or syntax to which a value
|
|
5
|
+
# Property model for indicating the encoding, standard, or syntax to which a value
|
|
6
|
+
# conforms (e.g. RDA).
|
|
6
7
|
class Standard < Struct
|
|
7
8
|
# Code representing the standard or encoding.
|
|
8
9
|
attribute? :code, Types::Strict::String
|
|
@@ -10,9 +11,12 @@ module Cocina
|
|
|
10
11
|
attribute? :uri, Types::Strict::String
|
|
11
12
|
# String describing the standard or encoding.
|
|
12
13
|
attribute? :value, Types::Strict::String
|
|
14
|
+
# Other information related to the standard or encoding.
|
|
13
15
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
|
|
14
16
|
# The version of the standard or encoding.
|
|
15
17
|
attribute? :version, Types::Strict::String
|
|
18
|
+
# Property model for indicating the vocabulary, authority, or other origin for a term,
|
|
19
|
+
# code, or identifier.
|
|
16
20
|
attribute? :source, Source.optional
|
|
17
21
|
end
|
|
18
22
|
end
|
|
@@ -7,7 +7,9 @@ module Cocina
|
|
|
7
7
|
# Catalog that is the source of the linked record.
|
|
8
8
|
# example: symphony
|
|
9
9
|
attribute :catalog, Types::Strict::String.enum('symphony', 'previous symphony')
|
|
10
|
-
# Only one of the catkeys should be designated for refreshing. This means that this
|
|
10
|
+
# Only one of the catkeys should be designated for refreshing. This means that this
|
|
11
|
+
# key is the one used to pull metadata from the catalog if there is more than one key
|
|
12
|
+
# present.
|
|
11
13
|
attribute :refresh, Types::Strict::Bool.default(false)
|
|
12
14
|
# Record identifier that is unique within the context of the linked record's catalog.
|
|
13
15
|
# example: 11403803
|
data/lib/cocina/models/title.rb
CHANGED
|
@@ -8,7 +8,8 @@ module Cocina
|
|
|
8
8
|
attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
|
|
9
9
|
# String or integer value of the descriptive element.
|
|
10
10
|
attribute? :value, Types::Nominal::Any
|
|
11
|
-
# Type of value provided by the descriptive element. See https://github.com/sul-dlss/cocina-models/blob/main/docs/description_types.md
|
|
11
|
+
# Type of value provided by the descriptive element. See https://github.com/sul-dlss/cocina-models/blob/main/docs/description_types.md
|
|
12
|
+
# for valid types.
|
|
12
13
|
attribute? :type, Types::Strict::String
|
|
13
14
|
# Status of the descriptive element value relative to other instances of the element.
|
|
14
15
|
attribute? :status, Types::Strict::String
|
|
@@ -16,15 +17,25 @@ module Cocina
|
|
|
16
17
|
attribute? :code, Types::Strict::String
|
|
17
18
|
# URI value of the descriptive element.
|
|
18
19
|
attribute? :uri, Types::Strict::String
|
|
20
|
+
# Property model for indicating the encoding, standard, or syntax to which a value
|
|
21
|
+
# conforms (e.g. RDA).
|
|
19
22
|
attribute? :standard, Standard.optional
|
|
23
|
+
# Property model for indicating the encoding, standard, or syntax to which a value
|
|
24
|
+
# conforms (e.g. RDA).
|
|
20
25
|
attribute? :encoding, Standard.optional
|
|
26
|
+
# Identifiers and URIs associated with the descriptive element.
|
|
21
27
|
attribute :identifier, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
|
|
28
|
+
# Property model for indicating the vocabulary, authority, or other origin for a term,
|
|
29
|
+
# code, or identifier.
|
|
22
30
|
attribute? :source, Source.optional
|
|
23
31
|
# The preferred display label to use for the descriptive element in access systems.
|
|
24
32
|
attribute? :displayLabel, Types::Strict::String
|
|
25
|
-
# A term providing information about the circumstances of the statement (e.g., approximate
|
|
33
|
+
# A term providing information about the circumstances of the statement (e.g., approximate
|
|
34
|
+
# dates).
|
|
26
35
|
attribute? :qualifier, Types::Strict::String
|
|
36
|
+
# Other information related to the descriptive element.
|
|
27
37
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
|
|
38
|
+
# Language of the descriptive element value
|
|
28
39
|
attribute? :valueLanguage, DescriptiveValueLanguage.optional
|
|
29
40
|
# URL or other pointer to the location of the value of the descriptive element.
|
|
30
41
|
attribute? :valueAt, Types::Strict::String
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
module Cocina
|
|
4
4
|
module Models
|
|
5
|
+
# The human readable use and reproduction statement that applies
|
|
6
|
+
# example: Property rights reside with the repository. Literary rights reside with
|
|
7
|
+
# the creators of the documents or their heirs. To obtain permission to publish or
|
|
8
|
+
# reproduce, please contact the Public Services Librarian of the Dept. of Special Collections
|
|
9
|
+
# (http://library.stanford.edu/spc).
|
|
5
10
|
UseAndReproductionStatement = Types::String
|
|
6
11
|
end
|
|
7
12
|
end
|
data/lib/cocina/models.rb
CHANGED
|
@@ -15,12 +15,16 @@ require 'thor'
|
|
|
15
15
|
class CocinaModelsInflector < Zeitwerk::Inflector
|
|
16
16
|
INFLECTIONS = {
|
|
17
17
|
'doi' => 'DOI',
|
|
18
|
+
'doi_exceptions' => 'DOIExceptions',
|
|
18
19
|
'dro' => 'DRO',
|
|
19
|
-
'request_dro' => 'RequestDRO',
|
|
20
20
|
'dro_access' => 'DROAccess',
|
|
21
21
|
'dro_lite' => 'DROLite',
|
|
22
22
|
'dro_structural' => 'DROStructural',
|
|
23
23
|
'dro_with_metadata' => 'DROWithMetadata',
|
|
24
|
+
'libraries_doi' => 'LibrariesDOI',
|
|
25
|
+
'preregistered_repository_doi' => 'PreregisteredRepositoryDOI',
|
|
26
|
+
'repository_doi' => 'RepositoryDOI',
|
|
27
|
+
'request_dro' => 'RequestDRO',
|
|
24
28
|
'request_dro_structural' => 'RequestDROStructural',
|
|
25
29
|
'rspec' => 'RSpec',
|
|
26
30
|
'value_uri' => 'ValueURI',
|
data/openapi.yml
CHANGED
|
@@ -521,8 +521,15 @@ components:
|
|
|
521
521
|
DOI:
|
|
522
522
|
description: Digital Object Identifier (https://www.doi.org)
|
|
523
523
|
oneOf:
|
|
524
|
-
- $ref: '#/components/schemas/
|
|
525
|
-
- $ref: '#/components/schemas/
|
|
524
|
+
- $ref: '#/components/schemas/RepositoryDOI'
|
|
525
|
+
- $ref: '#/components/schemas/PreregisteredRepositoryDOI'
|
|
526
|
+
- $ref: '#/components/schemas/LibrariesDOI'
|
|
527
|
+
- $ref: '#/components/schemas/DOIExceptions'
|
|
528
|
+
DOIExceptions:
|
|
529
|
+
type: string
|
|
530
|
+
description: "The DOI (Digital Object Identifier, https://www.doi.org) pattern for objects in SDR that do not adhere to any of the other DOI patterns in the spec. This is a short list of known exceptions only. Please note that DOIs are *not* case-sensitive, so we allow for uppercase and lowercase letters with these exceptions."
|
|
531
|
+
pattern: '^10\.25936\/[jJ][mM]709[hH][cC]8700|10\.18735\/4[nN][sS][eE]-8871|10\.18735\/952[xX]-[wW]447|10\.18735\/0[mM][wW]1-[qQ][qQ]72$'
|
|
532
|
+
example: '10.18735/0mw1-qq72'
|
|
526
533
|
DRO:
|
|
527
534
|
description: Domain-defined abstraction of a 'work'. Digital Repository Objects' abstraction is describable for our domain’s purposes, i.e. for management needs within our system.
|
|
528
535
|
type: object
|
|
@@ -938,17 +945,6 @@ components:
|
|
|
938
945
|
$ref: '#/components/schemas/Standard'
|
|
939
946
|
# description: An alphabet or other notation used to represent a
|
|
940
947
|
# language or other symbolic system of the descriptive element value.
|
|
941
|
-
DoiExceptions:
|
|
942
|
-
type: string
|
|
943
|
-
description: pre-existing Digital Object Identifiers (https://www.doi.org) not matching the pattern (case insensitive)
|
|
944
|
-
pattern: '^10\.(25740\/([vV][aA]90-[cC][tT]15|[sS][yY][xX][aA]-[mM]256|12[qQ][fF]-5243|65[jJ]8-6114)|25936\/629[tT]-[bB][xX]79)$'
|
|
945
|
-
example: '10.25740/12qF-5243'
|
|
946
|
-
DoiPattern:
|
|
947
|
-
type: string
|
|
948
|
-
description: Digital Object Identifier (https://www.doi.org) regex pattern
|
|
949
|
-
# The prod and test prefixes are permitted
|
|
950
|
-
pattern: '^10\.(25740|80343)\/[b-df-hjkmnp-tv-z]{2}[0-9]{3}[b-df-hjkmnp-tv-z]{2}[0-9]{4}$'
|
|
951
|
-
example: '10.25740/bc123df4567'
|
|
952
948
|
Druid:
|
|
953
949
|
type: string
|
|
954
950
|
pattern: '^druid:[b-df-hjkmnp-tv-z]{2}[0-9]{3}[b-df-hjkmnp-tv-z]{2}[0-9]{4}$'
|
|
@@ -1293,6 +1289,11 @@ components:
|
|
|
1293
1289
|
description: "BCP 47 language tag: https://www.rfc-editor.org/rfc/rfc4646.txt -- other applications (like media players) expect language codes of this format, see e.g. https://videojs.com/guides/text-tracks/#srclang"
|
|
1294
1290
|
type: string
|
|
1295
1291
|
nullable: true
|
|
1292
|
+
LibrariesDOI:
|
|
1293
|
+
type: string
|
|
1294
|
+
description: 'The DOI (Digital Object Identifier, https://www.doi.org) pattern for works registered by Stanford Libraries outside of SDR workflows. Please note that DOIs are *not* case-sensitive so both cases of letters should be permitted.'
|
|
1295
|
+
pattern: '^10\.25936\/[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}$'
|
|
1296
|
+
example: '10.25936/629T-bx79'
|
|
1296
1297
|
License:
|
|
1297
1298
|
description: The license governing reuse of the DRO. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
|
|
1298
1299
|
type: string
|
|
@@ -1440,6 +1441,11 @@ components:
|
|
|
1440
1441
|
type: string
|
|
1441
1442
|
required:
|
|
1442
1443
|
- lock
|
|
1444
|
+
PreregisteredRepositoryDOI:
|
|
1445
|
+
type: string
|
|
1446
|
+
description: 'The DOI (Digital Object Identifier, https://www.doi.org) pattern for DOIs registered before an SDR object has been registered---i.e., before it has a druid, which is a common pattern as of 2025. Please note that DOIs are *not* case-sensitive so both cases of letters should be permitted.'
|
|
1447
|
+
pattern: '^10\.(25740|80343)\/[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}$'
|
|
1448
|
+
example: '10.80343/12qF-5243'
|
|
1443
1449
|
Presentation:
|
|
1444
1450
|
description: Presentation data for the File.
|
|
1445
1451
|
type: object
|
|
@@ -1577,6 +1583,11 @@ components:
|
|
|
1577
1583
|
valueAt:
|
|
1578
1584
|
description: URL or other pointer to the location of the related resource information.
|
|
1579
1585
|
type: string
|
|
1586
|
+
RepositoryDOI:
|
|
1587
|
+
type: string
|
|
1588
|
+
description: "The DOI (Digital Object Identifier, https://www.doi.org) pattern for SDR objects, based on the object's repository identifier. Permits both production and text prefixes to be used to account for objects in different SDR environments. Please note that while DOIs are *not* case-sensitive, we constrain the DOIs we mint for SDR to lowercase for consistency."
|
|
1589
|
+
pattern: '^10\.(25740|80343)\/[b-df-hjkmnp-tv-z]{2}[0-9]{3}[b-df-hjkmnp-tv-z]{2}[0-9]{4}$'
|
|
1590
|
+
example: '10.25740/bc123df4567'
|
|
1580
1591
|
RequestAdminPolicy:
|
|
1581
1592
|
description: Same as an AdminPolicy, but doesn't have an externalIdentifier as one will be created
|
|
1582
1593
|
type: object
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cocina-models
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.108.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin Coyne
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: activesupport
|
|
@@ -386,7 +386,6 @@ files:
|
|
|
386
386
|
- lib/cocina/models/descriptive_value_language.rb
|
|
387
387
|
- lib/cocina/models/doi.rb
|
|
388
388
|
- lib/cocina/models/doi_exceptions.rb
|
|
389
|
-
- lib/cocina/models/doi_pattern.rb
|
|
390
389
|
- lib/cocina/models/dro.rb
|
|
391
390
|
- lib/cocina/models/dro_access.rb
|
|
392
391
|
- lib/cocina/models/dro_lite.rb
|
|
@@ -408,6 +407,7 @@ files:
|
|
|
408
407
|
- lib/cocina/models/lane_medical_barcode.rb
|
|
409
408
|
- lib/cocina/models/language.rb
|
|
410
409
|
- lib/cocina/models/language_tag.rb
|
|
410
|
+
- lib/cocina/models/libraries_doi.rb
|
|
411
411
|
- lib/cocina/models/license.rb
|
|
412
412
|
- lib/cocina/models/location_based_access.rb
|
|
413
413
|
- lib/cocina/models/location_based_download_access.rb
|
|
@@ -474,9 +474,11 @@ files:
|
|
|
474
474
|
- lib/cocina/models/migrated_from_voyager_identifier.rb
|
|
475
475
|
- lib/cocina/models/object_metadata.rb
|
|
476
476
|
- lib/cocina/models/object_type.rb
|
|
477
|
+
- lib/cocina/models/preregistered_repository_doi.rb
|
|
477
478
|
- lib/cocina/models/presentation.rb
|
|
478
479
|
- lib/cocina/models/purl.rb
|
|
479
480
|
- lib/cocina/models/related_resource.rb
|
|
481
|
+
- lib/cocina/models/repository_doi.rb
|
|
480
482
|
- lib/cocina/models/request_admin_policy.rb
|
|
481
483
|
- lib/cocina/models/request_administrative.rb
|
|
482
484
|
- lib/cocina/models/request_collection.rb
|
|
@@ -535,7 +537,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
535
537
|
- !ruby/object:Gem::Version
|
|
536
538
|
version: '0'
|
|
537
539
|
requirements: []
|
|
538
|
-
rubygems_version: 3.
|
|
540
|
+
rubygems_version: 3.7.2
|
|
539
541
|
specification_version: 4
|
|
540
542
|
summary: Data models for the SDR
|
|
541
543
|
test_files: []
|