Sha256: ef18618de1489ffe9fc70b9b927a32606bb86017997028a633071238a441d372

Contents?: true

Size: 1.13 KB

Versions: 10

Compression:

Stored size: 1.13 KB

Contents

module Hyrax
  module RequiredMetadata
    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

10 entries across 10 versions & 2 rubygems

Version Path
hyrax-1.1.1 app/models/concerns/hyrax/required_metadata.rb
hyrax-1.1.0 app/models/concerns/hyrax/required_metadata.rb
hyrax-1.0.5 app/models/concerns/hyrax/required_metadata.rb
hyrax-1.0.4 app/models/concerns/hyrax/required_metadata.rb
hyrax-1.0.3 app/models/concerns/hyrax/required_metadata.rb
hyrax-1.0.2 app/models/concerns/hyrax/required_metadata.rb
hyrax-1.0.1 app/models/concerns/hyrax/required_metadata.rb
hyrax-1.0.0.rc2 app/models/concerns/hyrax/required_metadata.rb
hyrax-1.0.0.rc1 app/models/concerns/hyrax/required_metadata.rb
test_hyrax-0.0.1.alpha app/models/concerns/hyrax/required_metadata.rb