cocina-models 0.107.0 → 0.108.0

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.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +2 -0
  3. data/Gemfile +1 -1
  4. data/Gemfile.lock +40 -18
  5. data/README.md +7 -31
  6. data/description_types.yml +2 -0
  7. data/docs/description_types.md +2 -0
  8. data/lib/cocina/generator/datatype.rb +1 -1
  9. data/lib/cocina/generator/generator.rb +1 -0
  10. data/lib/cocina/generator/schema_array.rb +1 -1
  11. data/lib/cocina/generator/schema_base.rb +10 -2
  12. data/lib/cocina/generator/schema_ref.rb +2 -2
  13. data/lib/cocina/generator/union_type.rb +1 -1
  14. data/lib/cocina/generator/vocab.rb +6 -5
  15. data/lib/cocina/models/access_role.rb +1 -0
  16. data/lib/cocina/models/admin_policy.rb +1 -0
  17. data/lib/cocina/models/admin_policy_access_template.rb +9 -3
  18. data/lib/cocina/models/admin_policy_administrative.rb +10 -1
  19. data/lib/cocina/models/admin_policy_lite.rb +3 -0
  20. data/lib/cocina/models/admin_policy_with_metadata.rb +1 -0
  21. data/lib/cocina/models/applies_to.rb +2 -1
  22. data/lib/cocina/models/barcode.rb +1 -0
  23. data/lib/cocina/models/business_barcode.rb +2 -0
  24. data/lib/cocina/models/catalog_link.rb +1 -0
  25. data/lib/cocina/models/catkey_barcode.rb +3 -0
  26. data/lib/cocina/models/citation_only_access.rb +2 -1
  27. data/lib/cocina/models/cocina_version.rb +2 -0
  28. data/lib/cocina/models/collection.rb +3 -1
  29. data/lib/cocina/models/collection_access.rb +6 -2
  30. data/lib/cocina/models/collection_identification.rb +8 -1
  31. data/lib/cocina/models/collection_lite.rb +7 -1
  32. data/lib/cocina/models/collection_with_metadata.rb +1 -0
  33. data/lib/cocina/models/contributor.rb +13 -3
  34. data/lib/cocina/models/copyright.rb +2 -0
  35. data/lib/cocina/models/created_in_folio_identifier.rb +2 -0
  36. data/lib/cocina/models/description.rb +14 -0
  37. data/lib/cocina/models/descriptive_access_metadata.rb +7 -0
  38. data/lib/cocina/models/descriptive_admin_metadata.rb +6 -0
  39. data/lib/cocina/models/descriptive_basic_value.rb +15 -3
  40. data/lib/cocina/models/descriptive_geographic_metadata.rb +1 -0
  41. data/lib/cocina/models/descriptive_grouped_value.rb +2 -1
  42. data/lib/cocina/models/descriptive_parallel_contributor.rb +11 -3
  43. data/lib/cocina/models/descriptive_parallel_event.rb +8 -1
  44. data/lib/cocina/models/descriptive_parallel_value.rb +2 -1
  45. data/lib/cocina/models/descriptive_value.rb +13 -2
  46. data/lib/cocina/models/descriptive_value_language.rb +5 -0
  47. data/lib/cocina/models/doi.rb +2 -1
  48. data/lib/cocina/models/doi_exceptions.rb +6 -1
  49. data/lib/cocina/models/dro.rb +4 -1
  50. data/lib/cocina/models/dro_access.rb +6 -2
  51. data/lib/cocina/models/dro_lite.rb +10 -1
  52. data/lib/cocina/models/dro_structural.rb +4 -0
  53. data/lib/cocina/models/dro_with_metadata.rb +2 -0
  54. data/lib/cocina/models/druid.rb +1 -0
  55. data/lib/cocina/models/embargo.rb +4 -1
  56. data/lib/cocina/models/event.rb +8 -0
  57. data/lib/cocina/models/file.rb +8 -3
  58. data/lib/cocina/models/file_set.rb +1 -0
  59. data/lib/cocina/models/file_use.rb +1 -0
  60. data/lib/cocina/models/folio_catalog_link.rb +3 -1
  61. data/lib/cocina/models/identification.rb +8 -1
  62. data/lib/cocina/models/lane_medical_barcode.rb +2 -0
  63. data/lib/cocina/models/language.rb +22 -3
  64. data/lib/cocina/models/language_tag.rb +2 -0
  65. data/lib/cocina/models/libraries_doi.rb +11 -0
  66. data/lib/cocina/models/license.rb +2 -0
  67. data/lib/cocina/models/mapping/to_mods/name_writer.rb +1 -1
  68. data/lib/cocina/models/migrated_from_symphony_identifier.rb +2 -0
  69. data/lib/cocina/models/migrated_from_voyager_identifier.rb +2 -0
  70. data/lib/cocina/models/preregistered_repository_doi.rb +12 -0
  71. data/lib/cocina/models/purl.rb +1 -0
  72. data/lib/cocina/models/related_resource.rb +17 -1
  73. data/lib/cocina/models/repository_doi.rb +13 -0
  74. data/lib/cocina/models/request_admin_policy.rb +3 -0
  75. data/lib/cocina/models/request_administrative.rb +2 -1
  76. data/lib/cocina/models/request_collection.rb +3 -0
  77. data/lib/cocina/models/request_description.rb +16 -1
  78. data/lib/cocina/models/request_dro.rb +8 -1
  79. data/lib/cocina/models/request_dro_structural.rb +1 -0
  80. data/lib/cocina/models/request_file.rb +4 -1
  81. data/lib/cocina/models/request_file_set.rb +1 -0
  82. data/lib/cocina/models/request_identification.rb +8 -1
  83. data/lib/cocina/models/sequence.rb +1 -0
  84. data/lib/cocina/models/source.rb +3 -1
  85. data/lib/cocina/models/source_id.rb +10 -0
  86. data/lib/cocina/models/standard.rb +5 -1
  87. data/lib/cocina/models/standard_barcode.rb +2 -0
  88. data/lib/cocina/models/symphony_catalog_link.rb +3 -1
  89. data/lib/cocina/models/title.rb +13 -2
  90. data/lib/cocina/models/use_and_reproduction_statement.rb +5 -0
  91. data/lib/cocina/models/version.rb +1 -1
  92. data/lib/cocina/models.rb +5 -1
  93. data/openapi.yml +24 -13
  94. metadata +4 -2
  95. data/lib/cocina/models/doi_pattern.rb +0 -7
