lib/berkeley_library/tind/mapping/tind_control_subfield.rb
# return a mapped datafield based on rule and extract value
return a mapped datafield based on rule and extract value
return a mapped datafield based on rule and extract value
def extracted_field(rule, sub_value)
          subname = rule.subfield_key
          destiantion_tag = rule.tag_destination
          indicator = rule.indicator
          return nil unless subname && destiantion_tag && indicator
          new_sub_value = clean_subfield_value(destiantion_tag, sub_value)
          return nil unless new_sub_value
          new_sub_value = clean_subfield_value(destiantion_tag, sub_value)
          subfields = [Util.subfield(subname, new_sub_value)]
          Util.datafield(destiantion_tag, indicator, subfields)
        end
def extracted_field ( rule , sub_value ) subname = rule . subfield_key destiantion_tag = rule . tag_destination indicator = rule . indicator return nil unless subname && destiantion_tag && indicator new_sub_value = clean_subfield_value ( destiantion_tag , sub_value ) return nil unless new_sub_value new_sub_value = clean_subfield_value ( destiantion_tag , sub_value ) subfields = [ Util . subfield ( subname , new_sub_value ) ] Util . datafield ( destiantion_tag , indicator , subfields ) end
return a mapped datafield based on rule and extract value
return a mapped datafield based on rule and extract value
rule
<not_specific>
sub_value
<not_specific>