diff --git a/app/parsers/bulkrax/mets_xml_parser.rb b/app/parsers/bulkrax/mets_xml_parser.rb index f61a4ea6d..514786b7d 100644 --- a/app/parsers/bulkrax/mets_xml_parser.rb +++ b/app/parsers/bulkrax/mets_xml_parser.rb @@ -1,5 +1,6 @@ # frozen_string_literal: true +# @todo update for bulkrax 5+, where XML import isn't fully supported; currently broken module Bulkrax class MetsXmlParser < ApplicationParser def entry_class @@ -15,6 +16,9 @@ def create_collections; end # @todo not yet supported def import_fields; end + # @todo not yet supported + def file_set_entry_class; end + def valid_import? raise StandardError, 'No metadata files found' if metadata_paths.blank? raise StandardError, 'No records found' if records.blank? diff --git a/config/initializers/bulkrax.rb b/config/initializers/bulkrax.rb index 499cf738c..1ea818569 100644 --- a/config/initializers/bulkrax.rb +++ b/config/initializers/bulkrax.rb @@ -6,9 +6,14 @@ # Add local parsers config.parsers += [ - { name: 'METS XML', class_name: 'Bulkrax::MetsXmlParser', partial: 'mets_xml_fields' }, + # @todo drop or fix -- currently broken, retaining at PO request + { name: 'METS XML (currently broken)', class_name: 'Bulkrax::MetsXmlParser', partial: 'mets_xml_fields' }, + { name: 'XML (currently broken)', class_name: 'Bulkrax::XmlParser', partial: 'xml_fields' }, ] + # remove incomplete XML parser + config.parsers.reject! { |parser| parser[:name] == 'XML' } + # Field to use during import to identify if the Work or Collection already exists. # Default is 'source'. # config.system_identifier_field = 'source'