@@ -2,19 +2,29 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- # Property model for describing agents contributing in some way to the creation and history of the resource.
5
+ # Property model for describing agents contributing in some way to the creation and
6
+ # history of the resource.
6
7
  class Contributor < Struct
8
+ # Names associated with a contributor.
7
9
  attribute :name, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
8
- # 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.
10
+ # Entity type of the contributor (person, organization, etc.). See https://github.com/sul-dlss/cocina-models/blob/main/docs/description_types.md
11
+ # for valid types.
9
12
  attribute? :type, Types::Strict::String
10
- # Status of the contributor relative to other parallel contributors (e.g. the primary author among a group of contributors).
13
+ # Status of the contributor relative to other parallel contributors (e.g. the primary
14
+ # author among a group of contributors).
11
15
  attribute? :status, Types::Strict::String
16
+ # Relationships of the contributor to the resource or to an event in its history.
12
17
  attribute :role, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
18
+ # Identifiers and URIs associated with the contributor entity.
13
19
  attribute :identifier, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
20
+ # Institutional or other affiliation associated with a contributor.
14
21
  attribute :affiliation, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
22
+ # Other information associated with the contributor.
15
23
  attribute :note, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
16
24
  # URL or other pointer to the location of the contributor information.
17
25
  attribute? :valueAt, Types::Strict::String
26
+ # For multiple representations of information about the same contributor (e.g. in different
27
+ # languages).
18
28
  attribute :parallelContributor, Types::Strict::Array.of(DescriptiveParallelContributor).default([].freeze)
19
29
  end
20
30
  end
@@ -2,6 +2,8 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
+ # The human readable copyright statement that applies
6
+ # example: Copyright World Trade Organization
5
7
  Copyright = Types::String
6
8
  end
7
9
  end
@@ -2,6 +2,8 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
+ # A record identifier created in Folio
6
+ # example: in11403803
5
7
  CreatedInFolioIdentifier = Types::String.constrained(format: /^in\d+$/)
6
8
  end
7
9
  end
@@ -5,18 +5,32 @@ module Cocina
5
5
  class Description < Struct
6
6
  include Validatable
7
7
 
8
+ # Titles of the resource.
8
9
  attribute :title, Types::Strict::Array.of(Title).default([].freeze)
