Module: ASpaceMappings::MARC21

Defined in:
backend/app/exporters/lib/utils.rb,
backend/app/converters/lib/utils.rb

Class Method Summary collapse

Class Method Details

.get_aspace_source_code(code) ⇒ Object



199
200
201
202
203
204
205
206
207
208
209
210
# File 'backend/app/converters/lib/utils.rb', line 199

def self.get_aspace_source_code(code)
  case code.to_s
  when '0'; 'lcsh'
  when '1'; 'lcshac'
  when '2'; 'mesh'
  when '3'; 'nal'
  when '4'; 'ingest'
  when '5'; 'cash'
  when '6'; 'rvm'
  else; nil
  end
end

.get_marc_source_code(code) ⇒ Object



65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'backend/app/exporters/lib/utils.rb', line 65

def self.get_marc_source_code(code)
  marc_code = case code
              when 'naf', 'lcsh', 'lcnaf'; 0
              when 'lcshac'; 1
              when 'mesh'; 2
              when 'nal'; 3
              when nil; 4
              when 'cash'; 5
              when 'rvm'; 6
              else; 7
              end

  marc_code.to_s
end