Class: EACConverter

Inherits:
Converter show all
Extended by:
EACBaseMap
Includes:
ASpaceImport::XML::DOM
Defined in:
backend/app/converters/eac_converter.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from EACBaseMap

EAC_BASE_MAP, agent_bioghist_note_map, agent_citation_note_map, agent_conventions_declaration_map, agent_corporate_entity_base, agent_corporate_entity_name_components_map, agent_corporate_entity_name_map, agent_corporate_entity_name_with_parallel_map, agent_date_range_map, agent_date_single_map, agent_family_base, agent_family_name_components_map, agent_family_name_map, agent_family_name_with_parallel_map, agent_function_map, agent_general_context_note_map, agent_identifier_map, agent_languages_map, agent_legal_status_note_map, agent_maintenance_history_map, agent_mandate_note_map, agent_occupation_map, agent_other_record_identifiers_map, agent_person_base, agent_person_gender_map, agent_person_name_components_map, agent_person_name_map, agent_person_name_with_parallel_map, agent_place_map, agent_record_control_map, agent_record_identifiers_map, agent_set_component_map, agent_sources_map, agent_structure_note_map, agent_text_note_map, agent_topic_map, base_map_subfields, citation_subnote_map, corp_match?, create_chron_item, cv_maint_status, cv_pub_status, fam_match?, find_description_note, find_relationship, format_content, hierarchical_relationship, name_map, pers_match?, related_agent_map, related_resource_map, specific_relationship, subject_map, subject_terms_map

Methods included from ASpaceImport::XML::DOM

#config, included, #object, #process_field, #run

Methods inherited from Converter

for, #get_output_path, inherited, #initialize, list_import_types, register_converter, #remove_files, #run

Constructor Details

This class inherits a constructor from Converter

Class Method Details

.import_types(show_hidden = false) ⇒ Object



26
27
28
29
30
31
32
33
# File 'backend/app/converters/eac_converter.rb', line 26

def self.import_types(show_hidden = false)
  [
   {
     :name => "eac_xml",
     :description => "Import EAC-CPF records from an XML file"
   }
  ]
end

.instance_for(type, input_file) ⇒ Object



10
11
12
13
14
15
16
# File 'backend/app/converters/eac_converter.rb', line 10

def self.instance_for(type, input_file)
  if type == "eac_xml"
    self.new(input_file)
  else
    nil
  end
end

Instance Method Details

#set_import_eventsObject



18
19
20
# File 'backend/app/converters/eac_converter.rb', line 18

def set_import_events
  config.init_map(EACConverter.EAC_BASE_MAP(true))
end

#unset_import_eventsObject



22
23
24
# File 'backend/app/converters/eac_converter.rb', line 22

def unset_import_events
  config.init_map(EACConverter.EAC_BASE_MAP(false))
end