Class: Zizia::PreIngestWork
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- Zizia::PreIngestWork
- Defined in:
- app/models/zizia/pre_ingest_work.rb
Instance Method Summary collapse
-
#title ⇒ String
Returns the title based on the deduplication_key if the work has been indexed to solr.
Instance Method Details
#title ⇒ String
Returns the title based on the deduplication_key if the work has been indexed to solr
8 9 10 11 12 13 14 |
# File 'app/models/zizia/pre_ingest_work.rb', line 8 def title return 'This work does not have a deduplication key.' if deduplication_key.nil? solr_title = ActiveFedora::SolrService.get("deduplication_key_tesim:#{deduplication_key}") .dig('response', 'docs', 0, 'title_tesim', 0) return solr_title unless solr_title.nil? 'This work\'s metadata has not been indexed yet.' end |