Class: MarcXMLAuthAgentConverter
- Inherits:
-
Converter
show all
- Defined in:
- backend/app/converters/marcxml_auth_agent_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
.for_agents_only(input_file) ⇒ Object
20
21
22
23
24
25
26
27
28
|
# File 'backend/app/converters/marcxml_auth_agent_converter.rb', line 20
def self.for_agents_only(input_file)
new(input_file).instance_eval do
@batch.record_filter = ->(record) {
AgentManager.known_agent_type?(record.class.record_type)
}
self
end
end
|
.import_types(show_hidden = false) ⇒ Object
34
35
36
37
38
39
40
41
|
# File 'backend/app/converters/marcxml_auth_agent_converter.rb', line 34
def self.import_types(show_hidden = false)
[
{
:name => "marcxml_auth_agent",
:description => "Import agent records from a MARCXML authority file"
}
]
end
|
.instance_for(type, input_file) ⇒ Object
12
13
14
15
16
17
18
|
# File 'backend/app/converters/marcxml_auth_agent_converter.rb', line 12
def self.instance_for(type, input_file)
if type == "marcxml_auth_agent"
self.new(input_file)
else
nil
end
end
|
Instance Method Details
#set_import_options(opts) ⇒ Object
30
31
32
|
# File 'backend/app/converters/marcxml_auth_agent_converter.rb', line 30
def set_import_options(opts)
config.init_map(MarcXMLAuthAgentConverter.BASE_RECORD_MAP(opts))
end
|