Sha256: 33157fcb95e3af006cc4cf5c526b5cd78fc41d14670a4542af0a8d1902dfab91

Contents?: true

Size: 1.29 KB

Versions: 29

Compression:

Stored size: 1.29 KB

Contents

# frozen_string_literal: true
module Hyrax
  # These are the metadata elements that Hyrax internally requires of
  # all managed Collections, Works and FileSets will have.
  module CoreMetadata
    extend ActiveSupport::Concern

    included do
      property :depositor, predicate: ::RDF::URI.new('http://id.loc.gov/vocabulary/relators/dpt'), multiple: false do |index|
        index.as :symbol, :stored_searchable
      end

      property :title, predicate: ::RDF::Vocab::DC.title do |index|
        index.as :stored_searchable, :facetable
      end

      def first_title
        title.first
      end

      # We reserve date_uploaded for the original creation date of the record.
      # For example, when migrating data from a fedora3 repo to fedora4,
      # fedora's system created date will reflect the date when the record
      # was created in fedora4, but the date_uploaded will preserve the
      # original creation date from the old repository.
      property :date_uploaded, predicate: ::RDF::Vocab::DC.dateSubmitted, multiple: false do |index|
        index.type :date
        index.as :stored_sortable
      end

      property :date_modified, predicate: ::RDF::Vocab::DC.modified, multiple: false do |index|
        index.type :date
        index.as :stored_sortable
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
hyrax-5.1.0.pre.beta1 app/models/concerns/hyrax/core_metadata.rb
hyrax-5.0.4 app/models/concerns/hyrax/core_metadata.rb
hyrax-5.0.3 app/models/concerns/hyrax/core_metadata.rb
hyrax-5.0.2 app/models/concerns/hyrax/core_metadata.rb
hyrax-5.0.1 app/models/concerns/hyrax/core_metadata.rb
hyrax-5.0.0 app/models/concerns/hyrax/core_metadata.rb
hyrax-5.0.0.rc3 app/models/concerns/hyrax/core_metadata.rb
hyrax-5.0.0.rc2 app/models/concerns/hyrax/core_metadata.rb
hyrax-5.0.0.rc1 app/models/concerns/hyrax/core_metadata.rb
hyrax-3.6.0 app/models/concerns/hyrax/core_metadata.rb
hyrax-4.0.0 app/models/concerns/hyrax/core_metadata.rb
hyrax-4.0.0.rc3 app/models/concerns/hyrax/core_metadata.rb
hyrax-4.0.0.rc2 app/models/concerns/hyrax/core_metadata.rb
hyrax-4.0.0.rc1 app/models/concerns/hyrax/core_metadata.rb
hyrax-3.5.0 app/models/concerns/hyrax/core_metadata.rb
hyrax-4.0.0.beta2 app/models/concerns/hyrax/core_metadata.rb
hyrax-3.4.2 app/models/concerns/hyrax/core_metadata.rb
hyrax-4.0.0.beta1 app/models/concerns/hyrax/core_metadata.rb
hyrax-3.4.1 app/models/concerns/hyrax/core_metadata.rb
hyrax-3.4.0 app/models/concerns/hyrax/core_metadata.rb