class DiscoveryIndexer::InputXml::ModsxmlReader
Public Class Methods
read(druid)
click to toggle source
reads the mods xml for the fedora object that is defined , from the purl server @param [String] druid e.g. ab123cd4567 @return [Nokogiri::XML::Document] the mods xml for the fedora object @raise [MissingModsXml] if there's no mods xml available for this druid
# File lib/discovery-indexer/reader/modsxml_reader.rb, line 10 def self.read(druid) mods_uri = "#{DiscoveryIndexer::PURL_DEFAULT}/#{druid}.mods" begin Nokogiri::XML(open(mods_uri)) rescue raise DiscoveryIndexer::Errors::MissingModsPage.new(mods_uri) end end