10
+ # Agents contributing in some way to the creation and history of the resource.
9
11
  attribute :contributor, Types::Strict::Array.of(Contributor).default([].freeze)
12
+ # Events in the history of the resource.
10
13
  attribute :event, Types::Strict::Array.of(Event).default([].freeze)
14
+ # Characteristics of the resource's physical, digital, and intellectual form and genre,
15
+ # and of its process of creation.
11
16
  attribute :form, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
17
+ # Geographic description for items with coordinates or bounding boxes.
12
18
  attribute :geographic, Types::Strict::Array.of(DescriptiveGeographicMetadata).default([].freeze)
19
+ # Languages, scripts, symbolic systems, and notations used in all or part of a resource.
13
20
  attribute :language, Types::Strict::Array.of(Language).default([].freeze)
21
+ # Additional information relevant to a resource.
14
22
  attribute :note, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
23
+ # Identifiers and URIs associated with the resource.
15
24
  attribute :identifier, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
25
+ # Terms associated with the intellectual content of the resource.
16
26
  attribute :subject, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
27
+ # Information about how to access digital and physical versions of the object.
17
28
  attribute? :access, DescriptiveAccessMetadata.optional
29
+ # Other resources associated with the described resource.
18
30
  attribute :relatedResource, Types::Strict::Array.of(RelatedResource).default([].freeze)
31
+ # Data about the resource represented in MARC fixed fields and codes.
19
32
  attribute :marcEncodedData, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
33
+ # Information about this resource description.
20
34
  attribute? :adminMetadata, DescriptiveAdminMetadata.optional
21
35
  # URL or other pointer to the location of the resource description.
22
36
  attribute? :valueAt, Types::Strict::String
@@ -4,11 +4,18 @@ module Cocina
4
4
  module Models
5
5
  # Information about how to access digital and physical versions of the object.
6
6
  class DescriptiveAccessMetadata < Struct
7
+ # URLs where the resource may be accessed in full or part.
7
8
  attribute :url, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
9
+ # Location of a physical version of the resource.
8
10
  attribute :physicalLocation, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
11
+ # Location of a digital version of the resource, such as a file path for a born digital
12
+ # resource.
9
13
  attribute :digitalLocation, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
14
+ # The library, organization, or person responsible for access to the resource.
10
15
  attribute :accessContact, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
16
+ # The digital repositories that hold the resource.
11
17
  attribute :digitalRepository, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
18
+ # Other information related to accessing the resource.
12
19
  attribute :note, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
13
20
  end
14
21
  end
@@ -4,11 +4,17 @@ module Cocina
4
4
  module Models
5
5
  # Information about this resource description.
6
6
  class DescriptiveAdminMetadata < Struct
7
+ # Contributors to this resource description.
7
8
  attribute :contributor, Types::Strict::Array.of(Contributor).default([].freeze)
9
+ # Events in the history of this resource description.
8
10
  attribute :event, Types::Strict::Array.of(Event).default([].freeze)
11
+ # Languages, scripts, symbolic systems, and notations used in this resource description.
9
12
  attribute :language, Types::Strict::Array.of(Language).default([].freeze)
13
+ # Other information related to this resource description.
10
14
  attribute :note, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
15
+ # Descriptive or content standard(s) to which this resource description conforms.
11
16
  attribute :metadataStandard, Types::Strict::Array.of(Standard).default([].freeze)
17
+ # Identifiers associated with this resource description.
12
18
  attribute :identifier, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
13
19
  end
14
20
  end
@@ -2,14 +2,16 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- # Basic value model for descriptive elements. Can only have one of value, parallelValue, groupedValue, or structuredValue.
5
+ # Basic value model for descriptive elements. Can only have one of value, parallelValue,
6
+ # groupedValue, or structuredValue.
6
7
  class DescriptiveBasicValue < Struct
7
8
  attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
8
9
  attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
9
10
  attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
10
11
  # String or integer value of the descriptive element.
11
12
  attribute? :value, Types::Nominal::Any
12
- # 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.
13
+ # Type of value provided by the descriptive element. See https://github.com/sul-dlss/cocina-models/blob/main/docs/description_types.md
14
+ # for valid types.
13
15
  attribute? :type, Types::Strict::String
14
16
  # Status of the descriptive element value relative to other instances of the element.
