Class: IsoDoc::Plateau::Metadata

Inherits:
Jis::Metadata
  • Object
show all
Defined in:
lib/isodoc/plateau/metadata.rb

Instance Method Summary collapse

Instance Method Details

#bibdate(xml, _out) ⇒ Object



11
12
13
14
15
16
# File 'lib/isodoc/plateau/metadata.rb', line 11

def bibdate(xml, _out)
  super
  d = get[:publisheddate] or return
  lbl = @i18n.l10n(@i18n.published_date_labelled.sub("%", d))
  set(:published_date_labelled, lbl)
end

#docid(xml, _out) ⇒ Object



4
5
6
7
8
9
# File 'lib/isodoc/plateau/metadata.rb', line 4

def docid(xml, _out)
  id = xml.at(ns("//bibdata/docidentifier[@type = 'PLATEAU']"))&.text or
    return
  set(:docnumber, id)
  set(:docnumber_undated, id.sub(/:\d{4}$/, ""))
end