Module: BerkeleyLibrary::TIND::Mapping::MatchTindField

Included in:
DataFieldsCatalog, TindMarc
Defined in:
lib/berkeley_library/tind/mapping/match_tind_field.rb

Instance Method Summary collapse

Instance Method Details

#check_abnormal_formated_subfield6(fields) ⇒ Object



27
28
29
# File 'lib/berkeley_library/tind/mapping/match_tind_field.rb', line 27

def check_abnormal_formated_subfield6(fields)
  fields.each { |f| check_subfield6_format(f) if check_subfield6?(f) }
end

#un_matched_fields_880(fields, mms_id) ⇒ Object

return regular fields without matched 880 fields return 880 fields without matched regular fields



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/berkeley_library/tind/mapping/match_tind_field.rb', line 10

def un_matched_fields_880(fields, mms_id)
  unmached_fields = []

  str_arr_from_880 = subfield6_values_from_880_fields(fields)
  str_arr_from_regular = subfield6_values_from_regular_fields(fields)

  fields_tobe_validated = fields_need_880_validation(fields)

  fields_880_tobe_validated = fields_tobe_validated.select { |f| is_880_field?(f) }
  fields_regular_tobe_validated = fields_tobe_validated.reject { |f| is_880_field?(f) }

  unmached_fields.concat un_matched_fields(fields_880_tobe_validated, str_arr_from_regular)
  unmached_fields.concat un_matched_fields(fields_regular_tobe_validated, str_arr_from_880)

  log_warning(unmached_fields, mms_id)
end