15
17
  attribute? :status, Types::Strict::String
@@ -17,15 +19,25 @@ module Cocina
17
19
  attribute? :code, Types::Strict::String
18
20
  # URI value of the descriptive element.
19
21
  attribute? :uri, Types::Strict::String
22
+ # Property model for indicating the encoding, standard, or syntax to which a value
23
+ # conforms (e.g. RDA).
20
24
  attribute? :standard, Standard.optional
25
+ # Property model for indicating the encoding, standard, or syntax to which a value
26
+ # conforms (e.g. RDA).
21
27
  attribute? :encoding, Standard.optional
28
+ # Identifiers and URIs associated with the descriptive element.
22
29
  attribute :identifier, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
30
+ # Property model for indicating the vocabulary, authority, or other origin for a term,
31
+ # code, or identifier.
23
32
  attribute? :source, Source.optional
24
33
  # The preferred display label to use for the descriptive element in access systems.
25
34
  attribute? :displayLabel, Types::Strict::String
26
- # A term providing information about the circumstances of the statement (e.g., approximate dates).
35
+ # A term providing information about the circumstances of the statement (e.g., approximate
36
+ # dates).
27
37
  attribute? :qualifier, Types::Strict::String
38
+ # Other information related to the descriptive element.
28
39
  attribute :note, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
40
+ # Language of the descriptive element value
29
41
  attribute? :valueLanguage, DescriptiveValueLanguage.optional
30
42
  # URL or other pointer to the location of the value of the descriptive element.
31
43
  attribute? :valueAt, Types::Strict::String
@@ -5,6 +5,7 @@ module Cocina
5
5
  # Value model for mods geographic extension metadata
6
6
  class DescriptiveGeographicMetadata < Struct
7
7
  attribute :form, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
8
+ # Terms associated with the intellectual content of the related resource.
8
9
  attribute :subject, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
9
10
  end
10
11
  end
@@ -2,7 +2,8 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- # Value model for a set of descriptive elements grouped together in an unstructured way.
5
+ # Value model for a set of descriptive elements grouped together in an unstructured
6
+ # way.
6
7
  class DescriptiveGroupedValue < Struct
7
8
  attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
8
9
  end
@@ -3,18 +3,26 @@
3
3
  module Cocina
4
4
  module Models
5
5
  # DEPRECATED
6
- # Value model for multiple representations of information about the same contributor (e.g. in different languages).
6
+ # Value model for multiple representations of information about the same contributor
7
+ # (e.g. in different languages).
7
8
  class DescriptiveParallelContributor < Struct
9
+ # Names associated with a contributor.
8
10
  attribute :name, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
9
- # 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.
11
+ # Entity type of the contributor (person, organization, etc.). See https://github.com/sul-dlss/cocina-models/blob/main/docs/description_types.md
12
+ # for valid types.
10
13
  attribute? :type, Types::Strict::String
11
- # Status of the contributor relative to other parallel contributors (e.g. the primary author among a group of contributors).
14
+ # Status of the contributor relative to other parallel contributors (e.g. the primary
15
+ # author among a group of contributors).
12
16
  attribute? :status, Types::Strict::String
17
+ # Relationships of the contributor to the resource or to an event in its history.
13
18
  attribute :role, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
19
+ # Identifiers and URIs associated with the contributor entity.
14
20
  attribute :identifier, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
21
+ # Other information associated with the contributor.
15
22
  attribute :note, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
16
23
  # URL or other pointer to the location of the contributor information.
17
24
  attribute? :valueAt, Types::Strict::String
25
+ # Language of the descriptive element value
18
26
  attribute? :valueLanguage, DescriptiveValueLanguage.optional
19
27
  end
20
28
  end
@@ -2,18 +2,25 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- # Value model for multiple representations of information about the same event (e.g. in different languages).
5
+ # Value model for multiple representations of information about the same event (e.g.
6
+ # in different languages).
6
7
  class DescriptiveParallelEvent < Struct
7
8
  attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
8
9
  # Description of the event (creation, publication, etc.).
9
10
  attribute? :type, Types::Strict::String
10
11
  # The preferred display label to use for the event in access systems.
11
12
  attribute? :displayLabel, Types::Strict::String
13
+ # Dates associated with the event.
12
14
  attribute :date, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
15
+ # Contributors associated with the event.
13
16
  attribute :contributor, Types::Strict::Array.of(Contributor).default([].freeze)
