Class: LocationConverter
- Includes:
- ASpaceImport::CSVConvert
- Defined in:
- backend/app/converters/location_converter.rb
Class Method Summary collapse
-
.configure ⇒ Object
-
.import_types(show_hidden = false) ⇒ Object
-
.instance_for(type, input_file) ⇒ Object
Methods included from ASpaceImport::CSVConvert
#configuration, #get_new, #get_queued_or_new, included, #parse_cell, #parse_row, #run, #set_default
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
.configure ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'backend/app/converters/location_converter.rb', line 20 def self.configure { 'location_building' => 'location.building', 'location_floor' => 'location.floor', 'location_room' => 'location.room', 'location_area' => 'location.area', 'location_barcode' => 'location.barcode', 'location_classification' => 'location.classification', 'location_coordinate_1_label' => 'location.coordinate_1_label', 'location_coordinate_1_indicator' => 'location.coordinate_1_indicator', 'location_coordinate_2_label' => 'location.coordinate_2_label', 'location_coordinate_2_indicator' => 'location.coordinate_2_indicator', 'location_coordinate_3_label' => 'location.coordinate_3_label', 'location_coordinate_3_indicator' => 'location.coordinate_3_indicator', 'location_temporary' => 'location.temporary', } end |
.import_types(show_hidden = false) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'backend/app/converters/location_converter.rb', line 7 def self.import_types(show_hidden = false) [ { name: 'location_csv', description: 'Import Location records from a CSV file', } ] end |
.instance_for(type, input_file) ⇒ Object
16 17 18 |
# File 'backend/app/converters/location_converter.rb', line 16 def self.instance_for(type, input_file) new(input_file) if type == 'location_csv' end |