Skip to content

Commit

Permalink
[ESSI-875] note broken METS, XML importer options in UI
Browse files Browse the repository at this point in the history
  • Loading branch information
aploshay committed Oct 1, 2024
1 parent 06ff7ef commit c56b211
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/parsers/bulkrax/mets_xml_parser.rb
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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?
Expand Down
7 changes: 6 additions & 1 deletion config/initializers/bulkrax.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit c56b211

Please sign in to comment.