Sha256: ae999bc278af7f1867cb98326a0eac3aa83aca1926332027b925d914570fd29c

Contents?: true

Size: 1.77 KB

Versions: 28

Compression:

Stored size: 1.77 KB

Contents

# frozen_string_literal: true

module Cocina
  module Models
    # Collection with addition object metadata.
    class CollectionWithMetadata < Struct
      include Validatable

      include Checkable

      TYPES = ['https://cocina.sul.stanford.edu/models/collection',
               'https://cocina.sul.stanford.edu/models/curated-collection',
               'https://cocina.sul.stanford.edu/models/user-collection',
               'https://cocina.sul.stanford.edu/models/exhibit',
               'https://cocina.sul.stanford.edu/models/series'].freeze

      # The version of Cocina with which this object conforms.
      # example: 1.2.3
      attribute :cocinaVersion, CocinaVersion.default(VERSION)
      # The content type of the Collection. Selected from an established set of values.
      attribute :type, Types::Strict::String.enum(*CollectionWithMetadata::TYPES)
      # example: druid:bc123df4567
      attribute :externalIdentifier, Druid
      # Primary processing label (can be same as title) for a Collection.
      attribute :label, Types::Strict::String
      # Version for the Collection within SDR.
      attribute :version, Types::Strict::Integer
      attribute(:access, CollectionAccess.default { CollectionAccess.new })
      attribute(:administrative, Administrative.default { Administrative.new })
      attribute(:description, Description.default { Description.new })
      attribute(:identification, CollectionIdentification.default { CollectionIdentification.new })
      # When the object was created.
      attribute? :created, Types::Params::DateTime
      # When the object was modified.
      attribute? :modified, Types::Params::DateTime
      # Key for optimistic locking. The contents of the key is not specified.
      attribute :lock, Types::Strict::String
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
cocina-models-0.100.0 lib/cocina/models/collection_with_metadata.rb
cocina-models-0.99.4 lib/cocina/models/collection_with_metadata.rb
cocina-models-0.99.3 lib/cocina/models/collection_with_metadata.rb
cocina-models-0.99.2 lib/cocina/models/collection_with_metadata.rb
cocina-models-0.99.1 lib/cocina/models/collection_with_metadata.rb
cocina-models-0.99.0 lib/cocina/models/collection_with_metadata.rb
cocina-models-0.98.1 lib/cocina/models/collection_with_metadata.rb
cocina-models-0.98.0 lib/cocina/models/collection_with_metadata.rb
cocina-models-0.96.0 lib/cocina/models/collection_with_metadata.rb
cocina-models-0.95.1 lib/cocina/models/collection_with_metadata.rb
cocina-models-0.95.0 lib/cocina/models/collection_with_metadata.rb
cocina-models-0.94.2 lib/cocina/models/collection_with_metadata.rb
cocina-models-0.94.1 lib/cocina/models/collection_with_metadata.rb
cocina-models-0.94.0 lib/cocina/models/collection_with_metadata.rb
cocina-models-0.93.1 lib/cocina/models/collection_with_metadata.rb
cocina-models-0.93.0 lib/cocina/models/collection_with_metadata.rb
cocina-models-0.92.0 lib/cocina/models/collection_with_metadata.rb
cocina-models-0.91.4 lib/cocina/models/collection_with_metadata.rb
cocina-models-0.91.3 lib/cocina/models/collection_with_metadata.rb
cocina-models-0.91.2 lib/cocina/models/collection_with_metadata.rb