17
+ # Locations associated with the event.
14
18
  attribute :location, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
19
+ # Identifiers and URIs associated with the event.
15
20
  attribute :identifier, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
21
+ # Other information about the event.
16
22
  attribute :note, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
23
+ # Language of the descriptive element value
17
24
  attribute? :valueLanguage, DescriptiveValueLanguage.optional
18
25
  end
19
26
  end
@@ -2,7 +2,8 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- # Value model for multiple representations of the same information (e.g. in different languages).
5
+ # Value model for multiple representations of the same information (e.g. in different
6
+ # languages).
6
7
  class DescriptiveParallelValue < Struct
7
8
  attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
8
9
  end
@@ -9,7 +9,8 @@ module Cocina
9
9
  attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
10
10
  # String or integer value of the descriptive element.
11
11
  attribute? :value, Types::Nominal::Any
12
- # 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.
12
+ # Type of value provided by the descriptive element. See https://github.com/sul-dlss/cocina-models/blob/main/docs/description_types.md
13
+ # for valid types.
13
14
  attribute? :type, Types::Strict::String
14
15
  # Status of the descriptive element value relative to other instances of the element.
15
16
  attribute? :status, Types::Strict::String
@@ -17,15 +18,25 @@ module Cocina
17
18
  attribute? :code, Types::Strict::String
18
19
  # URI value of the descriptive element.
19
20
  attribute? :uri, Types::Strict::String
21
+ # Property model for indicating the encoding, standard, or syntax to which a value
22
+ # conforms (e.g. RDA).
20
23
  attribute? :standard, Standard.optional
24
+ # Property model for indicating the encoding, standard, or syntax to which a value
25
+ # conforms (e.g. RDA).
21
26
  attribute? :encoding, Standard.optional
27
+ # Identifiers and URIs associated with the descriptive element.
22
28
  attribute :identifier, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
29
+ # Property model for indicating the vocabulary, authority, or other origin for a term,
30
+ # code, or identifier.
23
31
  attribute? :source, Source.optional
24
32
  # The preferred display label to use for the descriptive element in access systems.
25
33
  attribute? :displayLabel, Types::Strict::String
26
- # A term providing information about the circumstances of the statement (e.g., approximate dates).
34
+ # A term providing information about the circumstances of the statement (e.g., approximate
35
+ # dates).
27
36
  attribute? :qualifier, Types::Strict::String
37
+ # Other information related to the descriptive element.
28
38
  attribute :note, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
39
+ # Language of the descriptive element value
29
40
  attribute? :valueLanguage, DescriptiveValueLanguage.optional
30
41
  # URL or other pointer to the location of the value of the descriptive element.
31
42
  attribute? :valueAt, Types::Strict::String
@@ -10,10 +10,15 @@ module Cocina
10
10
  attribute? :uri, Types::Strict::String
11
11
  # String describing the standard or encoding.
12
12
  attribute? :value, Types::Strict::String
13
+ # Other information related to the standard or encoding.
13
14
  attribute :note, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
14
15
  # The version of the standard or encoding.
15
16
  attribute? :version, Types::Strict::String
17
+ # Property model for indicating the vocabulary, authority, or other origin for a term,
18
+ # code, or identifier.
16
19
  attribute? :source, Source.optional
20
+ # Property model for indicating the encoding, standard, or syntax to which a value
21
+ # conforms (e.g. RDA).
17
22
  attribute? :valueScript, Standard.optional
18
23
  end
19
24
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- DOI = DoiPattern | DoiExceptions
5
+ # Digital Object Identifier (https://www.doi.org)
6
+ DOI = RepositoryDOI | PreregisteredRepositoryDOI | LibrariesDOI | DOIExceptions
6
7
  end
7
8
  end
@@ -2,6 +2,11 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- DoiExceptions = Types::String.constrained(format: %r{^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)$})
5
+ # The DOI (Digital Object Identifier, https://www.doi.org) pattern for objects in SDR
6
+ # that do not adhere to any of the other DOI patterns in the spec. This is a short
7
+ # list of known exceptions only. Please note that DOIs are *not* case-sensitive, so
8
+ # we allow for uppercase and lowercase letters with these exceptions.
9
+ # example: 10.18735/0mw1-qq72
10
+ DOIExceptions = Types::String.constrained(format: %r{^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$})
6
11
  end
7
12
  end
