Class: DiscoveryIndexer::InputXml::ModsxmlReader
- Inherits:
-
Object
- Object
- DiscoveryIndexer::InputXml::ModsxmlReader
- Defined in:
- lib/discovery-indexer/reader/modsxml_reader.rb
Class Method Summary collapse
-
.read(druid) ⇒ Nokogiri::XML::Document
reads the mods xml for the fedora object that is defined , from the purl server.
Class Method Details
.read(druid) ⇒ Nokogiri::XML::Document
reads the mods xml for the fedora object that is defined , from the purl server
10 11 12 13 14 15 16 17 |
# 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 |