lib/harvestdor/indexer.rb in harvestdor-indexer-2.4.0 vs lib/harvestdor/indexer.rb in harvestdor-indexer-2.5.0

- old
+ new

@@ -18,10 +18,11 @@ require 'active_support/benchmarkable' module Harvestdor # Base class to harvest from DOR via harvestdor gem and then index class Indexer require 'harvestdor/indexer/metrics' + require 'harvestdor/indexer/purl_fetcher' require 'harvestdor/indexer/resource' require 'harvestdor/indexer/solr' include ActiveSupport::Benchmarkable @@ -140,10 +141,16 @@ def dor_fetcher_client @dor_fetcher_client ||= DorFetcher::Client.new(config.dor_fetcher) end + def purl_fetcher_client + return unless config.purl_fetcher + + @purl_fetcher_client ||= Harvestdor::Indexer::PurlFetcher.new(config.purl_fetcher) + end + def solr @solr ||= Harvestdor::Indexer::Solr.new self, config.solr.to_hash end protected #--------------------------------------------------------------------- @@ -165,6 +172,6 @@ msg = 'Unable to find list of druids at ' + path logger.fatal msg raise msg end end # Indexer class -end # Harvestdor module \ No newline at end of file +end # Harvestdor module