@@ -2,7 +2,8 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- # 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.
5
+ # Domain-defined abstraction of a 'work'. Digital Repository Objects' abstraction is
6
+ # describable for our domain’s purposes, i.e. for management needs within our system.
6
7
  class DRO < Struct
7
8
  include Validatable
8
9
 
@@ -39,7 +40,9 @@ module Cocina
39
40
  attribute(:administrative, Administrative.default { Administrative.new })
40
41
  attribute(:description, Description.default { Description.new })
41
42
  attribute(:identification, Identification.default { Identification.new })
43
+ # Structural metadata
42
44
  attribute(:structural, DROStructural.default { DROStructural.new })
45
+ # Geographic metadata
43
46
  attribute? :geographic, Geographic.optional
44
47
  end
45
48
  end
@@ -19,9 +19,13 @@ module Cocina
19
19
  attribute? :copyright, Copyright.optional
20
20
  attribute? :embargo, Embargo.optional
21
21
  # The human readable use and reproduction statement that applies
22
- # example: Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Public Services Librarian of the Dept. of Special Collections (http://library.stanford.edu/spc).
22
+ # example: Property rights reside with the repository. Literary rights reside with
23
+ # the creators of the documents or their heirs. To obtain permission to publish or
24
+ # reproduce, please contact the Public Services Librarian of the Dept. of Special Collections
25
+ # (http://library.stanford.edu/spc).
23
26
  attribute? :useAndReproductionStatement, UseAndReproductionStatement.optional
24
- # The license governing reuse of the DRO. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
27
+ # The license governing reuse of the DRO. Should be an IRI for known licenses (i.e.
28
+ # CC, RightsStatement.org URI, etc.).
25
29
  attribute? :license, License.optional.enum('https://www.gnu.org/licenses/agpl.txt', 'https://www.apache.org/licenses/LICENSE-2.0', 'https://opensource.org/licenses/BSD-2-Clause', 'https://opensource.org/licenses/BSD-3-Clause', 'https://creativecommons.org/licenses/by/4.0/legalcode', 'https://creativecommons.org/licenses/by-nc/4.0/legalcode', 'https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode', 'https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode', 'https://creativecommons.org/licenses/by-nd/4.0/legalcode', 'https://creativecommons.org/licenses/by-sa/4.0/legalcode', 'https://creativecommons.org/publicdomain/zero/1.0/legalcode', 'https://opensource.org/licenses/cddl1', 'https://www.eclipse.org/legal/epl-2.0', 'https://www.gnu.org/licenses/gpl-3.0-standalone.html', 'https://www.isc.org/downloads/software-support-policy/isc-license/', 'https://www.gnu.org/licenses/lgpl-3.0-standalone.html', 'https://opensource.org/licenses/MIT', 'https://www.mozilla.org/MPL/2.0/', 'https://opendatacommons.org/licenses/by/1-0/', 'http://opendatacommons.org/licenses/odbl/1.0/', 'https://opendatacommons.org/licenses/odbl/1-0/', 'https://creativecommons.org/publicdomain/mark/1.0/', 'https://opendatacommons.org/licenses/pddl/1-0/', 'https://creativecommons.org/licenses/by/3.0/legalcode', 'https://creativecommons.org/licenses/by-sa/3.0/legalcode', 'https://creativecommons.org/licenses/by-nd/3.0/legalcode', 'https://creativecommons.org/licenses/by-nc/3.0/legalcode', 'https://creativecommons.org/licenses/by-nc-sa/3.0/legalcode', 'https://creativecommons.org/licenses/by-nc-nd/3.0/legalcode', 'https://cocina.sul.stanford.edu/licenses/none')
26
30
  end
27
31
  end
@@ -2,7 +2,8 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- # 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.
5
+ # Domain-defined abstraction of a 'work'. Digital Repository Objects' abstraction is
6
+ # describable for our domain’s purposes, i.e. for management needs within our system.
6
7
  class DROLite < Struct
7
8
  include Checkable
8
9
 
@@ -33,11 +34,19 @@ module Cocina
33
34
  attribute :label, Types::Strict::String
34
35
  # Version for the DRO within SDR.
35
36
  attribute :version, Types::Strict::Integer
37
+ # Validation of this property is relaxed. See the openapi for full validation.
36
38
  attribute? :access, DROAccess.optional
