Class: DiscoveryIndexer::InputXml::PurlxmlReader
- Inherits:
-
Object
- Object
- DiscoveryIndexer::InputXml::PurlxmlReader
- Defined in:
- lib/discovery-indexer/reader/purlxml_reader.rb
Class Method Summary collapse
-
.read(druid) ⇒ Nokogiri::XML::Document
reads the public xml for the fedora object that is defined , from the purl server.
Class Method Details
.read(druid) ⇒ Nokogiri::XML::Document
reads the public 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/purlxml_reader.rb', line 10 def self.read(druid) purlxml_uri = "#{DiscoveryIndexer::PURL_DEFAULT}/#{druid}.xml" begin Nokogiri::XML(open(purlxml_uri)) rescue raise DiscoveryIndexer::Errors::MissingPurlPage.new(purlxml_uri) end end |