Class: BerkeleyLibrary::TIND::Mapping::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/berkeley_library/tind/mapping/config.rb

Class Method Summary collapse

Class Method Details

.clean_tagsObject



26
27
28
# File 'lib/berkeley_library/tind/mapping/config.rb', line 26

def clean_tags
  %w[245 260 300].freeze
end

.collection_subfield_namesObject



30
31
32
33
34
35
36
37
38
# File 'lib/berkeley_library/tind/mapping/config.rb', line 30

def collection_subfield_names
  {
    '336' => ['a'],
    '852' => ['c'],
    '980' => ['a'],
    '982' => ['a', 'b'],
    '991' => ['a']
  }.freeze
end

.no_duplicated_tagsObject



18
19
20
# File 'lib/berkeley_library/tind/mapping/config.rb', line 18

def no_duplicated_tags
  %w[245 260 852 901 902 980].freeze
end

.one_to_multiple_map_fileObject



14
15
16
# File 'lib/berkeley_library/tind/mapping/config.rb', line 14

def one_to_multiple_map_file
  ENV.fetch('ONE_TO_ONE_MAP_FILE', File.expand_path('data/one_to_multiple_mapping.csv', __dir__))
end

.one_to_one_map_fileObject



10
11
12
# File 'lib/berkeley_library/tind/mapping/config.rb', line 10

def one_to_one_map_file
  ENV.fetch('ONE_TO_ONE_MAP_FILE', File.expand_path('data/one_to_one_mapping.csv', __dir__))
end

.punctuationsObject



22
23
24
# File 'lib/berkeley_library/tind/mapping/config.rb', line 22

def punctuations
  %w[, : ; / =].freeze
end