lib/berkeley_library/tind/mapping/tind_field_util.rb
# To check TIND datafield and the specific subfield  from rule existed
To check TIND datafield and the specific subfield  from rule existed
To check TIND datafield and the specific subfield from rule existed
def tindfield_subfield_existed?(field, fields)
          return false unless field_has_rule?(field)
          field_rule = rule(field)
          return false unless pre_existed_tag_subfield_in_rule?(field_rule)
          tag_subfield = field_rule.pre_existed_tag_subfield
          mapping_to_tag = tag_subfield[0]
          return false unless map_to_tag_existed_in_fields?(field, fields, mapping_to_tag)
          existed_datafield = field_pre_existed(mapping_to_tag, field, fields)
          return false unless existed_datafield
          subfield_name = tag_subfield[1]
          existed_datafield[subfield_name] ? true : false
        end
def tindfield_subfield_existed? ( field , fields ) return false unless field_has_rule? ( field ) field_rule = rule ( field ) return false unless pre_existed_tag_subfield_in_rule? ( field_rule ) tag_subfield = field_rule . pre_existed_tag_subfield mapping_to_tag = tag_subfield [ 0 ] return false unless map_to_tag_existed_in_fields? ( field , fields , mapping_to_tag ) existed_datafield = field_pre_existed ( mapping_to_tag , field , fields ) return false unless existed_datafield subfield_name = tag_subfield [ 1 ] existed_datafield [ subfield_name ] ? true : false end
To check TIND datafield and the specific subfield  from rule existed
To check TIND datafield and the specific subfield from rule existed
field
<not_specific>
fields
<not_specific>