Module: BlacklightOaiProvider::SolrDocument

Extended by:
ActiveSupport::Concern
Defined in:
app/models/concerns/blacklight_oai_provider/solr_document.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#setsObject



15
16
17
# File 'app/models/concerns/blacklight_oai_provider/solr_document.rb', line 15

def sets
  BlacklightOaiProvider::SolrSet.sets_for(self)
end

#timestampObject



5
6
7
8
9
# File 'app/models/concerns/blacklight_oai_provider/solr_document.rb', line 5

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

#to_oai_dcObject



11
12
13
# File 'app/models/concerns/blacklight_oai_provider/solr_document.rb', line 11

def to_oai_dc
  export_as('oai_dc_xml')
end