39
+ # Validation of this property is relaxed. See the openapi for full validation.
37
40
  attribute? :administrative, Administrative.optional
41
+ # Validation of this property is relaxed. See the openapi for full validation.
38
42
  attribute? :description, Description.optional
43
+ # Validation of this property is relaxed. See the openapi for full validation.
39
44
  attribute? :identification, Identification.optional
45
+ # Structural metadata
46
+ # Validation of this property is relaxed. See the openapi for full validation.
40
47
  attribute? :structural, DROStructural.optional
48
+ # Geographic metadata
49
+ # Validation of this property is relaxed. See the openapi for full validation.
41
50
  attribute? :geographic, Geographic.optional
42
51
  end
43
52
  end
@@ -4,8 +4,12 @@ module Cocina
4
4
  module Models
5
5
  # Structural metadata
6
6
  class DROStructural < Struct
7
+ # Filesets that contain the digital representations (Files)
7
8
  attribute :contains, Types::Strict::Array.of(FileSet).default([].freeze)
9
+ # Provided sequences or orderings of members, including some metadata about each sequence
10
+ # (i.e. sequence label, sequence type, if the sequence is primary, etc.).
8
11
  attribute :hasMemberOrders, Types::Strict::Array.of(Sequence).default([].freeze)
12
+ # Collections that this DRO is a member of
9
13
  attribute :isMemberOf, Types::Strict::Array.of(Druid).default([].freeze)
10
14
  end
11
15
  end
@@ -39,7 +39,9 @@ module Cocina
39
39
  attribute(:administrative, Administrative.default { Administrative.new })
40
40
  attribute(:description, Description.default { Description.new })
41
41
  attribute(:identification, Identification.default { Identification.new })
42
+ # Structural metadata
42
43
  attribute(:structural, DROStructural.default { DROStructural.new })
44
+ # Geographic metadata
43
45
  attribute? :geographic, Geographic.optional
44
46
  # When the object was created.
45
47
  attribute? :created, Types::Params::DateTime
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
+ # example: druid:bc123df4567
5
6
  Druid = Types::String.constrained(format: /^druid:[b-df-hjkmnp-tv-z]{2}[0-9]{3}[b-df-hjkmnp-tv-z]{2}[0-9]{4}$/)
6
7
  end
7
8
  end
@@ -18,7 +18,10 @@ module Cocina
18
18
  # example: 2029-06-22T07:00:00.000+00:00
19
19
  attribute :releaseDate, Types::Params::DateTime
20
20
  # The human readable use and reproduction statement that applies
21
- # example: Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Public Services Librarian of the Dept. of Special Collections (http://library.stanford.edu/spc).
21
+ # example: Property rights reside with the repository. Literary rights reside with
22
+ # the creators of the documents or their heirs. To obtain permission to publish or
23
+ # reproduce, please contact the Public Services Librarian of the Dept. of Special Collections
24
+ # (http://library.stanford.edu/spc).
22
25
  attribute? :useAndReproductionStatement, UseAndReproductionStatement.optional
23
26
  end
24
27
  end
@@ -9,12 +9,20 @@ module Cocina
9
9
  attribute? :type, Types::Strict::String
10
10
  # The preferred display label to use for the event in access systems.
11
11
  attribute? :displayLabel, Types::Strict::String
12
+ # Dates associated with the event.
12
13
  attribute :date, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
14
+ # Contributors associated with the event.
13
15
  attribute :contributor, Types::Strict::Array.of(Contributor).default([].freeze)
16
+ # Locations associated with the event.
14
17
  attribute :location, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
18
+ # Identifiers and URIs associated with the event.
15
19
  attribute :identifier, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
20
+ # Other information about the event.
16
21
  attribute :note, Types::Strict::Array.of(DescriptiveValue).default([].freeze)
22
+ # Language of the descriptive element value
17
23
  attribute? :valueLanguage, DescriptiveValueLanguage.optional
24
+ # For multiple representations of information about the same event (e.g. in different
25
+ # languages)
18
26
  attribute :parallelEvent, Types::Strict::Array.of(DescriptiveParallelEvent).default([].freeze)
19
27
  end
20
28
  end
@@ -2,7 +2,8 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- # 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.
5
+ # Binaries that are the basis of what our domain manages. Binaries here do not include
6
+ # metadata files generated for the domain's own management purposes.
6
7
  class File < Struct
7
8
  include Checkable
