Sha256: 0e0caf15c88f36d1abf78831af357c44bbdff915dab95f182c81a6192bc2dce9

Contents?: true

Size: 525 Bytes

Versions: 29

Compression:

Stored size: 525 Bytes

Contents

# frozen_string_literal: true

module Spotlight
  module Resources
    # transforms a IiifHarvester into solr documents
    class IiifBuilder < Spotlight::SolrDocumentBuilder
      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
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
blacklight-spotlight-3.0.0.rc3 app/services/spotlight/resources/iiif_builder.rb
blacklight-spotlight-3.0.0.rc2 app/services/spotlight/resources/iiif_builder.rb
blacklight-spotlight-3.0.0.rc1 app/services/spotlight/resources/iiif_builder.rb
blacklight-spotlight-3.0.0.alpha.10 app/services/spotlight/resources/iiif_builder.rb
blacklight-spotlight-3.0.0.alpha.9 app/services/spotlight/resources/iiif_builder.rb
blacklight-spotlight-3.0.0.alpha.8 app/services/spotlight/resources/iiif_builder.rb
blacklight-spotlight-3.0.0.alpha.7 app/services/spotlight/resources/iiif_builder.rb
blacklight-spotlight-3.0.0.alpha.6 app/services/spotlight/resources/iiif_builder.rb
blacklight-spotlight-3.0.0.alpha.5 app/services/spotlight/resources/iiif_builder.rb
blacklight-spotlight-3.0.0.alpha.4 app/services/spotlight/resources/iiif_builder.rb
blacklight-spotlight-3.0.0.alpha.3 app/services/spotlight/resources/iiif_builder.rb
blacklight-spotlight-3.0.0.alpha.2 app/services/spotlight/resources/iiif_builder.rb
blacklight-spotlight-3.0.0.alpha.1 app/services/spotlight/resources/iiif_builder.rb
blacklight-spotlight-2.13.0 app/services/spotlight/resources/iiif_builder.rb
blacklight-spotlight-2.12.1 app/services/spotlight/resources/iiif_builder.rb
blacklight-spotlight-2.12.0 app/services/spotlight/resources/iiif_builder.rb
blacklight-spotlight-2.11.0 app/services/spotlight/resources/iiif_builder.rb
blacklight-spotlight-2.10.0 app/services/spotlight/resources/iiif_builder.rb
blacklight-spotlight-2.9.0 app/services/spotlight/resources/iiif_builder.rb
blacklight-spotlight-2.8.0 app/services/spotlight/resources/iiif_builder.rb