cocina-models 0.57.0 → 0.58.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocina/generator/schema_base.rb +10 -0
- data/lib/cocina/generator/schema_value.rb +2 -1
- data/lib/cocina/models/access.rb +4 -4
- data/lib/cocina/models/admin_policy_administrative.rb +3 -3
- data/lib/cocina/models/admin_policy_default_access.rb +7 -7
- data/lib/cocina/models/administrative.rb +1 -1
- data/lib/cocina/models/collection_identification.rb +1 -1
- data/lib/cocina/models/contributor.rb +3 -3
- data/lib/cocina/models/description.rb +2 -2
- data/lib/cocina/models/descriptive_basic_value.rb +8 -8
- data/lib/cocina/models/descriptive_parallel_contributor.rb +3 -3
- data/lib/cocina/models/descriptive_parallel_event.rb +2 -2
- data/lib/cocina/models/descriptive_value.rb +8 -8
- data/lib/cocina/models/descriptive_value_language.rb +4 -4
- data/lib/cocina/models/dro_access.rb +7 -7
- data/lib/cocina/models/dro_structural.rb +1 -1
- data/lib/cocina/models/embargo.rb +1 -1
- data/lib/cocina/models/event.rb +2 -2
- data/lib/cocina/models/file.rb +3 -3
- data/lib/cocina/models/file_access.rb +4 -4
- data/lib/cocina/models/identification.rb +2 -2
- data/lib/cocina/models/language.rb +7 -7
- data/lib/cocina/models/presentation.rb +2 -2
- data/lib/cocina/models/related_resource.rb +6 -6
- data/lib/cocina/models/release_tag.rb +4 -4
- data/lib/cocina/models/request_dro_structural.rb +1 -1
- data/lib/cocina/models/request_file.rb +4 -4
- 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 +4 -4
- data/lib/cocina/models/title.rb +8 -8
- data/lib/cocina/models/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11f8ca2b0924a901afd8988d67184b44b91ad061ca2cdf7965042b8c1282f2e2
|
4
|
+
data.tar.gz: 82423f38ede08c6f0046a08abaaa87a1c4ddad1926c8dc56050788cb7a75ad55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 982da9783c7e8c86a32c68d7946f1dfa695ab6ce9b5a2bf84d1ade358d7f0855072553ef4fe6fda35c685d39cc464402258572547ce5d06258c1f53fe9c780de
|
7
|
+
data.tar.gz: 269a9c9e3460d46edf2aaa085535ec626195666adad478173e1ab0e86643a0be7539c5bfdf9db47db6e5ab4a65042bd39c7a938c0f0b6d0d21b6596df64a3d43
|
@@ -21,12 +21,22 @@ module Cocina
|
|
21
21
|
key || schema_doc.name
|
22
22
|
end
|
23
23
|
|
24
|
+
# Allows non-required values to not be provided. This allows smaller
|
25
|
+
# requests as not every field needs to be present.
|
24
26
|
def omittable
|
25
27
|
return '' if required
|
26
28
|
|
27
29
|
'.meta(omittable: true)'
|
28
30
|
end
|
29
31
|
|
32
|
+
# Allows non-required values to be set to nil. This is useful when doing
|
33
|
+
# an update and you want to clear out a value.
|
34
|
+
def optional
|
35
|
+
return '' if required
|
36
|
+
|
37
|
+
'.optional'
|
38
|
+
end
|
39
|
+
|
30
40
|
def quote(item)
|
31
41
|
return item unless schema_doc.type == 'string'
|
32
42
|
|
@@ -6,7 +6,8 @@ module Cocina
|
|
6
6
|
class SchemaValue < SchemaBase
|
7
7
|
# rubocop:disable Layout/LineLength
|
8
8
|
def generate
|
9
|
-
|
9
|
+
# optional has to come before default or the default value that gets set will be nil.
|
10
|
+
"#{description}#{example}attribute :#{name.camelize(:lower)}, Types::#{dry_datatype(schema_doc)}#{optional}#{default}#{enum}#{omittable}"
|
10
11
|
end
|
11
12
|
# rubocop:enable Layout/LineLength
|
12
13
|
|
data/lib/cocina/models/access.rb
CHANGED
@@ -4,17 +4,17 @@ module Cocina
|
|
4
4
|
module Models
|
5
5
|
class Access < Struct
|
6
6
|
# Access level
|
7
|
-
attribute :access, Types::Strict::String.default('dark').enum('world', 'stanford', 'location-based', 'citation-only', 'dark').meta(omittable: true)
|
7
|
+
attribute :access, Types::Strict::String.optional.default('dark').enum('world', 'stanford', 'location-based', 'citation-only', 'dark').meta(omittable: true)
|
8
8
|
# The human readable copyright statement that applies
|
9
9
|
# example: Copyright World Trade Organization
|
10
10
|
attribute :copyright, Types::Strict::String.meta(omittable: true)
|
11
11
|
# If access is "location-based", which location should have access.
|
12
|
-
attribute :readLocation, Types::Strict::String.enum('spec', 'music', 'ars', 'art', 'hoover', 'm&m').meta(omittable: true)
|
12
|
+
attribute :readLocation, Types::Strict::String.optional.enum('spec', 'music', 'ars', 'art', 'hoover', 'm&m').meta(omittable: true)
|
13
13
|
# The human readable use and reproduction statement that applies
|
14
14
|
# 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).
|
15
|
-
attribute :useAndReproductionStatement, Types::Strict::String.meta(omittable: true)
|
15
|
+
attribute :useAndReproductionStatement, Types::Strict::String.optional.meta(omittable: true)
|
16
16
|
# The license governing reuse of the Collection. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
|
17
|
-
attribute :license, Types::Strict::String.meta(omittable: true)
|
17
|
+
attribute :license, Types::Strict::String.optional.meta(omittable: true)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -4,17 +4,17 @@ module Cocina
|
|
4
4
|
module Models
|
5
5
|
class AdminPolicyAdministrative < Struct
|
6
6
|
# This is an XML expression of the default access (see defaultAccess)
|
7
|
-
attribute :defaultObjectRights, Types::Strict::String.default('<?xml version="1.0" encoding="UTF-8"?><rightsMetadata><access type="discover"><machine><world/></machine></access><access type="read"><machine><world/></machine></access><use><human type="useAndReproduction"/><human type="creativeCommons"/><machine type="creativeCommons" uri=""/><human type="openDataCommons"/><machine type="openDataCommons" uri=""/></use><copyright><human/></copyright></rightsMetadata>').meta(omittable: true)
|
7
|
+
attribute :defaultObjectRights, Types::Strict::String.default('<?xml version="1.0" encoding="UTF-8"?><rightsMetadata><access type="discover"><machine><world/></machine></access><access type="read"><machine><world/></machine></access><use><human type="useAndReproduction"/><human type="creativeCommons"/><machine type="creativeCommons" uri=""/><human type="openDataCommons"/><machine type="openDataCommons" uri=""/></use><copyright><human/></copyright></rightsMetadata>').optional.meta(omittable: true)
|
8
8
|
attribute :defaultAccess, AdminPolicyDefaultAccess.optional.meta(omittable: true)
|
9
9
|
attribute :registrationWorkflow, Types::Strict::Array.of(Types::Strict::String).meta(omittable: true)
|
10
10
|
# An additional workflow to start for objects managed by this admin policy once the end-accession workflow step is complete
|
11
11
|
# example: wasCrawlPreassemblyWF
|
12
|
-
attribute :disseminationWorkflow, Types::Strict::String.meta(omittable: true)
|
12
|
+
attribute :disseminationWorkflow, Types::Strict::String.optional.meta(omittable: true)
|
13
13
|
attribute :collectionsForRegistration, Types::Strict::Array.of(Types::Strict::String).meta(omittable: true)
|
14
14
|
# example: druid:bc123df4567
|
15
15
|
attribute :hasAdminPolicy, Types::Strict::String
|
16
16
|
# example: druid:bc123df4567
|
17
|
-
attribute :referencesAgreement, Types::Strict::String.meta(omittable: true)
|
17
|
+
attribute :referencesAgreement, Types::Strict::String.optional.meta(omittable: true)
|
18
18
|
attribute :roles, Types::Strict::Array.of(AccessRole).meta(omittable: true)
|
19
19
|
end
|
20
20
|
end
|
@@ -3,23 +3,23 @@
|
|
3
3
|
module Cocina
|
4
4
|
module Models
|
5
5
|
class AdminPolicyDefaultAccess < Struct
|
6
|
-
attribute :access, Types::Strict::String.enum('world', 'stanford', 'location-based', 'citation-only', 'dark').meta(omittable: true)
|
6
|
+
attribute :access, Types::Strict::String.enum('world', 'stanford', 'location-based', 'citation-only', 'dark').optional.meta(omittable: true)
|
7
7
|
# Available for controlled digital lending.
|
8
|
-
attribute :controlledDigitalLending, Types::Strict::Bool.meta(omittable: true)
|
8
|
+
attribute :controlledDigitalLending, Types::Strict::Bool.optional.meta(omittable: true)
|
9
9
|
# The human readable copyright statement that applies
|
10
10
|
# example: Copyright World Trade Organization
|
11
|
-
attribute :copyright, Types::Strict::String.meta(omittable: true)
|
11
|
+
attribute :copyright, Types::Strict::String.optional.meta(omittable: true)
|
12
12
|
# Download access level. This is used in the transition from Fedora as a way to set a default download level at registration that is copied down to all the files.
|
13
13
|
|
14
|
-
attribute :download, Types::Strict::String.enum('world', 'stanford', 'location-based', 'none').meta(omittable: true)
|
14
|
+
attribute :download, Types::Strict::String.enum('world', 'stanford', 'location-based', 'none').optional.meta(omittable: true)
|
15
15
|
# If access is "location-based", which location should have access. This is used in the transition from Fedora as a way to set a default readLocation at registration that is copied down to all the files.
|
16
16
|
|
17
|
-
attribute :readLocation, Types::Strict::String.enum('spec', 'music', 'ars', 'art', 'hoover', 'm&m').meta(omittable: true)
|
17
|
+
attribute :readLocation, Types::Strict::String.enum('spec', 'music', 'ars', 'art', 'hoover', 'm&m').optional.meta(omittable: true)
|
18
18
|
# The human readable use and reproduction statement that applies
|
19
19
|
# 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).
|
20
|
-
attribute :useAndReproductionStatement, Types::Strict::String.meta(omittable: true)
|
20
|
+
attribute :useAndReproductionStatement, Types::Strict::String.optional.meta(omittable: true)
|
21
21
|
# The license governing reuse of the Collection. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
|
22
|
-
attribute :license, Types::Strict::String.meta(omittable: true)
|
22
|
+
attribute :license, Types::Strict::String.optional.meta(omittable: true)
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
@@ -8,7 +8,7 @@ module Cocina
|
|
8
8
|
attribute :releaseTags, Types::Strict::Array.of(ReleaseTag).meta(omittable: true)
|
9
9
|
# Administrative or Internal project this resource is a part of
|
10
10
|
# example: Google Books
|
11
|
-
attribute :partOfProject, Types::Strict::String.meta(omittable: true)
|
11
|
+
attribute :partOfProject, Types::Strict::String.optional.meta(omittable: true)
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -6,7 +6,7 @@ module Cocina
|
|
6
6
|
# Unique identifier in some other system. This is because a large proportion of what is deposited in SDR, historically and currently, are representations of objects that are also represented in other systems. For example, digitized paper and A/V collections have physical manifestations, and those physical objects are managed in systems that have their own identifiers. Similarly, books have barcodes, archival materials have collection numbers and physical locations, etc. The sourceId allows determining if an item has been deposited before and where to look for the original item if you're looking at its SDR representation. The format is: "namespace:identifier"
|
7
7
|
|
8
8
|
# example: sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026
|
9
|
-
attribute :sourceId, Types::Strict::String.meta(omittable: true)
|
9
|
+
attribute :sourceId, Types::Strict::String.optional.meta(omittable: true)
|
10
10
|
attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).meta(omittable: true)
|
11
11
|
end
|
12
12
|
end
|
@@ -5,14 +5,14 @@ module Cocina
|
|
5
5
|
class Contributor < Struct
|
6
6
|
attribute :name, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
7
7
|
# Entity type of the contributor (person, organization, etc.).
|
8
|
-
attribute :type, Types::Strict::String.meta(omittable: true)
|
8
|
+
attribute :type, Types::Strict::String.optional.meta(omittable: true)
|
9
9
|
# Status of the contributor relative to other parallel contributors (e.g. the primary author among a group of contributors).
|
10
|
-
attribute :status, Types::Strict::String.meta(omittable: true)
|
10
|
+
attribute :status, Types::Strict::String.optional.meta(omittable: true)
|
11
11
|
attribute :role, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
12
12
|
attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
13
13
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
14
14
|
# URL or other pointer to the location of the contributor information.
|
15
|
-
attribute :valueAt, Types::Strict::String.meta(omittable: true)
|
15
|
+
attribute :valueAt, Types::Strict::String.optional.meta(omittable: true)
|
16
16
|
attribute :parallelContributor, Types::Strict::Array.of(DescriptiveParallelContributor).meta(omittable: true)
|
17
17
|
end
|
18
18
|
end
|
@@ -13,13 +13,13 @@ module Cocina
|
|
13
13
|
attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
14
14
|
attribute :subject, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
15
15
|
# Stanford persistent URL associated with the resource.
|
16
|
-
attribute :purl, Types::Strict::String.meta(omittable: true)
|
16
|
+
attribute :purl, Types::Strict::String.optional.meta(omittable: true)
|
17
17
|
attribute :access, DescriptiveAccessMetadata.optional.meta(omittable: true)
|
18
18
|
attribute :relatedResource, Types::Strict::Array.of(RelatedResource).meta(omittable: true)
|
19
19
|
attribute :marcEncodedData, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
20
20
|
attribute :adminMetadata, DescriptiveAdminMetadata.optional.meta(omittable: true)
|
21
21
|
# URL or other pointer to the location of the resource description.
|
22
|
-
attribute :valueAt, Types::Strict::String.meta(omittable: true)
|
22
|
+
attribute :valueAt, Types::Strict::String.optional.meta(omittable: true)
|
23
23
|
|
24
24
|
def self.new(attributes = default_attributes, safe = false, validate = true, &block)
|
25
25
|
Validator.validate(self, attributes.with_indifferent_access) if validate && name
|
@@ -7,27 +7,27 @@ module Cocina
|
|
7
7
|
attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
8
8
|
attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
9
9
|
# String or integer value of the descriptive element.
|
10
|
-
attribute :value, Types::Nominal::Any.meta(omittable: true)
|
10
|
+
attribute :value, Types::Nominal::Any.optional.meta(omittable: true)
|
11
11
|
# Type of value provided by the descriptive element.
|
12
|
-
attribute :type, Types::Strict::String.meta(omittable: true)
|
12
|
+
attribute :type, Types::Strict::String.optional.meta(omittable: true)
|
13
13
|
# Status of the descriptive element value relative to other instances of the element.
|
14
|
-
attribute :status, Types::Strict::String.meta(omittable: true)
|
14
|
+
attribute :status, Types::Strict::String.optional.meta(omittable: true)
|
15
15
|
# Code value of the descriptive element.
|
16
|
-
attribute :code, Types::Strict::String.meta(omittable: true)
|
16
|
+
attribute :code, Types::Strict::String.optional.meta(omittable: true)
|
17
17
|
# URI value of the descriptive element.
|
18
|
-
attribute :uri, Types::Strict::String.meta(omittable: true)
|
18
|
+
attribute :uri, Types::Strict::String.optional.meta(omittable: true)
|
19
19
|
attribute :standard, Standard.optional.meta(omittable: true)
|
20
20
|
attribute :encoding, Standard.optional.meta(omittable: true)
|
21
21
|
attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
22
22
|
attribute :source, Source.optional.meta(omittable: true)
|
23
23
|
# The preferred display label to use for the descriptive element in access systems.
|
24
|
-
attribute :displayLabel, Types::Strict::String.meta(omittable: true)
|
24
|
+
attribute :displayLabel, Types::Strict::String.optional.meta(omittable: true)
|
25
25
|
# A term providing information about the circumstances of the statement (e.g., approximate dates).
|
26
|
-
attribute :qualifier, Types::Strict::String.meta(omittable: true)
|
26
|
+
attribute :qualifier, Types::Strict::String.optional.meta(omittable: true)
|
27
27
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
28
28
|
attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
|
29
29
|
# URL or other pointer to the location of the value of the descriptive element.
|
30
|
-
attribute :valueAt, Types::Strict::String.meta(omittable: true)
|
30
|
+
attribute :valueAt, Types::Strict::String.optional.meta(omittable: true)
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
@@ -5,14 +5,14 @@ module Cocina
|
|
5
5
|
class DescriptiveParallelContributor < Struct
|
6
6
|
attribute :name, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
7
7
|
# Entity type of the contributor (person, organization, etc.).
|
8
|
-
attribute :type, Types::Strict::String.meta(omittable: true)
|
8
|
+
attribute :type, Types::Strict::String.optional.meta(omittable: true)
|
9
9
|
# Status of the contributor relative to other parallel contributors (e.g. the primary author among a group of contributors).
|
10
|
-
attribute :status, Types::Strict::String.meta(omittable: true)
|
10
|
+
attribute :status, Types::Strict::String.optional.meta(omittable: true)
|
11
11
|
attribute :role, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
12
12
|
attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
13
13
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
14
14
|
# URL or other pointer to the location of the contributor information.
|
15
|
-
attribute :valueAt, Types::Strict::String.meta(omittable: true)
|
15
|
+
attribute :valueAt, Types::Strict::String.optional.meta(omittable: true)
|
16
16
|
attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
|
17
17
|
end
|
18
18
|
end
|
@@ -5,9 +5,9 @@ module Cocina
|
|
5
5
|
class DescriptiveParallelEvent < Struct
|
6
6
|
attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
7
7
|
# Description of the event (creation, publication, etc.).
|
8
|
-
attribute :type, Types::Strict::String.meta(omittable: true)
|
8
|
+
attribute :type, Types::Strict::String.optional.meta(omittable: true)
|
9
9
|
# The preferred display label to use for the event in access systems.
|
10
|
-
attribute :displayLabel, Types::Strict::String.meta(omittable: true)
|
10
|
+
attribute :displayLabel, Types::Strict::String.optional.meta(omittable: true)
|
11
11
|
attribute :date, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
12
12
|
attribute :contributor, Types::Strict::Array.of(Contributor).meta(omittable: true)
|
13
13
|
attribute :location, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
@@ -7,27 +7,27 @@ module Cocina
|
|
7
7
|
attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
8
8
|
attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
9
9
|
# String or integer value of the descriptive element.
|
10
|
-
attribute :value, Types::Nominal::Any.meta(omittable: true)
|
10
|
+
attribute :value, Types::Nominal::Any.optional.meta(omittable: true)
|
11
11
|
# Type of value provided by the descriptive element.
|
12
|
-
attribute :type, Types::Strict::String.meta(omittable: true)
|
12
|
+
attribute :type, Types::Strict::String.optional.meta(omittable: true)
|
13
13
|
# Status of the descriptive element value relative to other instances of the element.
|
14
|
-
attribute :status, Types::Strict::String.meta(omittable: true)
|
14
|
+
attribute :status, Types::Strict::String.optional.meta(omittable: true)
|
15
15
|
# Code value of the descriptive element.
|
16
|
-
attribute :code, Types::Strict::String.meta(omittable: true)
|
16
|
+
attribute :code, Types::Strict::String.optional.meta(omittable: true)
|
17
17
|
# URI value of the descriptive element.
|
18
|
-
attribute :uri, Types::Strict::String.meta(omittable: true)
|
18
|
+
attribute :uri, Types::Strict::String.optional.meta(omittable: true)
|
19
19
|
attribute :standard, Standard.optional.meta(omittable: true)
|
20
20
|
attribute :encoding, Standard.optional.meta(omittable: true)
|
21
21
|
attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
22
22
|
attribute :source, Source.optional.meta(omittable: true)
|
23
23
|
# The preferred display label to use for the descriptive element in access systems.
|
24
|
-
attribute :displayLabel, Types::Strict::String.meta(omittable: true)
|
24
|
+
attribute :displayLabel, Types::Strict::String.optional.meta(omittable: true)
|
25
25
|
# A term providing information about the circumstances of the statement (e.g., approximate dates).
|
26
|
-
attribute :qualifier, Types::Strict::String.meta(omittable: true)
|
26
|
+
attribute :qualifier, Types::Strict::String.optional.meta(omittable: true)
|
27
27
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
28
28
|
attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
|
29
29
|
# URL or other pointer to the location of the value of the descriptive element.
|
30
|
-
attribute :valueAt, Types::Strict::String.meta(omittable: true)
|
30
|
+
attribute :valueAt, Types::Strict::String.optional.meta(omittable: true)
|
31
31
|
attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).meta(omittable: true)
|
32
32
|
end
|
33
33
|
end
|
@@ -4,14 +4,14 @@ module Cocina
|
|
4
4
|
module Models
|
5
5
|
class DescriptiveValueLanguage < Struct
|
6
6
|
# Code representing the standard or encoding.
|
7
|
-
attribute :code, Types::Strict::String.meta(omittable: true)
|
7
|
+
attribute :code, Types::Strict::String.optional.meta(omittable: true)
|
8
8
|
# URI for the standard or encoding.
|
9
|
-
attribute :uri, Types::Strict::String.meta(omittable: true)
|
9
|
+
attribute :uri, Types::Strict::String.optional.meta(omittable: true)
|
10
10
|
# String describing the standard or encoding.
|
11
|
-
attribute :value, Types::Strict::String.meta(omittable: true)
|
11
|
+
attribute :value, Types::Strict::String.optional.meta(omittable: true)
|
12
12
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
13
13
|
# The version of the standard or encoding.
|
14
|
-
attribute :version, Types::Strict::String.meta(omittable: true)
|
14
|
+
attribute :version, Types::Strict::String.optional.meta(omittable: true)
|
15
15
|
attribute :source, Source.optional.meta(omittable: true)
|
16
16
|
attribute :valueScript, Standard.optional.meta(omittable: true)
|
17
17
|
end
|
@@ -3,24 +3,24 @@
|
|
3
3
|
module Cocina
|
4
4
|
module Models
|
5
5
|
class DROAccess < Struct
|
6
|
-
attribute :access, Types::Strict::String.default('dark').enum('world', 'stanford', 'location-based', 'citation-only', 'dark').meta(omittable: true)
|
6
|
+
attribute :access, Types::Strict::String.default('dark').enum('world', 'stanford', 'location-based', 'citation-only', 'dark').optional.meta(omittable: true)
|
7
7
|
# Available for controlled digital lending.
|
8
|
-
attribute :controlledDigitalLending, Types::Strict::Bool.meta(omittable: true)
|
8
|
+
attribute :controlledDigitalLending, Types::Strict::Bool.optional.meta(omittable: true)
|
9
9
|
# The human readable copyright statement that applies
|
10
10
|
# example: Copyright World Trade Organization
|
11
|
-
attribute :copyright, Types::Strict::String.meta(omittable: true)
|
11
|
+
attribute :copyright, Types::Strict::String.optional.meta(omittable: true)
|
12
12
|
attribute :embargo, Embargo.optional.meta(omittable: true)
|
13
13
|
# Download access level. This is used in the transition from Fedora as a way to set a default download level at registration that is copied down to all the files.
|
14
14
|
|
15
|
-
attribute :download, Types::Strict::String.default('none').enum('world', 'stanford', 'location-based', 'none').meta(omittable: true)
|
15
|
+
attribute :download, Types::Strict::String.default('none').enum('world', 'stanford', 'location-based', 'none').optional.meta(omittable: true)
|
16
16
|
# If access is "location-based", which location should have access. This is used in the transition from Fedora as a way to set a default readLocation at registration that is copied down to all the files.
|
17
17
|
|
18
|
-
attribute :readLocation, Types::Strict::String.enum('spec', 'music', 'ars', 'art', 'hoover', 'm&m').meta(omittable: true)
|
18
|
+
attribute :readLocation, Types::Strict::String.enum('spec', 'music', 'ars', 'art', 'hoover', 'm&m').optional.meta(omittable: true)
|
19
19
|
# The human readable use and reproduction statement that applies
|
20
20
|
# 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
|
-
attribute :useAndReproductionStatement, Types::Strict::String.meta(omittable: true)
|
21
|
+
attribute :useAndReproductionStatement, Types::Strict::String.optional.meta(omittable: true)
|
22
22
|
# The license governing reuse of the DRO. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
|
23
|
-
attribute :license, Types::Strict::String.meta(omittable: true)
|
23
|
+
attribute :license, Types::Strict::String.optional.meta(omittable: true)
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -7,7 +7,7 @@ module Cocina
|
|
7
7
|
attribute :hasMemberOrders, Types::Strict::Array.of(Sequence).meta(omittable: true)
|
8
8
|
attribute :isMemberOf, Types::Strict::Array.of(Druid).meta(omittable: true)
|
9
9
|
# Agreement that covers the deposit of the DRO into SDR.
|
10
|
-
attribute :hasAgreement, Types::Strict::String.meta(omittable: true)
|
10
|
+
attribute :hasAgreement, Types::Strict::String.optional.meta(omittable: true)
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -10,7 +10,7 @@ module Cocina
|
|
10
10
|
attribute :access, Types::Strict::String.enum('world', 'stanford', 'location-based', 'citation-only', 'dark')
|
11
11
|
# The human readable use and reproduction statement that applies when the embargo expires.
|
12
12
|
# example: These materials are in the public domain.
|
13
|
-
attribute :useAndReproductionStatement, Types::Strict::String.meta(omittable: true)
|
13
|
+
attribute :useAndReproductionStatement, Types::Strict::String.optional.meta(omittable: true)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
data/lib/cocina/models/event.rb
CHANGED
@@ -5,9 +5,9 @@ module Cocina
|
|
5
5
|
class Event < Struct
|
6
6
|
attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
7
7
|
# Description of the event (creation, publication, etc.).
|
8
|
-
attribute :type, Types::Strict::String.meta(omittable: true)
|
8
|
+
attribute :type, Types::Strict::String.optional.meta(omittable: true)
|
9
9
|
# The preferred display label to use for the event in access systems.
|
10
|
-
attribute :displayLabel, Types::Strict::String.meta(omittable: true)
|
10
|
+
attribute :displayLabel, Types::Strict::String.optional.meta(omittable: true)
|
11
11
|
attribute :date, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
12
12
|
attribute :contributor, Types::Strict::Array.of(Contributor).meta(omittable: true)
|
13
13
|
attribute :location, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
data/lib/cocina/models/file.rb
CHANGED
@@ -16,13 +16,13 @@ module Cocina
|
|
16
16
|
# Filename for a file. Can be same as label.
|
17
17
|
attribute :filename, Types::Strict::String
|
18
18
|
# Size of the File (binary) in bytes.
|
19
|
-
attribute :size, Types::Strict::Integer.meta(omittable: true)
|
19
|
+
attribute :size, Types::Strict::Integer.optional.meta(omittable: true)
|
20
20
|
# Version for the File within SDR.
|
21
21
|
attribute :version, Types::Strict::Integer
|
22
22
|
# MIME Type of the File.
|
23
|
-
attribute :hasMimeType, Types::Strict::String.meta(omittable: true)
|
23
|
+
attribute :hasMimeType, Types::Strict::String.optional.meta(omittable: true)
|
24
24
|
# Use for the File.
|
25
|
-
attribute :use, Types::Strict::String.meta(omittable: true)
|
25
|
+
attribute :use, Types::Strict::String.optional.meta(omittable: true)
|
26
26
|
attribute :hasMessageDigests, Types::Strict::Array.of(MessageDigest).default([].freeze)
|
27
27
|
attribute(:access, FileAccess.default { FileAccess.new })
|
28
28
|
attribute(:administrative, FileAdministrative.default { FileAdministrative.new })
|
@@ -4,13 +4,13 @@ module Cocina
|
|
4
4
|
module Models
|
5
5
|
class FileAccess < Struct
|
6
6
|
# Access level
|
7
|
-
attribute :access, Types::Strict::String.default('dark').enum('world', 'stanford', 'location-based', 'citation-only', 'dark').meta(omittable: true)
|
7
|
+
attribute :access, Types::Strict::String.default('dark').enum('world', 'stanford', 'location-based', 'citation-only', 'dark').optional.meta(omittable: true)
|
8
8
|
# Available for controlled digital lending.
|
9
|
-
attribute :controlledDigitalLending, Types::Strict::Bool.meta(omittable: true)
|
9
|
+
attribute :controlledDigitalLending, Types::Strict::Bool.optional.meta(omittable: true)
|
10
10
|
# Download access level for a file
|
11
|
-
attribute :download, Types::Strict::String.default('none').enum('world', 'stanford', 'location-based', 'none').meta(omittable: true)
|
11
|
+
attribute :download, Types::Strict::String.default('none').enum('world', 'stanford', 'location-based', 'none').optional.meta(omittable: true)
|
12
12
|
# If access is "location-based", which location should have access.
|
13
|
-
attribute :readLocation, Types::Strict::String.enum('spec', 'music', 'ars', 'art', 'hoover', 'm&m').meta(omittable: true)
|
13
|
+
attribute :readLocation, Types::Strict::String.enum('spec', 'music', 'ars', 'art', 'hoover', 'm&m').optional.meta(omittable: true)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -6,10 +6,10 @@ module Cocina
|
|
6
6
|
# Unique identifier in some other system. This is because a large proportion of what is deposited in SDR, historically and currently, are representations of objects that are also represented in other systems. For example, digitized paper and A/V collections have physical manifestations, and those physical objects are managed in systems that have their own identifiers. Similarly, books have barcodes, archival materials have collection numbers and physical locations, etc. The sourceId allows determining if an item has been deposited before and where to look for the original item if you're looking at its SDR representation. The format is: "namespace:identifier"
|
7
7
|
|
8
8
|
# example: sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026
|
9
|
-
attribute :sourceId, Types::Strict::String.meta(omittable: true)
|
9
|
+
attribute :sourceId, Types::Strict::String.optional.meta(omittable: true)
|
10
10
|
attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).meta(omittable: true)
|
11
11
|
# A barcode
|
12
|
-
attribute :barcode, Types::Nominal::Any.meta(omittable: true)
|
12
|
+
attribute :barcode, Types::Nominal::Any.optional.meta(omittable: true)
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -5,27 +5,27 @@ module Cocina
|
|
5
5
|
class Language < Struct
|
6
6
|
attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).meta(omittable: true)
|
7
7
|
# Code value of the descriptive element.
|
8
|
-
attribute :code, Types::Strict::String.meta(omittable: true)
|
8
|
+
attribute :code, Types::Strict::String.optional.meta(omittable: true)
|
9
9
|
# The preferred display label to use for the descriptive element in access systems.
|
10
|
-
attribute :displayLabel, Types::Strict::String.meta(omittable: true)
|
10
|
+
attribute :displayLabel, Types::Strict::String.optional.meta(omittable: true)
|
11
11
|
attribute :encoding, Standard.optional.meta(omittable: true)
|
12
12
|
attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
13
13
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
14
14
|
attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
15
15
|
# present for mapping to additional schemas in the future and for consistency but not otherwise used
|
16
|
-
attribute :qualifier, Types::Strict::String.meta(omittable: true)
|
16
|
+
attribute :qualifier, Types::Strict::String.optional.meta(omittable: true)
|
17
17
|
attribute :script, DescriptiveValue.optional.meta(omittable: true)
|
18
18
|
attribute :source, Source.optional.meta(omittable: true)
|
19
19
|
# Status of the language relative to other parallel language elements (e.g. the primary language)
|
20
|
-
attribute :status, Types::Strict::String.enum('primary').meta(omittable: true)
|
20
|
+
attribute :status, Types::Strict::String.enum('primary').optional.meta(omittable: true)
|
21
21
|
attribute :standard, Standard.optional.meta(omittable: true)
|
22
22
|
attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
23
23
|
# URI value of the descriptive element.
|
24
|
-
attribute :uri, Types::Strict::String.meta(omittable: true)
|
24
|
+
attribute :uri, Types::Strict::String.optional.meta(omittable: true)
|
25
25
|
# Value of the descriptive element.
|
26
|
-
attribute :value, Types::Strict::String.meta(omittable: true)
|
26
|
+
attribute :value, Types::Strict::String.optional.meta(omittable: true)
|
27
27
|
# URL or other pointer to the location of the language information.
|
28
|
-
attribute :valueAt, Types::Strict::String.meta(omittable: true)
|
28
|
+
attribute :valueAt, Types::Strict::String.optional.meta(omittable: true)
|
29
29
|
attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
|
30
30
|
end
|
31
31
|
end
|
@@ -4,9 +4,9 @@ module Cocina
|
|
4
4
|
module Models
|
5
5
|
class Presentation < Struct
|
6
6
|
# Height in pixels
|
7
|
-
attribute :height, Types::Strict::Integer.meta(omittable: true)
|
7
|
+
attribute :height, Types::Strict::Integer.optional.meta(omittable: true)
|
8
8
|
# Width in pixels
|
9
|
-
attribute :width, Types::Strict::Integer.meta(omittable: true)
|
9
|
+
attribute :width, Types::Strict::Integer.optional.meta(omittable: true)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -4,11 +4,11 @@ module Cocina
|
|
4
4
|
module Models
|
5
5
|
class RelatedResource < Struct
|
6
6
|
# The relationship of the related resource to the described resource.
|
7
|
-
attribute :type, Types::Strict::String.meta(omittable: true)
|
7
|
+
attribute :type, Types::Strict::String.optional.meta(omittable: true)
|
8
8
|
# Status of the related resource relative to other related resources.
|
9
|
-
attribute :status, Types::Strict::String.meta(omittable: true)
|
9
|
+
attribute :status, Types::Strict::String.optional.meta(omittable: true)
|
10
10
|
# The preferred display label to use for the related resource in access systems.
|
11
|
-
attribute :displayLabel, Types::Strict::String.meta(omittable: true)
|
11
|
+
attribute :displayLabel, Types::Strict::String.optional.meta(omittable: true)
|
12
12
|
attribute :title, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
13
13
|
attribute :contributor, Types::Strict::Array.of(Contributor).meta(omittable: true)
|
14
14
|
attribute :event, Types::Strict::Array.of(Event).meta(omittable: true)
|
@@ -19,14 +19,14 @@ module Cocina
|
|
19
19
|
attribute :standard, Standard.optional.meta(omittable: true)
|
20
20
|
attribute :subject, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
21
21
|
# Stanford persistent URL associated with the related resource.
|
22
|
-
attribute :purl, Types::Strict::String.meta(omittable: true)
|
22
|
+
attribute :purl, Types::Strict::String.optional.meta(omittable: true)
|
23
23
|
attribute :access, DescriptiveAccessMetadata.optional.meta(omittable: true)
|
24
24
|
attribute :relatedResource, Types::Strict::Array.of(RelatedResource).meta(omittable: true)
|
25
25
|
attribute :adminMetadata, DescriptiveAdminMetadata.optional.meta(omittable: true)
|
26
26
|
# The version of the related resource.
|
27
|
-
attribute :version, Types::Strict::String.meta(omittable: true)
|
27
|
+
attribute :version, Types::Strict::String.optional.meta(omittable: true)
|
28
28
|
# URL or other pointer to the location of the related resource information.
|
29
|
-
attribute :valueAt, Types::Strict::String.meta(omittable: true)
|
29
|
+
attribute :valueAt, Types::Strict::String.optional.meta(omittable: true)
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
@@ -5,15 +5,15 @@ module Cocina
|
|
5
5
|
class ReleaseTag < Struct
|
6
6
|
# Who did this release
|
7
7
|
# example: petucket
|
8
|
-
attribute :who, Types::Strict::String.meta(omittable: true)
|
8
|
+
attribute :who, Types::Strict::String.optional.meta(omittable: true)
|
9
9
|
# What is being released. This item or the whole collection.
|
10
10
|
# example: self
|
11
|
-
attribute :what, Types::Strict::String.enum('self', 'collection').meta(omittable: true)
|
11
|
+
attribute :what, Types::Strict::String.enum('self', 'collection').optional.meta(omittable: true)
|
12
12
|
# When did this action happen
|
13
|
-
attribute :date, Types::Params::DateTime.meta(omittable: true)
|
13
|
+
attribute :date, Types::Params::DateTime.optional.meta(omittable: true)
|
14
14
|
# What platform is it released to
|
15
15
|
# example: Searchworks
|
16
|
-
attribute :to, Types::Strict::String.meta(omittable: true)
|
16
|
+
attribute :to, Types::Strict::String.optional.meta(omittable: true)
|
17
17
|
attribute :release, Types::Strict::Bool.default(false)
|
18
18
|
end
|
19
19
|
end
|
@@ -6,7 +6,7 @@ module Cocina
|
|
6
6
|
attribute :contains, Types::Strict::Array.of(RequestFileSet).meta(omittable: true)
|
7
7
|
attribute :hasMemberOrders, Types::Strict::Array.of(Sequence).meta(omittable: true)
|
8
8
|
attribute :isMemberOf, Types::Strict::Array.of(Druid).meta(omittable: true)
|
9
|
-
attribute :hasAgreement, Types::Strict::String.meta(omittable: true)
|
9
|
+
attribute :hasAgreement, Types::Strict::String.optional.meta(omittable: true)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -10,11 +10,11 @@ module Cocina
|
|
10
10
|
attribute :type, Types::Strict::String.enum(*RequestFile::TYPES)
|
11
11
|
attribute :label, Types::Strict::String
|
12
12
|
attribute :filename, Types::Strict::String
|
13
|
-
attribute :size, Types::Strict::Integer.meta(omittable: true)
|
13
|
+
attribute :size, Types::Strict::Integer.optional.meta(omittable: true)
|
14
14
|
attribute :version, Types::Strict::Integer
|
15
|
-
attribute :hasMimeType, Types::Strict::String.meta(omittable: true)
|
16
|
-
attribute :externalIdentifier, Types::Strict::String.meta(omittable: true)
|
17
|
-
attribute :use, Types::Strict::String.meta(omittable: true)
|
15
|
+
attribute :hasMimeType, Types::Strict::String.optional.meta(omittable: true)
|
16
|
+
attribute :externalIdentifier, Types::Strict::String.optional.meta(omittable: true)
|
17
|
+
attribute :use, Types::Strict::String.optional.meta(omittable: true)
|
18
18
|
attribute :hasMessageDigests, Types::Strict::Array.of(MessageDigest).default([].freeze)
|
19
19
|
attribute(:access, FileAccess.default { FileAccess.new })
|
20
20
|
attribute(:administrative, FileAdministrative.default { FileAdministrative.new })
|
@@ -9,7 +9,7 @@ module Cocina
|
|
9
9
|
attribute :sourceId, Types::Strict::String
|
10
10
|
attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).meta(omittable: true)
|
11
11
|
# A barcode
|
12
|
-
attribute :barcode, Types::Nominal::Any.meta(omittable: true)
|
12
|
+
attribute :barcode, Types::Nominal::Any.optional.meta(omittable: true)
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -5,7 +5,7 @@ module Cocina
|
|
5
5
|
class Sequence < Struct
|
6
6
|
attribute :members, Types::Strict::Array.of(Types::Strict::String).meta(omittable: true)
|
7
7
|
# The direction that a sequence of canvases should be displayed to the user
|
8
|
-
attribute :viewingDirection, Types::Strict::String.enum('right-to-left', 'left-to-right').meta(omittable: true)
|
8
|
+
attribute :viewingDirection, Types::Strict::String.enum('right-to-left', 'left-to-right').optional.meta(omittable: true)
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
data/lib/cocina/models/source.rb
CHANGED
@@ -4,14 +4,14 @@ module Cocina
|
|
4
4
|
module Models
|
5
5
|
class Source < Struct
|
6
6
|
# Code representing the value source.
|
7
|
-
attribute :code, Types::Strict::String.meta(omittable: true)
|
7
|
+
attribute :code, Types::Strict::String.optional.meta(omittable: true)
|
8
8
|
# URI for the value source.
|
9
|
-
attribute :uri, Types::Strict::String.meta(omittable: true)
|
9
|
+
attribute :uri, Types::Strict::String.optional.meta(omittable: true)
|
10
10
|
# String describing the value source.
|
11
|
-
attribute :value, Types::Strict::String.meta(omittable: true)
|
11
|
+
attribute :value, Types::Strict::String.optional.meta(omittable: true)
|
12
12
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
13
13
|
# The version of the value source.
|
14
|
-
attribute :version, Types::Strict::String.meta(omittable: true)
|
14
|
+
attribute :version, Types::Strict::String.optional.meta(omittable: true)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -4,14 +4,14 @@ module Cocina
|
|
4
4
|
module Models
|
5
5
|
class Standard < Struct
|
6
6
|
# Code representing the standard or encoding.
|
7
|
-
attribute :code, Types::Strict::String.meta(omittable: true)
|
7
|
+
attribute :code, Types::Strict::String.optional.meta(omittable: true)
|
8
8
|
# URI for the standard or encoding.
|
9
|
-
attribute :uri, Types::Strict::String.meta(omittable: true)
|
9
|
+
attribute :uri, Types::Strict::String.optional.meta(omittable: true)
|
10
10
|
# String describing the standard or encoding.
|
11
|
-
attribute :value, Types::Strict::String.meta(omittable: true)
|
11
|
+
attribute :value, Types::Strict::String.optional.meta(omittable: true)
|
12
12
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
13
13
|
# The version of the standard or encoding.
|
14
|
-
attribute :version, Types::Strict::String.meta(omittable: true)
|
14
|
+
attribute :version, Types::Strict::String.optional.meta(omittable: true)
|
15
15
|
attribute :source, Source.optional.meta(omittable: true)
|
16
16
|
end
|
17
17
|
end
|
data/lib/cocina/models/title.rb
CHANGED
@@ -7,27 +7,27 @@ module Cocina
|
|
7
7
|
attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
8
8
|
attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
9
9
|
# String or integer value of the descriptive element.
|
10
|
-
attribute :value, Types::Nominal::Any.meta(omittable: true)
|
10
|
+
attribute :value, Types::Nominal::Any.optional.meta(omittable: true)
|
11
11
|
# Type of value provided by the descriptive element.
|
12
|
-
attribute :type, Types::Strict::String.meta(omittable: true)
|
12
|
+
attribute :type, Types::Strict::String.optional.meta(omittable: true)
|
13
13
|
# Status of the descriptive element value relative to other instances of the element.
|
14
|
-
attribute :status, Types::Strict::String.meta(omittable: true)
|
14
|
+
attribute :status, Types::Strict::String.optional.meta(omittable: true)
|
15
15
|
# Code value of the descriptive element.
|
16
|
-
attribute :code, Types::Strict::String.meta(omittable: true)
|
16
|
+
attribute :code, Types::Strict::String.optional.meta(omittable: true)
|
17
17
|
# URI value of the descriptive element.
|
18
|
-
attribute :uri, Types::Strict::String.meta(omittable: true)
|
18
|
+
attribute :uri, Types::Strict::String.optional.meta(omittable: true)
|
19
19
|
attribute :standard, Standard.optional.meta(omittable: true)
|
20
20
|
attribute :encoding, Standard.optional.meta(omittable: true)
|
21
21
|
attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
22
22
|
attribute :source, Source.optional.meta(omittable: true)
|
23
23
|
# The preferred display label to use for the descriptive element in access systems.
|
24
|
-
attribute :displayLabel, Types::Strict::String.meta(omittable: true)
|
24
|
+
attribute :displayLabel, Types::Strict::String.optional.meta(omittable: true)
|
25
25
|
# A term providing information about the circumstances of the statement (e.g., approximate dates).
|
26
|
-
attribute :qualifier, Types::Strict::String.meta(omittable: true)
|
26
|
+
attribute :qualifier, Types::Strict::String.optional.meta(omittable: true)
|
27
27
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
28
28
|
attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
|
29
29
|
# URL or other pointer to the location of the value of the descriptive element.
|
30
|
-
attribute :valueAt, Types::Strict::String.meta(omittable: true)
|
30
|
+
attribute :valueAt, Types::Strict::String.optional.meta(omittable: true)
|
31
31
|
attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).meta(omittable: true)
|
32
32
|
end
|
33
33
|
end
|
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.58.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: 2021-03-
|
11
|
+
date: 2021-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -319,7 +319,7 @@ files:
|
|
319
319
|
homepage: https://github.com/sul-dlss/cocina-models
|
320
320
|
licenses: []
|
321
321
|
metadata: {}
|
322
|
-
post_install_message:
|
322
|
+
post_install_message:
|
323
323
|
rdoc_options: []
|
324
324
|
require_paths:
|
325
325
|
- lib
|
@@ -334,8 +334,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
334
334
|
- !ruby/object:Gem::Version
|
335
335
|
version: '0'
|
336
336
|
requirements: []
|
337
|
-
rubygems_version: 3.
|
338
|
-
signing_key:
|
337
|
+
rubygems_version: 3.1.4
|
338
|
+
signing_key:
|
339
339
|
specification_version: 4
|
340
340
|
summary: Data models for the SDR
|
341
341
|
test_files: []
|