Sha256: a11ab943964f4706fea38b4af39a92f5c6c631c247db2cbf7cd67db18a8f9579

Contents?: true

Size: 780 Bytes

Versions: 5

Compression:

Stored size: 780 Bytes

Contents

# frozen_string_literal: true

require_dependency 'hyrax/collection_name'

module Hyrax
  ##
  # Valkyrie model for Collection domain objects in the Hydra Works model.
  class PcdmCollection < Hyrax::Resource
    include Hyrax::Schema(:core_metadata)
    include Hyrax::Schema(:basic_metadata)

    attribute :collection_type_gid, Valkyrie::Types::String
    attribute :member_ids, Valkyrie::Types::Array.of(Valkyrie::Types::ID).meta(ordered: true)

    ##
    # @api private
    #
    # @return [Class] an ActiveModel::Name compatible class
    def self._hyrax_default_name_class
      Hyrax::CollectionName
    end

    ##
    # @return [Boolean] true
    def collection?
      true
    end

    ##
    # @return [Boolean] true
    def pcdm_object?
      true
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
hyrax-3.0.2 app/models/hyrax/pcdm_collection.rb
hyrax-3.0.1 app/models/hyrax/pcdm_collection.rb
hyrax-3.0.0 app/models/hyrax/pcdm_collection.rb
hyrax-3.0.0.pre.rc4 app/models/hyrax/pcdm_collection.rb
hyrax-3.0.0.pre.rc3 app/models/hyrax/pcdm_collection.rb