Class: Puree::XMLExtractor::Journal

Inherits:
Resource show all
Defined in:
lib/puree/xml_extractor/journal.rb

Overview

Journal XML extractor.

Instance Method Summary collapse

Methods inherited from Resource

#created, #get_data?, #locale, #modified, #uuid, #xpath_query

Methods inherited from Base

#xpath_query_for_multi_value, #xpath_query_for_single_value

Constructor Details

#initialize(xml:) ⇒ Journal

Returns a new instance of Journal.



9
10
11
12
# File 'lib/puree/xml_extractor/journal.rb', line 9

def initialize(xml:)
  super
  @resource_type = :journal
end

Instance Method Details

#issnString?

Returns:

  • (String, nil)


15
16
17
# File 'lib/puree/xml_extractor/journal.rb', line 15

def issn
  xpath_query_for_single_value '/issns/issn/string'
end

#publisherString?

Returns:

  • (String, nil)


20
21
22
# File 'lib/puree/xml_extractor/journal.rb', line 20

def publisher
  xpath_query_for_single_value '/publisher/name'
end

#titleString?

Returns:

  • (String, nil)


25
26
27
# File 'lib/puree/xml_extractor/journal.rb', line 25

def title
  xpath_query_for_single_value '/titles/title/string'
end