Module: Libis::Tools::Metadata::Mappers::Flandrica
- Includes:
- Kuleuven
- Defined in:
- lib/libis/tools/metadata/mappers/flandrica.rb
Overview
noinspection RubyResolve
Instance Method Summary collapse
- #check_name(_, _) ⇒ Object
- #marc2dc_alternative_240_a(xml) ⇒ Object
- #marc2dc_alternative_240_l(xml) ⇒ Object
- #marc2dc_identifier(xml) ⇒ Object
- #marc2dc_identifier_001(xml) ⇒ Object
- #marc2dc_identifier_040(xml) ⇒ Object
- #marc2dc_source_856(xml) ⇒ Object
- #marc2dc_source_856___(xml) ⇒ Object
Methods included from Kuleuven
Instance Method Details
#check_name(_, _) ⇒ Object
60 61 62 |
# File 'lib/libis/tools/metadata/mappers/flandrica.rb', line 60 def check_name(_,_) true end |
#marc2dc_alternative_240_a(xml) ⇒ Object
33 34 35 36 37 38 |
# File 'lib/libis/tools/metadata/mappers/flandrica.rb', line 33 def marc2dc_alternative_240_a(xml) # [MARC 240 #_ $a] ", " [MARC 240 #_ $f] ", " [MARC 240 #_ $g] ", " tag('240#_', 'a f g').each { |t| xml['dcterms'].alternative element(t._afg, join: ', ', postfix: ', ') } end |
#marc2dc_alternative_240_l(xml) ⇒ Object
40 41 42 43 44 45 |
# File 'lib/libis/tools/metadata/mappers/flandrica.rb', line 40 def marc2dc_alternative_240_l(xml) # [MARC 240 #_ $l] ", " [MARC 240 #_ $m] ", " [MARC 240 #_ $n] ", " [MARC 240 #_ $o] ", " [MARC 240 #_ $p] ", " [MARC 240 #_ $r] ", " [MARC 240 #_ $s] tag('240#_', 'l m n o p r s').each { |t| xml['dcterms'].alternative element(t._lmnoprs, join: ', ') } end |
#marc2dc_identifier(xml) ⇒ Object
14 15 16 17 |
# File 'lib/libis/tools/metadata/mappers/flandrica.rb', line 14 def marc2dc_identifier(xml) Libis::Tools::Metadata::Mappers::Kuleuven.marc2dc_identifier(xml) marc2dc_identifier_040(xml) end |
#marc2dc_identifier_001(xml) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/libis/tools/metadata/mappers/flandrica.rb', line 19 def marc2dc_identifier_001(xml) # "urn:ControlNumber:" [MARC 001] tag('001').each { |t| xml['dc'].identifier element(t.datas, prefix: '') } end |
#marc2dc_identifier_040(xml) ⇒ Object
26 27 28 29 30 31 |
# File 'lib/libis/tools/metadata/mappers/flandrica.rb', line 26 def marc2dc_identifier_040(xml) # [MARC 040 $a] tag('040', 'a').each { |t| xml['dc'].identifier('xsi:type' => 'dcterms:URI').text t._a } end |
#marc2dc_source_856(xml) ⇒ Object
47 48 49 50 51 |
# File 'lib/libis/tools/metadata/mappers/flandrica.rb', line 47 def marc2dc_source_856(xml) marc2dc_source_856__1(xml) marc2dc_source_856__2(xml) marc2dc_source_856___(xml) end |
#marc2dc_source_856___(xml) ⇒ Object
53 54 55 56 57 58 |
# File 'lib/libis/tools/metadata/mappers/flandrica.rb', line 53 def marc2dc_source_856___(xml) # [MARC 856 ## $a] tag('856', 'a').each { |t| xml['dc'].source('xsi:type' => 'dcterms:URI').text element(t._a) } end |