Class: DiscoveryIndexer::InputXml::PurlxmlReader
- Inherits:
-
Object
- Object
- DiscoveryIndexer::InputXml::PurlxmlReader
- Defined in:
- lib/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 18 19 |
# File 'lib/reader/purlxml_reader.rb', line 10 def self.read(druid) purlxml_uri = "#{DiscoveryIndexer::PURL_DEFAULT}/#{druid}.xml" begin purlxml_object = Nokogiri::XML(open(purlxml_uri)) return purlxml_object rescue raise DiscoveryIndexer::Errors::MissingPurlPage.new(purlxml_uri) end end |