Sha256: e07bb741ce1663bf117d006bb927ff9d982ce0edc72978eab4617757b77ef054

Contents?: true

Size: 1.46 KB

Versions: 1

Compression:

Stored size: 1.46 KB

Contents

class MockCurationConcern < ActiveFedora::Base
  class MetadataDatastream < ActiveFedora::NtriplesRDFDatastream
    map_predicates do |map|
      map.title(in: RDF::DC) do |index|
        index.as :searchable, :displayable
      end
      map.created(in: RDF::DC)
      map.creator(in: RDF::DC) do |index|
        index.as :searchable, :facetable, :displayable
      end
      map.date_uploaded(to: "dateSubmitted", in: RDF::DC) do |index|
        index.type :date
        index.as :searchable, :displayable, :sortable
      end
      map.date_modified(to: "modified", in: RDF::DC) do |index|
        index.type :date
        index.as :searchable, :displayable, :sortable
      end
      map.part(:to => "hasPart", in: RDF::DC)
      map.archived_object_type({in: RDF::DC, to: 'type'}) do |index|
        index.as :searchable, :displayable, :facetable
      end
      map.identifier({in: RDF::DC})
    end
  end

  include CurationConcern::Model
  include CurationConcern::WithGenericFiles
  include CurationConcern::Embargoable
  include CurationConcern::WithAccessRight

  has_metadata name: "properties", type: PropertiesDatastream, control_group: 'M'
  delegate_to :properties, [:relative_path, :depositor], unique: true

  has_metadata name: "descMetadata", type: MockCurationConcern::MetadataDatastream, control_group: 'M'

  delegate_to(
    :descMetadata,
    [
      :title,
      :date_uploaded,
      :date_modified,
      :creator,
      :identifier
    ],
    unique: true
  )

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
curate-0.1.1 spec/support/mock_curation_concern.rb