Sha256: 7c31f8315a6058cca30fcb6af5f1187c0dcc004410c07cf9ada7271fe2d916f5

Contents?: true

Size: 1.68 KB

Versions: 2

Compression:

Stored size: 1.68 KB

Contents

require File.expand_path('../../../lib/rdf/qualified_dc', __FILE__)
require File.expand_path('../../../lib/rdf/image', __FILE__)
class ImageMetadata < ActiveFedora::NtriplesRDFDatastream
  map_predicates do |map|
    map.title(in: RDF::DC) do |index|
      index.as :stored_searchable
    end

    map.creator(in: RDF::DC) do |index|
      index.as :stored_searchable
    end

    map.date_created(:to => "date#created", :in => RDF::QualifiedDC) do |index|
      index.type :date
      index.as :stored_searchable
    end

    map.description(in: RDF::DC) do |index|
      index.as :stored_searchable
    end

    map.location(in: RDF::Image)
    map.category(in: RDF::Image)
    map.measurements(in: RDF::Image)
    map.material(in: RDF::Image)
    map.source(in: RDF::Image)
    map.inscription(in: RDF::Image)
    map.StateEdition(in: RDF::Image)
    map.textref(to: 'TEXTREF', in: RDF::Image)
    map.cultural_context(in: RDF::Image)
    map.style_period(in: RDF::Image)
    map.technique(in: RDF::Image)

    map.publisher(in: RDF::DC) do |index|
      index.as :stored_searchable, :facetable
    end
    map.rights(in: RDF::DC) do |index|
      index.as :stored_searchable, :facetable
    end
    map.format(in: RDF::QualifiedDC, to: 'format#mimetype')
    map.date_uploaded(to: "dateSubmitted", in: RDF::DC) do |index|
      index.type :date
      index.as :stored_searchable, :sortable
    end
    map.date_modified(to: "modified", in: RDF::DC) do |index|
      index.type :date
      index.as :stored_searchable, :sortable
    end
    map.identifier(in: RDF::DC)
    map.doi(to: "identifier#doi", in: RDF::QualifiedDC)

    map.subject(in: RDF::DC) do |index|
      index.as :stored_searchable
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
curate-0.5.0 app/repository_datastreams/image_metadata.rb
curate-0.4.2 app/repository_datastreams/image_metadata.rb