Sha256: 3c28557373d19b5f592d819455fd92f501375b972533741e7e5c46cea522c5e9

Contents?: true

Size: 665 Bytes

Versions: 3

Compression:

Stored size: 665 Bytes

Contents

module BlacklightOaiProvider
  class SolrDocumentProvider < ::OAI::Provider::Base
    attr_accessor :options

    def initialize(controller, options = {})
      options[:provider] ||= {}
      options[:document] ||= {}

      self.class.model = SolrDocumentWrapper.new(controller, options[:document])

      options[:repository_name] ||= controller.view_context.send(:application_name)
      options[:repository_url] ||= controller.view_context.send(:oai_provider_url)

      options[:provider].each do |k, v|
        self.class.send k, v
      end
    end

    def list_sets(options = {})
      Response::ListSets.new(self.class, options).to_xml
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blacklight_oai_provider-5.1.0 lib/blacklight_oai_provider/solr_document_provider.rb
blacklight_oai_provider-5.0.0 lib/blacklight_oai_provider/solr_document_provider.rb
blacklight_oai_provider-5.0.0.pre1 lib/blacklight_oai_provider/solr_document_provider.rb