Class: EACConverter

Inherits:
Converter show all
Defined in:
backend/app/converters/eac_converter.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Converter

for, #get_output_path, #import_options, import_options, 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



22
23
24
25
26
27
28
29
# File 'backend/app/converters/eac_converter.rb', line 22

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_options(opts) ⇒ Object



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

def set_import_options(opts)
  config.init_map(EACConverter.EAC_BASE_MAP(opts))
end