8
9
 
@@ -10,7 +11,8 @@ module Cocina
10
11
 
11
12
  # The content type of the File.
12
13
  attribute :type, Types::Strict::String.enum(*File::TYPES)
13
- # Identifier for the resource within the SDR architecture but outside of the repository. UUID. Constant across resource versions. What clients will use calling the repository.
14
+ # Identifier for the resource within the SDR architecture but outside of the repository.
15
+ # UUID. Constant across resource versions. What clients will use calling the repository.
14
16
  attribute :externalIdentifier, Types::Strict::String
15
17
  # Primary processing label (can be same as title) for a File.
16
18
  attribute :label, Types::Strict::String
@@ -22,7 +24,8 @@ module Cocina
22
24
  attribute :version, Types::Strict::Integer
23
25
  # MIME Type of the File.
24
26
  attribute? :hasMimeType, Types::Strict::String
25
- # 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
27
+ # BCP 47 language tag: https://www.rfc-editor.org/rfc/rfc4646.txt -- other applications
28
+ # (like media players) expect language codes of this format, see e.g. https://videojs.com/guides/text-tracks/#srclang
26
29
  attribute? :languageTag, LanguageTag.optional
27
30
  # Use for the File (e.g. "transcription" for OCR).
28
31
  attribute? :use, FileUse.optional
@@ -31,8 +34,10 @@ module Cocina
31
34
  # Indicates if text that has been verified for accessibility/correctness.
32
35
  attribute? :correctedForAccessibility, Types::Strict::Bool.default(false)
33
36
  attribute :hasMessageDigests, Types::Strict::Array.of(MessageDigest).default([].freeze)
37
+ # Access metadata for files
34
38
  attribute(:access, FileAccess.default { FileAccess.new })
35
39
  attribute(:administrative, FileAdministrative.default { FileAdministrative.new })
40
+ # Presentation data for the File.
36
41
  attribute? :presentation, Presentation.optional
37
42
  end
38
43
  end
@@ -26,6 +26,7 @@ module Cocina
26
26
  attribute :label, Types::Strict::String
27
27
  # Version for the Fileset within SDR.
28
28
  attribute :version, Types::Strict::Integer
29
+ # Structural metadata
29
30
  attribute(:structural, FileSetStructural.default { FileSetStructural.new })
30
31
  end
31
32
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
+ # Use for the File (e.g. "transcription" for OCR).
5
6
  FileUse = Types::String
6
7
  end
7
8
  end
@@ -7,7 +7,9 @@ module Cocina
7
7
  # Catalog that is the source of the linked record.
8
8
  # example: folio
9
9
  attribute :catalog, Types::Strict::String.enum('folio', 'previous folio')
10
- # Only one of the Folio instance HRIDs should be designated for refreshing. This means that this HRID is the one used to pull metadata from the catalog if there is more than one HRID present.
10
+ # Only one of the Folio instance HRIDs should be designated for refreshing. This means
11
+ # that this HRID is the one used to pull metadata from the catalog if there is more
12
+ # than one HRID 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
  attribute :catalogRecordId, MigratedFromSymphonyIdentifier | MigratedFromVoyagerIdentifier | CreatedInFolioIdentifier
@@ -8,7 +8,14 @@ module Cocina
8
8
  attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).default([].freeze)
9
9
  # Digital Object Identifier (https://www.doi.org)
10
10
  attribute? :doi, DOI.optional
11
- # 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"
11
+ # Unique identifier in some other system. This is because a large proportion of what
12
+ # is deposited in SDR, historically and currently, are representations of objects that
13
+ # are also represented in other systems. For example, digitized paper and A/V collections
14
+ # have physical manifestations, and those physical objects are managed in systems that
15
+ # have their own identifiers. Similarly, books have barcodes, archival materials have
16
+ # collection numbers and physical locations, etc. The sourceId allows determining if
17
+ # an item has been deposited before and where to look for the original item if you're
18
+ # looking at its SDR representation. The format is: "namespace:identifier"
12
19
 
13
20
  # example: sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026
14
21
  attribute :sourceId, SourceId
@@ -2,6 +2,8 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
+ # The barcode associated with a Lane Medical Library DRO object, prefixed with 245
6
+ # example: 24503259768
5
7
  LaneMedicalBarcode = Types::String.constrained(format: /^245[0-9]{8}$/)
6
8
  end
7
9
  end