cocina-models 0.54.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/generator.rb +2 -0
- data/lib/cocina/generator/schema.rb +1 -1
- data/lib/cocina/generator/schema_base.rb +10 -0
- data/lib/cocina/generator/schema_value.rb +2 -1
- data/lib/cocina/generator/vocab.rb +30 -13
- data/lib/cocina/models/access.rb +10 -2
- data/lib/cocina/models/admin_policy_administrative.rb +8 -3
- data/lib/cocina/models/admin_policy_default_access.rb +25 -0
- data/lib/cocina/models/administrative.rb +1 -1
- data/lib/cocina/models/business_barcode.rb +9 -0
- data/lib/cocina/models/catkey_barcode.rb +9 -0
- data/lib/cocina/models/collection_identification.rb +1 -1
- data/lib/cocina/models/contributor.rb +4 -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 +19 -0
- 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 +8 -6
- 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/file_set.rb +16 -1
- data/lib/cocina/models/identification.rb +3 -1
- 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_file_set.rb +16 -1
- data/lib/cocina/models/request_identification.rb +2 -0
- 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/standard_barcode.rb +9 -0
- data/lib/cocina/models/title.rb +8 -8
- data/lib/cocina/models/version.rb +1 -1
- data/lib/cocina/models/vocab.rb +66 -4
- data/openapi.yml +174 -4
- metadata +11 -6
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
|
@@ -5,7 +5,22 @@ module Cocina
|
|
5
5
|
class FileSet < Struct
|
6
6
|
include Checkable
|
7
7
|
|
8
|
-
TYPES = ['http://cocina.sul.stanford.edu/models/
|
8
|
+
TYPES = ['http://cocina.sul.stanford.edu/models/resources/audio.jsonld',
|
9
|
+
'http://cocina.sul.stanford.edu/models/resources/attachment.jsonld',
|
10
|
+
'http://cocina.sul.stanford.edu/models/resources/document.jsonld',
|
11
|
+
'http://cocina.sul.stanford.edu/models/resources/file.jsonld',
|
12
|
+
'http://cocina.sul.stanford.edu/models/resources/image.jsonld',
|
13
|
+
'http://cocina.sul.stanford.edu/models/resources/main-augmented.jsonld',
|
14
|
+
'http://cocina.sul.stanford.edu/models/resources/main-original.jsonld',
|
15
|
+
'http://cocina.sul.stanford.edu/models/resources/media.jsonld',
|
16
|
+
'http://cocina.sul.stanford.edu/models/resources/object.jsonld',
|
17
|
+
'http://cocina.sul.stanford.edu/models/resources/page.jsonld',
|
18
|
+
'http://cocina.sul.stanford.edu/models/resources/permissions.jsonld',
|
19
|
+
'http://cocina.sul.stanford.edu/models/resources/preview.jsonld',
|
20
|
+
'http://cocina.sul.stanford.edu/models/resources/supplement.jsonld',
|
21
|
+
'http://cocina.sul.stanford.edu/models/resources/3d.jsonld',
|
22
|
+
'http://cocina.sul.stanford.edu/models/resources/thumb.jsonld',
|
23
|
+
'http://cocina.sul.stanford.edu/models/resources/video.jsonld'].freeze
|
9
24
|
|
10
25
|
# The content type of the Fileset.
|
11
26
|
attribute :type, Types::Strict::String.enum(*FileSet::TYPES)
|
@@ -6,8 +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
|
+
# A barcode
|
12
|
+
attribute :barcode, Types::Nominal::Any.optional.meta(omittable: true)
|
11
13
|
end
|
12
14
|
end
|
13
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 })
|
@@ -5,7 +5,22 @@ module Cocina
|
|
5
5
|
class RequestFileSet < Struct
|
6
6
|
include Checkable
|
7
7
|
|
8
|
-
TYPES = ['http://cocina.sul.stanford.edu/models/
|
8
|
+
TYPES = ['http://cocina.sul.stanford.edu/models/resources/audio.jsonld',
|
9
|
+
'http://cocina.sul.stanford.edu/models/resources/attachment.jsonld',
|
10
|
+
'http://cocina.sul.stanford.edu/models/resources/document.jsonld',
|
11
|
+
'http://cocina.sul.stanford.edu/models/resources/file.jsonld',
|
12
|
+
'http://cocina.sul.stanford.edu/models/resources/image.jsonld',
|
13
|
+
'http://cocina.sul.stanford.edu/models/resources/main-augmented.jsonld',
|
14
|
+
'http://cocina.sul.stanford.edu/models/resources/main-original.jsonld',
|
15
|
+
'http://cocina.sul.stanford.edu/models/resources/media.jsonld',
|
16
|
+
'http://cocina.sul.stanford.edu/models/resources/object.jsonld',
|
17
|
+
'http://cocina.sul.stanford.edu/models/resources/page.jsonld',
|
18
|
+
'http://cocina.sul.stanford.edu/models/resources/permissions.jsonld',
|
19
|
+
'http://cocina.sul.stanford.edu/models/resources/preview.jsonld',
|
20
|
+
'http://cocina.sul.stanford.edu/models/resources/supplement.jsonld',
|
21
|
+
'http://cocina.sul.stanford.edu/models/resources/3d.jsonld',
|
22
|
+
'http://cocina.sul.stanford.edu/models/resources/thumb.jsonld',
|
23
|
+
'http://cocina.sul.stanford.edu/models/resources/video.jsonld'].freeze
|
9
24
|
|
10
25
|
attribute :type, Types::Strict::String.enum(*RequestFileSet::TYPES)
|
11
26
|
attribute :label, Types::Strict::String
|
@@ -8,6 +8,8 @@ module Cocina
|
|
8
8
|
# example: sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026
|
9
9
|
attribute :sourceId, Types::Strict::String
|
10
10
|
attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).meta(omittable: true)
|
11
|
+
# A barcode
|
12
|
+
attribute :barcode, Types::Nominal::Any.optional.meta(omittable: true)
|
11
13
|
end
|
12
14
|
end
|
13
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
|
data/lib/cocina/models/vocab.rb
CHANGED
@@ -40,10 +40,6 @@ module Cocina
|
|
40
40
|
'http://cocina.sul.stanford.edu/models/file.jsonld'
|
41
41
|
end
|
42
42
|
|
43
|
-
def self.fileset
|
44
|
-
'http://cocina.sul.stanford.edu/models/fileset.jsonld'
|
45
|
-
end
|
46
|
-
|
47
43
|
def self.geo
|
48
44
|
'http://cocina.sul.stanford.edu/models/geo.jsonld'
|
49
45
|
end
|
@@ -95,6 +91,72 @@ module Cocina
|
|
95
91
|
def self.webarchive_seed
|
96
92
|
'http://cocina.sul.stanford.edu/models/webarchive-seed.jsonld'
|
97
93
|
end
|
94
|
+
|
95
|
+
class Resources
|
96
|
+
def self.three_dimensional
|
97
|
+
'http://cocina.sul.stanford.edu/models/resources/3d.jsonld'
|
98
|
+
end
|
99
|
+
|
100
|
+
def self.attachment
|
101
|
+
'http://cocina.sul.stanford.edu/models/resources/attachment.jsonld'
|
102
|
+
end
|
103
|
+
|
104
|
+
def self.audio
|
105
|
+
'http://cocina.sul.stanford.edu/models/resources/audio.jsonld'
|
106
|
+
end
|
107
|
+
|
108
|
+
def self.document
|
109
|
+
'http://cocina.sul.stanford.edu/models/resources/document.jsonld'
|
110
|
+
end
|
111
|
+
|
112
|
+
def self.file
|
113
|
+
'http://cocina.sul.stanford.edu/models/resources/file.jsonld'
|
114
|
+
end
|
115
|
+
|
116
|
+
def self.image
|
117
|
+
'http://cocina.sul.stanford.edu/models/resources/image.jsonld'
|
118
|
+
end
|
119
|
+
|
120
|
+
def self.main_augmented
|
121
|
+
'http://cocina.sul.stanford.edu/models/resources/main-augmented.jsonld'
|
122
|
+
end
|
123
|
+
|
124
|
+
def self.main_original
|
125
|
+
'http://cocina.sul.stanford.edu/models/resources/main-original.jsonld'
|
126
|
+
end
|
127
|
+
|
128
|
+
def self.media
|
129
|
+
'http://cocina.sul.stanford.edu/models/resources/media.jsonld'
|
130
|
+
end
|
131
|
+
|
132
|
+
def self.object
|
133
|
+
'http://cocina.sul.stanford.edu/models/resources/object.jsonld'
|
134
|
+
end
|
135
|
+
|
136
|
+
def self.page
|
137
|
+
'http://cocina.sul.stanford.edu/models/resources/page.jsonld'
|
138
|
+
end
|
139
|
+
|
140
|
+
def self.permissions
|
141
|
+
'http://cocina.sul.stanford.edu/models/resources/permissions.jsonld'
|
142
|
+
end
|
143
|
+
|
144
|
+
def self.preview
|
145
|
+
'http://cocina.sul.stanford.edu/models/resources/preview.jsonld'
|
146
|
+
end
|
147
|
+
|
148
|
+
def self.supplement
|
149
|
+
'http://cocina.sul.stanford.edu/models/resources/supplement.jsonld'
|
150
|
+
end
|
151
|
+
|
152
|
+
def self.thumb
|
153
|
+
'http://cocina.sul.stanford.edu/models/resources/thumb.jsonld'
|
154
|
+
end
|
155
|
+
|
156
|
+
def self.video
|
157
|
+
'http://cocina.sul.stanford.edu/models/resources/video.jsonld'
|
158
|
+
end
|
159
|
+
end
|
98
160
|
end
|
99
161
|
end
|
100
162
|
end
|
data/openapi.yml
CHANGED
@@ -108,6 +108,10 @@ components:
|
|
108
108
|
- 'citation-only'
|
109
109
|
- 'dark'
|
110
110
|
default: 'dark'
|
111
|
+
copyright:
|
112
|
+
description: The human readable copyright statement that applies
|
113
|
+
example: Copyright World Trade Organization
|
114
|
+
type: string
|
111
115
|
readLocation:
|
112
116
|
description: If access is "location-based", which location should have access.
|
113
117
|
type: string
|
@@ -118,6 +122,13 @@ components:
|
|
118
122
|
- 'art'
|
119
123
|
- 'hoover'
|
120
124
|
- 'm&m'
|
125
|
+
useAndReproductionStatement:
|
126
|
+
description: The human readable use and reproduction statement that applies
|
127
|
+
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).
|
128
|
+
type: string
|
129
|
+
license:
|
130
|
+
description: The license governing reuse of the Collection. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
|
131
|
+
type: string
|
121
132
|
AccessRole:
|
122
133
|
description: Access role conferred by an AdminPolicy to objects within it. (used by Argo)
|
123
134
|
type: object
|
@@ -214,7 +225,11 @@ components:
|
|
214
225
|
properties:
|
215
226
|
defaultObjectRights:
|
216
227
|
type: string
|
228
|
+
description: This is an XML expression of the default access (see defaultAccess)
|
229
|
+
deprecated: true
|
217
230
|
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>
|
231
|
+
defaultAccess:
|
232
|
+
$ref: '#/components/schemas/AdminPolicyDefaultAccess'
|
218
233
|
registrationWorkflow:
|
219
234
|
description: When you register an item with this admin policy, these are the workflows that are available.
|
220
235
|
type: array
|
@@ -229,15 +244,70 @@ components:
|
|
229
244
|
type: array
|
230
245
|
items:
|
231
246
|
type: string
|
247
|
+
hasAdminPolicy:
|
248
|
+
$ref: '#/components/schemas/Druid'
|
249
|
+
referencesAgreement:
|
250
|
+
$ref: '#/components/schemas/Druid'
|
232
251
|
roles:
|
233
252
|
description: The access roles conferred by this AdminPolicy (used by Argo)
|
234
253
|
type: array
|
235
254
|
items:
|
236
255
|
$ref: '#/components/schemas/AccessRole'
|
237
|
-
hasAdminPolicy:
|
238
|
-
type: string
|
239
256
|
required:
|
240
257
|
- hasAdminPolicy
|
258
|
+
AdminPolicyDefaultAccess:
|
259
|
+
description: 'Provides the default access settings for an AdminPolicy. This is almost the same as DROAccess, but it provides no defaults and has no embargo.'
|
260
|
+
type: object
|
261
|
+
additionalProperties: false
|
262
|
+
properties:
|
263
|
+
access:
|
264
|
+
type: string
|
265
|
+
enum:
|
266
|
+
- 'world'
|
267
|
+
- 'stanford'
|
268
|
+
- 'location-based'
|
269
|
+
- 'citation-only'
|
270
|
+
- 'dark'
|
271
|
+
controlledDigitalLending:
|
272
|
+
description: Available for controlled digital lending.
|
273
|
+
type: boolean
|
274
|
+
copyright:
|
275
|
+
description: The human readable copyright statement that applies
|
276
|
+
example: Copyright World Trade Organization
|
277
|
+
type: string
|
278
|
+
download:
|
279
|
+
description: >
|
280
|
+
Download access level. This is used in the transition from Fedora as
|
281
|
+
a way to set a default download level at registration that is copied
|
282
|
+
down to all the files.
|
283
|
+
|
284
|
+
type: string
|
285
|
+
enum:
|
286
|
+
- 'world'
|
287
|
+
- 'stanford'
|
288
|
+
- 'location-based'
|
289
|
+
- 'none'
|
290
|
+
readLocation:
|
291
|
+
description: >
|
292
|
+
If access is "location-based", which location should have access.
|
293
|
+
This is used in the transition from Fedora as a way to set a default
|
294
|
+
readLocation at registration that is copied down to all the files.
|
295
|
+
|
296
|
+
type: string
|
297
|
+
enum:
|
298
|
+
- 'spec'
|
299
|
+
- 'music'
|
300
|
+
- 'ars'
|
301
|
+
- 'art'
|
302
|
+
- 'hoover'
|
303
|
+
- 'm&m'
|
304
|
+
useAndReproductionStatement:
|
305
|
+
description: The human readable use and reproduction statement that applies
|
306
|
+
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).
|
307
|
+
type: string
|
308
|
+
license:
|
309
|
+
description: The license governing reuse of the Collection. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
|
310
|
+
type: string
|
241
311
|
AppliesTo:
|
242
312
|
description: Property model for indicating the parts, aspects, or versions of the resource to which a
|
243
313
|
descriptive element is applicable.
|
@@ -248,6 +318,17 @@ components:
|
|
248
318
|
type: array
|
249
319
|
items:
|
250
320
|
$ref: "#/components/schemas/DescriptiveBasicValue"
|
321
|
+
Barcode:
|
322
|
+
description: 'A barcode'
|
323
|
+
oneOf:
|
324
|
+
- $ref: '#/components/schemas/BusinessBarcode'
|
325
|
+
- $ref: '#/components/schemas/CatkeyBarcode'
|
326
|
+
- $ref: '#/components/schemas/StandardBarcode'
|
327
|
+
BusinessBarcode:
|
328
|
+
description: The barcode associated with a business library DRO object, prefixed with 2050
|
329
|
+
type: string
|
330
|
+
pattern: '^2050[0-9]{7}$'
|
331
|
+
example: 20503740296
|
251
332
|
CatalogLink:
|
252
333
|
type: object
|
253
334
|
additionalProperties: false
|
@@ -263,6 +344,11 @@ components:
|
|
263
344
|
description: Record identifier that is unique within the context of the linked record's catalog.
|
264
345
|
type: string
|
265
346
|
example: 11403803
|
347
|
+
CatkeyBarcode:
|
348
|
+
description: The barcode associated with a DRO object based on catkey, prefixed with 36105
|
349
|
+
type: string
|
350
|
+
pattern: '^[0-9]+-[0-9]+$'
|
351
|
+
example: 6772719-1001
|
266
352
|
Collection:
|
267
353
|
description: A group of Digital Repository Objects that indicate some type of conceptual grouping within the domain that is worth reusing across the system.
|
268
354
|
type: object
|
@@ -347,6 +433,11 @@ components:
|
|
347
433
|
valueAt:
|
348
434
|
description: URL or other pointer to the location of the contributor information.
|
349
435
|
type: string
|
436
|
+
parallelContributor:
|
437
|
+
description: For multiple representations of information about the same contributor (e.g. in different languages).
|
438
|
+
type: array
|
439
|
+
items:
|
440
|
+
$ref: "#/components/schemas/DescriptiveParallelContributor"
|
350
441
|
Description:
|
351
442
|
type: object
|
352
443
|
additionalProperties: false
|
@@ -581,6 +672,43 @@ components:
|
|
581
672
|
type: array
|
582
673
|
items:
|
583
674
|
$ref: "#/components/schemas/DescriptiveValue"
|
675
|
+
DescriptiveParallelContributor:
|
676
|
+
description: Value model for multiple representations of information about the same contributor (e.g. in different languages).
|
677
|
+
type: object
|
678
|
+
additionalProperties: false
|
679
|
+
properties:
|
680
|
+
name:
|
681
|
+
description: Names associated with a contributor.
|
682
|
+
type: array
|
683
|
+
items:
|
684
|
+
$ref: "#/components/schemas/DescriptiveValue"
|
685
|
+
type:
|
686
|
+
description: Entity type of the contributor (person, organization, etc.).
|
687
|
+
type: string
|
688
|
+
status:
|
689
|
+
description: Status of the contributor relative to other parallel contributors (e.g. the primary author among a group of contributors).
|
690
|
+
type: string
|
691
|
+
role:
|
692
|
+
description: Relationships of the contributor to the resource or to an event in its history.
|
693
|
+
type: array
|
694
|
+
items:
|
695
|
+
$ref: "#/components/schemas/DescriptiveValue"
|
696
|
+
identifier:
|
697
|
+
description: Identifiers and URIs associated with the contributor entity.
|
698
|
+
type: array
|
699
|
+
items:
|
700
|
+
$ref: "#/components/schemas/DescriptiveValue"
|
701
|
+
note:
|
702
|
+
description: Other information associated with the contributor.
|
703
|
+
type: array
|
704
|
+
items:
|
705
|
+
$ref: "#/components/schemas/DescriptiveValue"
|
706
|
+
valueAt:
|
707
|
+
description: URL or other pointer to the location of the contributor information.
|
708
|
+
type: string
|
709
|
+
valueLanguage:
|
710
|
+
# description: Language of the descriptive element value
|
711
|
+
$ref: "#/components/schemas/DescriptiveValueLanguage"
|
584
712
|
DescriptiveParallelEvent:
|
585
713
|
description: Value model for multiple representations of information about the same event (e.g. in different languages).
|
586
714
|
type: object
|
@@ -767,6 +895,9 @@ components:
|
|
767
895
|
description: The human readable use and reproduction statement that applies
|
768
896
|
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).
|
769
897
|
type: string
|
898
|
+
license:
|
899
|
+
description: The license governing reuse of the DRO. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
|
900
|
+
type: string
|
770
901
|
DROStructural:
|
771
902
|
description: Structural metadata
|
772
903
|
type: object
|
@@ -981,7 +1112,22 @@ components:
|
|
981
1112
|
description: The content type of the Fileset.
|
982
1113
|
type: string
|
983
1114
|
enum:
|
984
|
-
- 'http://cocina.sul.stanford.edu/models/
|
1115
|
+
- 'http://cocina.sul.stanford.edu/models/resources/audio.jsonld'
|
1116
|
+
- 'http://cocina.sul.stanford.edu/models/resources/attachment.jsonld'
|
1117
|
+
- 'http://cocina.sul.stanford.edu/models/resources/document.jsonld'
|
1118
|
+
- 'http://cocina.sul.stanford.edu/models/resources/file.jsonld'
|
1119
|
+
- 'http://cocina.sul.stanford.edu/models/resources/image.jsonld'
|
1120
|
+
- 'http://cocina.sul.stanford.edu/models/resources/main-augmented.jsonld'
|
1121
|
+
- 'http://cocina.sul.stanford.edu/models/resources/main-original.jsonld'
|
1122
|
+
- 'http://cocina.sul.stanford.edu/models/resources/media.jsonld'
|
1123
|
+
- 'http://cocina.sul.stanford.edu/models/resources/object.jsonld'
|
1124
|
+
- 'http://cocina.sul.stanford.edu/models/resources/page.jsonld'
|
1125
|
+
- 'http://cocina.sul.stanford.edu/models/resources/permissions.jsonld'
|
1126
|
+
- 'http://cocina.sul.stanford.edu/models/resources/preview.jsonld'
|
1127
|
+
- 'http://cocina.sul.stanford.edu/models/resources/supplement.jsonld'
|
1128
|
+
- 'http://cocina.sul.stanford.edu/models/resources/3d.jsonld'
|
1129
|
+
- 'http://cocina.sul.stanford.edu/models/resources/thumb.jsonld'
|
1130
|
+
- 'http://cocina.sul.stanford.edu/models/resources/video.jsonld'
|
985
1131
|
externalIdentifier:
|
986
1132
|
type: string
|
987
1133
|
label:
|
@@ -1026,6 +1172,8 @@ components:
|
|
1026
1172
|
type: array
|
1027
1173
|
items:
|
1028
1174
|
$ref: '#/components/schemas/CatalogLink'
|
1175
|
+
barcode:
|
1176
|
+
$ref: '#/components/schemas/Barcode'
|
1029
1177
|
Language:
|
1030
1178
|
description: Languages, scripts, symbolic systems, and notations used in all
|
1031
1179
|
or part of a resource or its descriptive metadata.
|
@@ -1398,7 +1546,22 @@ components:
|
|
1398
1546
|
type:
|
1399
1547
|
type: string
|
1400
1548
|
enum:
|
1401
|
-
- 'http://cocina.sul.stanford.edu/models/
|
1549
|
+
- 'http://cocina.sul.stanford.edu/models/resources/audio.jsonld'
|
1550
|
+
- 'http://cocina.sul.stanford.edu/models/resources/attachment.jsonld'
|
1551
|
+
- 'http://cocina.sul.stanford.edu/models/resources/document.jsonld'
|
1552
|
+
- 'http://cocina.sul.stanford.edu/models/resources/file.jsonld'
|
1553
|
+
- 'http://cocina.sul.stanford.edu/models/resources/image.jsonld'
|
1554
|
+
- 'http://cocina.sul.stanford.edu/models/resources/main-augmented.jsonld'
|
1555
|
+
- 'http://cocina.sul.stanford.edu/models/resources/main-original.jsonld'
|
1556
|
+
- 'http://cocina.sul.stanford.edu/models/resources/media.jsonld'
|
1557
|
+
- 'http://cocina.sul.stanford.edu/models/resources/object.jsonld'
|
1558
|
+
- 'http://cocina.sul.stanford.edu/models/resources/page.jsonld'
|
1559
|
+
- 'http://cocina.sul.stanford.edu/models/resources/permissions.jsonld'
|
1560
|
+
- 'http://cocina.sul.stanford.edu/models/resources/preview.jsonld'
|
1561
|
+
- 'http://cocina.sul.stanford.edu/models/resources/supplement.jsonld'
|
1562
|
+
- 'http://cocina.sul.stanford.edu/models/resources/3d.jsonld'
|
1563
|
+
- 'http://cocina.sul.stanford.edu/models/resources/thumb.jsonld'
|
1564
|
+
- 'http://cocina.sul.stanford.edu/models/resources/video.jsonld'
|
1402
1565
|
label:
|
1403
1566
|
type: string
|
1404
1567
|
version:
|
@@ -1430,6 +1593,8 @@ components:
|
|
1430
1593
|
type: array
|
1431
1594
|
items:
|
1432
1595
|
$ref: '#/components/schemas/CatalogLink'
|
1596
|
+
barcode:
|
1597
|
+
$ref: '#/components/schemas/Barcode'
|
1433
1598
|
required:
|
1434
1599
|
- sourceId
|
1435
1600
|
Sequence:
|
@@ -1509,6 +1674,11 @@ components:
|
|
1509
1674
|
type: string
|
1510
1675
|
source:
|
1511
1676
|
$ref: "#/components/schemas/Source"
|
1677
|
+
StandardBarcode:
|
1678
|
+
description: The standard barcode associated with a DRO object, prefixed with 36105
|
1679
|
+
type: string
|
1680
|
+
pattern: '^36105[0-9]{9}$'
|
1681
|
+
example: 36105010362304
|
1512
1682
|
Title:
|
1513
1683
|
type: object
|
1514
1684
|
additionalProperties: false
|