Class: DiscoveryIndexer::InputXml::Purlxml
- Inherits:
-
Object
- Object
- DiscoveryIndexer::InputXml::Purlxml
- Defined in:
- lib/discovery-indexer/reader/purlxml.rb
Overview
Main model class to access the parsed purl xml retrieved from PURL server
then you can access the bits of interest
model.collection_druids
Instance Method Summary collapse
-
#initialize(druid) ⇒ Purlxml
constructor
initializes a new object.
-
#load ⇒ PurlxmlModel
loads the purl xml to purlxml model for the fedora object defind in the druid, it reads the purl xml once from PURL server, and repeat the parsing with each call.
Constructor Details
#initialize(druid) ⇒ Purlxml
initializes a new object
13 14 15 16 17 |
# File 'lib/discovery-indexer/reader/purlxml.rb', line 13 def initialize(druid) @druid = druid @purlxml_ng_doc = nil @populated_model = nil end |
Instance Method Details
#load ⇒ PurlxmlModel
loads the purl xml to purlxml model for the fedora object defind in the druid, it reads the purl xml once from PURL server, and repeat the parsing with each call
22 23 24 25 |
# File 'lib/discovery-indexer/reader/purlxml.rb', line 22 def load @purlxml_ng_doc ||= PurlxmlReader.read(@druid) @populated_model ||= PurlxmlParserStrict.new(@druid, @purlxml_ng_doc).parse end |