Sha256: 517e4ed5b2d4b1620ba6515cfa404f4a1f104f76cc3e97dba22cdc00aa313c03

Contents?: true

Size: 1.08 KB

Versions: 3

Compression:

Stored size: 1.08 KB

Contents

# Scanned Media: Shared Metadata
module NewspaperWorks
  # scanned media metadata for newspaper models (e.g. page, article images)
  module ScannedMediaMetadata
    extend ActiveSupport::Concern

    included do
      # common descriptive metadata properties for scanned media like pages
      # that do not already have implementation in Hyrax::BasicMetadata

      # - Label
      #   (implemented by Hyrax::Metadata as :title, we omit here)
      # - Text direction
      property(
        :text_direction,
        predicate: ::RDF::Vocab::OA.textDirection,
        multiple: false
      ) do |index|
        index.as :stored_searchable
      end

      # - Page Number
      property(
        :page_number,
        predicate: ::RDF::Vocab::SCHEMA.pagination,
        multiple: false
      ) do |index|
        index.as :stored_searchable
      end

      # - Section
      property(
        :section,
        predicate: ::RDF::Vocab::BIBO.section,
        multiple: false
      ) do |index|
        index.as :stored_searchable
      end

      # - Reel # TBD TODO needs predicate TBD
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
newspaper_works-1.0.1 app/models/concerns/newspaper_works/scanned_media_metadata.rb
newspaper_works-1.0.0 app/models/concerns/newspaper_works/scanned_media_metadata.rb
newspaper_works-0.1.0 app/models/concerns/newspaper_works/scanned_media_metadata.rb