Class: IsoDoc::CC::Metadata
- Inherits:
-
Generic::Metadata
- Object
- Generic::Metadata
- IsoDoc::CC::Metadata
- Defined in:
- lib/isodoc/cc/metadata.rb
Instance Method Summary collapse
- #author(isoxml, _out) ⇒ Object
- #configuration ⇒ Object
-
#initialize(lang, script, labels) ⇒ Metadata
constructor
A new instance of Metadata.
- #personal_authors(isoxml) ⇒ Object
- #subtitle(_isoxml, _out) ⇒ Object
- #title(isoxml, _out) ⇒ Object
Constructor Details
#initialize(lang, script, labels) ⇒ Metadata
Returns a new instance of Metadata.
11 12 13 14 |
# File 'lib/isodoc/cc/metadata.rb', line 11 def initialize(lang, script, labels) super set(:tc, "XXXX") end |
Instance Method Details
#author(isoxml, _out) ⇒ Object
25 26 27 28 29 |
# File 'lib/isodoc/cc/metadata.rb', line 25 def (isoxml, _out) tc = isoxml.at(ns("//bibdata/ext/editorialgroup/committee")) set(:tc, tc.text) if tc super end |
#configuration ⇒ Object
7 8 9 |
# File 'lib/isodoc/cc/metadata.rb', line 7 def configuration Metanorma::CC.configuration end |
#personal_authors(isoxml) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/isodoc/cc/metadata.rb', line 31 def (isoxml) persons = {} roles = isoxml.xpath(ns("//bibdata/contributor/role/@type")). inject([]) { |m, t| m << t.value } roles.uniq.sort.each do |r| names = isoxml.xpath(ns("//bibdata/contributor[role/@type = '#{r}']"\ "/person")) persons[r] = extract_person_names_affiliations(names) unless names.empty? end set(:roles_authors_affiliations, persons) super end |
#subtitle(_isoxml, _out) ⇒ Object
21 22 23 |
# File 'lib/isodoc/cc/metadata.rb', line 21 def subtitle(_isoxml, _out) nil end |
#title(isoxml, _out) ⇒ Object
16 17 18 19 |
# File 'lib/isodoc/cc/metadata.rb', line 16 def title(isoxml, _out) main = isoxml&.at(ns("//bibdata/title[@language='en']"))&.text set(:doctitle, main) end |