Class: Spotlight::Resources::IiifBuilder
- Inherits:
-
SolrDocumentBuilder
- Object
- SolrDocumentBuilder
- Spotlight::Resources::IiifBuilder
- Defined in:
- app/services/spotlight/resources/iiif_builder.rb
Overview
transforms a IiifHarvester into solr documents
Instance Attribute Summary
Attributes inherited from SolrDocumentBuilder
Instance Method Summary collapse
Methods inherited from SolrDocumentBuilder
#documents_to_index, #initialize
Constructor Details
This class inherits a constructor from Spotlight::SolrDocumentBuilder
Instance Method Details
#to_solr ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'app/services/spotlight/resources/iiif_builder.rb', line 5 def to_solr return to_enum(:to_solr) { 0 } unless block_given? base_doc = super resource.iiif_manifests.each do |manifest| manifest.with_exhibit(exhibit) manifest_solr = manifest.to_solr yield base_doc.merge(manifest_solr) if manifest_solr.present? end end |