Class: Kiba::Extend::Transforms::Marc::ExtractBaseNameData Abstract
- Inherits:
-
Object
- Object
- Kiba::Extend::Transforms::Marc::ExtractBaseNameData
- Includes:
- FieldLinkable
- Defined in:
- lib/kiba/extend/transforms/marc/extract_base_name_data.rb
Overview
This class is abstract.
Base class with shared name extraction behaviors
Direct Known Subclasses
ExtractMeetingNameData, ExtractOrgNameData, ExtractPersonNameData
Instance Method Summary collapse
-
#initialize(name_type:, name_fields:, name_subfields:, role_code_subfields:, role_term_subfields:, id_target: Kiba::Extend::Marc.id_target_field, name_target: Kiba::Extend::Marc.name_target, role_term_target: Kiba::Extend::Marc.role_term_target, role_code_target: Kiba::Extend::Marc.role_code_target, field_tag_target: Kiba::Extend::Marc.field_tag_target, name_type_target: Kiba::Extend::Marc.name_type_target, delim: Kiba::Extend.delim) ⇒ ExtractBaseNameData
constructor
A new instance of ExtractBaseNameData.
-
#process(record) ⇒ Hash{ Symbol => String, nil }
Methods included from FieldLinkable
Constructor Details
#initialize(name_type:, name_fields:, name_subfields:, role_code_subfields:, role_term_subfields:, id_target: Kiba::Extend::Marc.id_target_field, name_target: Kiba::Extend::Marc.name_target, role_term_target: Kiba::Extend::Marc.role_term_target, role_code_target: Kiba::Extend::Marc.role_code_target, field_tag_target: Kiba::Extend::Marc.field_tag_target, name_type_target: Kiba::Extend::Marc.name_type_target, delim: Kiba::Extend.delim) ⇒ ExtractBaseNameData
Returns a new instance of ExtractBaseNameData.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/kiba/extend/transforms/marc/extract_base_name_data.rb', line 35 def initialize(name_type:, name_fields:, name_subfields:, role_code_subfields:, role_term_subfields:, id_target: Kiba::Extend::Marc.id_target_field, name_target: Kiba::Extend::Marc.name_target, role_term_target: Kiba::Extend::Marc.role_term_target, role_code_target: Kiba::Extend::Marc.role_code_target, field_tag_target: Kiba::Extend::Marc.field_tag_target, name_type_target: Kiba::Extend::Marc.name_type_target, delim: Kiba::Extend.delim) @name_type = name_type @id_target = id_target @name_target = name_target @role_term_target = role_term_target @role_code_target = role_code_target @field_tag_target = field_tag_target @name_type_target = name_type_target @name_fields = name_fields @name_subfields = name_subfields @role_term_subfields = role_term_subfields @role_code_subfields = role_code_subfields @delim = delim @idextractor = Kiba::Extend::Utils::MarcIdExtractor.new @namecleaner = Kiba::Extend::Utils::MarcNameCleaner.new @roletermcleaner = Kiba::Extend::Utils::MarcRoleTermCleaner.new end |
Instance Method Details
#process(record) ⇒ Hash{ Symbol => String, nil }
63 64 65 66 67 68 69 |
# File 'lib/kiba/extend/transforms/marc/extract_base_name_data.rb', line 63 def process(record) prepare_rows(record).each do |row| yield row end nil end |