Sha256: d1dbf8fe8a7ba3f855f7e787cac9aaa4cfe1c19211c687e6f3c7d03cb6be5243
Contents?: true
Size: 599 Bytes
Versions: 7
Compression:
Stored size: 599 Bytes
Contents
module BlacklightOaiProvider module SolrDocument extend ActiveSupport::Concern def timestamp timestamp = fetch(self.class.timestamp_key, nil) raise BlacklightOaiProvider::Exceptions::MissingTimestamp if timestamp.blank? Time.zone.parse(timestamp) # Solr timestamps are all in UTC. end def to_oai_dc export_as('oai_dc_xml') end def sets BlacklightOaiProvider::SolrSet.sets_for(self) end module ClassMethods attr_writer :timestamp_key def timestamp_key @timestamp_key ||= 'timestamp' end end end end
Version data entries
7 entries across 7 versions & 1 rubygems