bulkrax 6.0.1 → 8.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +7 -7
- data/app/assets/javascripts/bulkrax/bulkrax.js +11 -0
- data/app/assets/javascripts/bulkrax/datatables.js +139 -0
- data/app/assets/javascripts/bulkrax/exporters.js +4 -4
- data/app/assets/javascripts/bulkrax/importers.js.erb +15 -1
- data/app/assets/stylesheets/bulkrax/import_export.scss +6 -1
- data/app/controllers/bulkrax/entries_controller.rb +52 -3
- data/app/controllers/bulkrax/exporters_controller.rb +20 -8
- data/app/controllers/bulkrax/importers_controller.rb +31 -12
- data/app/controllers/concerns/bulkrax/datatables_behavior.rb +201 -0
- data/app/factories/bulkrax/object_factory.rb +135 -163
- data/app/factories/bulkrax/object_factory_interface.rb +491 -0
- data/app/factories/bulkrax/valkyrie_object_factory.rb +402 -0
- data/app/helpers/bulkrax/application_helper.rb +7 -3
- data/app/helpers/bulkrax/importers_helper.rb +1 -1
- data/app/helpers/bulkrax/validation_helper.rb +4 -4
- data/app/jobs/bulkrax/create_relationships_job.rb +28 -17
- data/app/jobs/bulkrax/delete_and_import_collection_job.rb +8 -0
- data/app/jobs/bulkrax/delete_and_import_file_set_job.rb +8 -0
- data/app/jobs/bulkrax/delete_and_import_job.rb +20 -0
- data/app/jobs/bulkrax/delete_and_import_work_job.rb +8 -0
- data/app/jobs/bulkrax/delete_job.rb +8 -3
- data/app/jobs/bulkrax/download_cloud_file_job.rb +17 -4
- data/app/jobs/bulkrax/import_collection_job.rb +1 -1
- data/app/jobs/bulkrax/import_file_set_job.rb +6 -3
- data/app/jobs/bulkrax/import_job.rb +7 -0
- data/app/jobs/bulkrax/import_work_job.rb +1 -1
- data/app/jobs/bulkrax/importer_job.rb +19 -3
- data/app/matchers/bulkrax/application_matcher.rb +0 -2
- data/app/models/bulkrax/csv_collection_entry.rb +1 -3
- data/app/models/bulkrax/csv_entry.rb +9 -7
- data/app/models/bulkrax/entry.rb +9 -11
- data/app/models/bulkrax/exporter.rb +11 -4
- data/app/models/bulkrax/importer.rb +49 -10
- data/app/models/bulkrax/oai_entry.rb +0 -3
- data/app/models/bulkrax/oai_set_entry.rb +1 -3
- data/app/models/bulkrax/rdf_collection_entry.rb +1 -4
- data/app/models/bulkrax/rdf_entry.rb +70 -69
- data/app/models/bulkrax/status.rb +10 -1
- data/app/models/bulkrax/xml_entry.rb +0 -1
- data/app/models/concerns/bulkrax/dynamic_record_lookup.rb +2 -19
- data/app/models/concerns/bulkrax/export_behavior.rb +2 -2
- data/app/models/concerns/bulkrax/file_factory.rb +174 -118
- data/app/models/concerns/bulkrax/file_set_entry_behavior.rb +5 -3
- data/app/models/concerns/bulkrax/has_matchers.rb +28 -25
- data/app/models/concerns/bulkrax/import_behavior.rb +14 -33
- data/app/models/concerns/bulkrax/importer_exporter_behavior.rb +3 -2
- data/app/models/concerns/bulkrax/status_info.rb +8 -0
- data/app/parsers/bulkrax/application_parser.rb +116 -21
- data/app/parsers/bulkrax/bagit_parser.rb +173 -195
- data/app/parsers/bulkrax/csv_parser.rb +15 -57
- data/app/parsers/bulkrax/oai_dc_parser.rb +44 -16
- data/app/parsers/bulkrax/parser_export_record_set.rb +20 -24
- data/app/parsers/bulkrax/xml_parser.rb +18 -23
- data/app/services/bulkrax/factory_class_finder.rb +92 -0
- data/app/services/bulkrax/remove_relationships_for_importer.rb +3 -1
- data/app/services/hyrax/custom_queries/find_by_source_identifier.rb +50 -0
- data/app/services/wings/custom_queries/find_by_source_identifier.rb +32 -0
- data/app/views/bulkrax/entries/_parsed_metadata.html.erb +2 -2
- data/app/views/bulkrax/entries/_raw_metadata.html.erb +2 -2
- data/app/views/bulkrax/entries/show.html.erb +9 -8
- data/app/views/bulkrax/exporters/_form.html.erb +10 -10
- data/app/views/bulkrax/exporters/edit.html.erb +1 -1
- data/app/views/bulkrax/exporters/index.html.erb +13 -57
- data/app/views/bulkrax/exporters/new.html.erb +1 -1
- data/app/views/bulkrax/exporters/show.html.erb +6 -12
- data/app/views/bulkrax/importers/_browse_everything.html.erb +2 -2
- data/app/views/bulkrax/importers/_csv_fields.html.erb +8 -2
- data/app/views/bulkrax/importers/_edit_form_buttons.html.erb +8 -1
- data/app/views/bulkrax/importers/_edit_item_buttons.html.erb +18 -0
- data/app/views/bulkrax/importers/edit.html.erb +1 -1
- data/app/views/bulkrax/importers/index.html.erb +20 -64
- data/app/views/bulkrax/importers/new.html.erb +1 -1
- data/app/views/bulkrax/importers/show.html.erb +8 -14
- data/app/views/bulkrax/importers/upload_corrected_entries.html.erb +2 -2
- data/app/views/bulkrax/shared/_bulkrax_errors.html.erb +1 -1
- data/app/views/bulkrax/shared/_bulkrax_field_mapping.html.erb +1 -1
- data/app/views/bulkrax/shared/_entries_tab.html.erb +16 -0
- data/config/locales/bulkrax.en.yml +7 -0
- data/config/routes.rb +8 -2
- data/db/migrate/20230608153601_add_indices_to_bulkrax.rb +20 -9
- data/db/migrate/20240208005801_denormalize_status_message.rb +7 -0
- data/db/migrate/20240209070952_update_identifier_index.rb +6 -0
- data/db/migrate/20240307053156_add_index_to_metadata_bulkrax_identifier.rb +18 -0
- data/lib/bulkrax/engine.rb +23 -0
- data/lib/bulkrax/version.rb +1 -1
- data/lib/bulkrax.rb +107 -19
- data/lib/generators/bulkrax/templates/config/initializers/bulkrax.rb +2 -0
- data/lib/tasks/bulkrax_tasks.rake +13 -0
- data/lib/tasks/reset.rake +4 -4
- metadata +64 -8
- data/app/views/bulkrax/shared/_collection_entries_tab.html.erb +0 -39
- data/app/views/bulkrax/shared/_file_set_entries_tab.html.erb +0 -39
- data/app/views/bulkrax/shared/_work_entries_tab.html.erb +0 -39
@@ -0,0 +1,18 @@
|
|
1
|
+
class AddIndexToMetadataBulkraxIdentifier < ActiveRecord::Migration[6.1]
|
2
|
+
def up
|
3
|
+
return unless table_exists?(:orm_resources)
|
4
|
+
return if index_exists?(:orm_resources, "(((metadata -> 'bulkrax_identifier'::text) ->> 0))", name: 'index_on_bulkrax_identifier')
|
5
|
+
|
6
|
+
# This creates an expression index on the first element of the bulkrax_identifier array
|
7
|
+
add_index :orm_resources,
|
8
|
+
"(metadata -> 'bulkrax_identifier' ->> 0)",
|
9
|
+
name: 'index_on_bulkrax_identifier',
|
10
|
+
where: "metadata -> 'bulkrax_identifier' IS NOT NULL"
|
11
|
+
end
|
12
|
+
|
13
|
+
def down
|
14
|
+
return unless table_exists?(:orm_resources)
|
15
|
+
|
16
|
+
remove_index :orm_resources, name: 'index_on_bulkrax_identifier'
|
17
|
+
end
|
18
|
+
end
|
data/lib/bulkrax/engine.rb
CHANGED
@@ -5,6 +5,7 @@ require 'oai'
|
|
5
5
|
module Bulkrax
|
6
6
|
class Engine < ::Rails::Engine
|
7
7
|
isolate_namespace Bulkrax
|
8
|
+
|
8
9
|
initializer :append_migrations do |app|
|
9
10
|
if !app.root.to_s.match(root.to_s) && app.root.join('db/migrate').children.none? { |path| path.fnmatch?("*.bulkrax.rb") }
|
10
11
|
config.paths["db/migrate"].expanded.each do |expanded_path|
|
@@ -32,6 +33,28 @@ module Bulkrax
|
|
32
33
|
hyrax_view_path = paths.detect { |path| path.match(%r{^#{hyrax_engine_root}}) }
|
33
34
|
paths.insert(paths.index(hyrax_view_path), File.join(my_engine_root, 'app', 'views')) if hyrax_view_path
|
34
35
|
ActionController::Base.view_paths = paths.uniq
|
36
|
+
|
37
|
+
custom_query_strategies = {
|
38
|
+
find_by_model_and_property_value: :find_single_or_nil
|
39
|
+
}
|
40
|
+
|
41
|
+
if defined?(::Goddess::CustomQueryContainer)
|
42
|
+
strategies = ::Goddess::CustomQueryContainer.known_custom_queries_and_their_strategies
|
43
|
+
strategies = strategies.merge(custom_query_strategies)
|
44
|
+
::Goddess::CustomQueryContainer.known_custom_queries_and_their_strategies = strategies
|
45
|
+
end
|
46
|
+
|
47
|
+
if defined?(::Frigg::CustomQueryContainer)
|
48
|
+
strategies = ::Frigg::CustomQueryContainer.known_custom_queries_and_their_strategies
|
49
|
+
strategies = strategies.merge(custom_query_strategies)
|
50
|
+
::Frigg::CustomQueryContainer.known_custom_queries_and_their_strategies = strategies
|
51
|
+
end
|
52
|
+
|
53
|
+
if defined?(::Freyja::CustomQueryContainer)
|
54
|
+
strategies = ::Freyja::CustomQueryContainer.known_custom_queries_and_their_strategies
|
55
|
+
strategies = strategies.merge(custom_query_strategies)
|
56
|
+
::Freyja::CustomQueryContainer.known_custom_queries_and_their_strategies = strategies
|
57
|
+
end
|
35
58
|
end
|
36
59
|
end
|
37
60
|
end
|
data/lib/bulkrax/version.rb
CHANGED
data/lib/bulkrax.rb
CHANGED
@@ -4,6 +4,26 @@ require "bulkrax/version"
|
|
4
4
|
require "bulkrax/engine"
|
5
5
|
require 'active_support/all'
|
6
6
|
|
7
|
+
require 'coderay'
|
8
|
+
require 'csv'
|
9
|
+
require 'denormalize_fields'
|
10
|
+
require 'erb'
|
11
|
+
require 'iso8601'
|
12
|
+
require 'language_list'
|
13
|
+
require 'marcel'
|
14
|
+
require 'nokogiri'
|
15
|
+
require 'ostruct'
|
16
|
+
require 'zip'
|
17
|
+
|
18
|
+
def conditional_require(gem_name)
|
19
|
+
require gem_name
|
20
|
+
rescue LoadError
|
21
|
+
ENV["BULKRAX_NO_#{gem_name.upcase}"] = 'true'
|
22
|
+
end
|
23
|
+
|
24
|
+
conditional_require 'bagit'
|
25
|
+
conditional_require 'rdf'
|
26
|
+
|
7
27
|
# rubocop:disable Metrics/ModuleLength
|
8
28
|
module Bulkrax
|
9
29
|
extend self # rubocop:disable Style/ModuleFunction
|
@@ -13,13 +33,10 @@ module Bulkrax
|
|
13
33
|
# @api public
|
14
34
|
class Configuration
|
15
35
|
attr_accessor :api_definition,
|
16
|
-
:curation_concerns,
|
17
36
|
:default_field_mapping,
|
18
37
|
:default_work_type,
|
19
38
|
:export_path,
|
20
39
|
:field_mappings,
|
21
|
-
:file_model_class,
|
22
|
-
:fill_in_blank_source_identifiers,
|
23
40
|
:generated_metadata_mapping,
|
24
41
|
:import_path,
|
25
42
|
:multi_value_element_join_on,
|
@@ -35,6 +52,84 @@ module Bulkrax
|
|
35
52
|
:reserved_properties,
|
36
53
|
:server_name
|
37
54
|
|
55
|
+
##
|
56
|
+
# @return [#call] with arity 2. The first parameter is a {Bulkrax::ApplicationParser} and the
|
57
|
+
# second parameter is an Integer for the index of the record encountered in the import.
|
58
|
+
attr_accessor :fill_in_blank_source_identifiers
|
59
|
+
|
60
|
+
##
|
61
|
+
# @param [String]
|
62
|
+
attr_writer :solr_key_for_member_file_ids
|
63
|
+
|
64
|
+
##
|
65
|
+
# @return [String]
|
66
|
+
# @see https://github.com/samvera/hyrax/pull/6513
|
67
|
+
def solr_key_for_member_file_ids
|
68
|
+
return @solr_key_for_member_file_ids if @solr_key_for_member_file_ids.present?
|
69
|
+
|
70
|
+
return "member_ids_ssim" if defined?(Hyrax)
|
71
|
+
|
72
|
+
"#{file_model_class.name.to_s.underscore}_ids_ssim"
|
73
|
+
end
|
74
|
+
|
75
|
+
##
|
76
|
+
# @param coercer [#call]
|
77
|
+
# @see Bulkrax::FactoryClassFinder
|
78
|
+
attr_writer :factory_class_name_coercer
|
79
|
+
|
80
|
+
##
|
81
|
+
# A function responsible for converting the name of a factory class to the corresponding
|
82
|
+
# constant.
|
83
|
+
#
|
84
|
+
# @return [#call, Bulkrax::FactoryClassFinder::DefaultCoercer] an object responding to call,
|
85
|
+
# with one positional parameter (e.g. arity == 1)
|
86
|
+
#
|
87
|
+
# @example
|
88
|
+
# Bulkrax.factory_class_name_coercer.call("Work")
|
89
|
+
# => Work
|
90
|
+
def factory_class_name_coercer
|
91
|
+
@factory_class_name_coercer || Bulkrax::FactoryClassFinder::DefaultCoercer
|
92
|
+
end
|
93
|
+
|
94
|
+
def collection_model_class
|
95
|
+
@collection_model_class ||= Collection
|
96
|
+
end
|
97
|
+
|
98
|
+
attr_writer :collection_model_class
|
99
|
+
|
100
|
+
def collection_model_internal_resource
|
101
|
+
collection_model_class.try(:internal_resource) || collection_model_class.to_s
|
102
|
+
end
|
103
|
+
|
104
|
+
def file_model_class
|
105
|
+
@file_model_class ||= defined?(::Hyrax) ? ::FileSet : File
|
106
|
+
end
|
107
|
+
|
108
|
+
attr_writer :file_model_class
|
109
|
+
|
110
|
+
def file_model_internal_resource
|
111
|
+
file_model_class.try(:internal_resource) || file_model_class.to_s
|
112
|
+
end
|
113
|
+
|
114
|
+
def curation_concerns
|
115
|
+
@curation_concerns ||= defined?(::Hyrax) ? ::Hyrax.config.curation_concerns : []
|
116
|
+
end
|
117
|
+
|
118
|
+
attr_writer :curation_concerns
|
119
|
+
|
120
|
+
def curation_concern_internal_resources
|
121
|
+
curation_concerns.map { |cc| cc.try(:internal_resource) || cc.to_s }.uniq
|
122
|
+
end
|
123
|
+
|
124
|
+
attr_writer :ingest_queue_name
|
125
|
+
##
|
126
|
+
# @return [String, Proc]
|
127
|
+
def ingest_queue_name
|
128
|
+
return @ingest_queue_name if @ingest_queue_name.present?
|
129
|
+
return Hyrax.config.ingest_queue_name if defined?(Hyrax)
|
130
|
+
:import
|
131
|
+
end
|
132
|
+
|
38
133
|
attr_writer :use_locking
|
39
134
|
|
40
135
|
def use_locking
|
@@ -55,18 +150,25 @@ module Bulkrax
|
|
55
150
|
def_delegators :@config,
|
56
151
|
:api_definition,
|
57
152
|
:api_definition=,
|
153
|
+
:collection_model_class,
|
154
|
+
:collection_model_internal_resource,
|
155
|
+
:collection_model_class=,
|
58
156
|
:curation_concerns,
|
59
157
|
:curation_concerns=,
|
158
|
+
:curation_concern_internal_resources,
|
60
159
|
:default_field_mapping,
|
61
160
|
:default_field_mapping=,
|
62
161
|
:default_work_type,
|
63
162
|
:default_work_type=,
|
64
163
|
:export_path,
|
65
164
|
:export_path=,
|
165
|
+
:factory_class_name_coercer,
|
166
|
+
:factory_class_name_coercer=,
|
66
167
|
:field_mappings,
|
67
168
|
:field_mappings=,
|
68
169
|
:file_model_class,
|
69
170
|
:file_model_class=,
|
171
|
+
:file_model_internal_resource,
|
70
172
|
:fill_in_blank_source_identifiers,
|
71
173
|
:fill_in_blank_source_identifiers=,
|
72
174
|
:generated_metadata_mapping,
|
@@ -97,6 +199,8 @@ module Bulkrax
|
|
97
199
|
:reserved_properties=,
|
98
200
|
:server_name,
|
99
201
|
:server_name=,
|
202
|
+
:solr_key_for_member_file_ids,
|
203
|
+
:solr_key_for_member_file_ids=,
|
100
204
|
:use_locking,
|
101
205
|
:use_locking=,
|
102
206
|
:use_locking?
|
@@ -117,22 +221,6 @@ module Bulkrax
|
|
117
221
|
conf.relationship_job_class = "Bulkrax::CreateRelationshipsJob"
|
118
222
|
conf.required_elements = ['title']
|
119
223
|
|
120
|
-
def conf.curation_concerns
|
121
|
-
@curation_concerns ||= defined?(::Hyrax) ? ::Hyrax.config.curation_concerns : []
|
122
|
-
end
|
123
|
-
|
124
|
-
def conf.curation_concerns=(val)
|
125
|
-
@curation_concerns = val
|
126
|
-
end
|
127
|
-
|
128
|
-
def conf.file_model_class
|
129
|
-
@file_model_class ||= defined?(::Hyrax) ? ::FileSet : File
|
130
|
-
end
|
131
|
-
|
132
|
-
def conf.file_model_class=(val)
|
133
|
-
@file_model_class = val
|
134
|
-
end
|
135
|
-
|
136
224
|
# Hash of Generic field_mappings for use in the view
|
137
225
|
# There must be one field_mappings hash per view partial
|
138
226
|
# Based on Hyrax CoreMetadata && BasicMetadata
|
@@ -12,6 +12,8 @@ Bulkrax.setup do |config|
|
|
12
12
|
|
13
13
|
# Factory Class to use when generating and saving objects
|
14
14
|
config.object_factory = Bulkrax::ObjectFactory
|
15
|
+
# Use this for a Postgres-backed Valkyrized Hyrax
|
16
|
+
# config.object_factory = Bulkrax::ValkyrieObjectFactory
|
15
17
|
|
16
18
|
# Path to store pending imports
|
17
19
|
# config.import_path = 'tmp/imports'
|
@@ -1,6 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
require 'ruby-progressbar'
|
2
3
|
|
3
4
|
namespace :bulkrax do
|
5
|
+
desc 'Update all status messages from the latest status. This is to refresh the denormalized field'
|
6
|
+
task update_status_messages: :environment do
|
7
|
+
@progress = ProgressBar.create(total: Bulkrax::Status.latest_by_statusable.count,
|
8
|
+
format: "%a %b\u{15E7}%i %c/%C %p%% %t",
|
9
|
+
progress_mark: ' ',
|
10
|
+
remainder_mark: "\u{FF65}")
|
11
|
+
Bulkrax::Status.latest_by_statusable.includes(:statusable).find_each do |status|
|
12
|
+
status.statusable.update(status_message: status.status_message)
|
13
|
+
@progress.increment
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
4
17
|
# Usage example: rails bulkrax:generate_test_csvs['5','100','GenericWork']
|
5
18
|
desc 'Generate CSVs with fake data for testing purposes'
|
6
19
|
task :generate_test_csvs, [:num_of_csvs, :csv_rows, :record_type] => :environment do |_t, args|
|
data/lib/tasks/reset.rake
CHANGED
@@ -12,8 +12,7 @@ namespace :hyrax do
|
|
12
12
|
desc 'Reset fedora / solr and corresponding database tables w/o clearing other active record tables like users'
|
13
13
|
task works_and_collections: [:environment] do
|
14
14
|
confirm('You are about to delete all works and collections, this is not reversable!')
|
15
|
-
|
16
|
-
ActiveFedora::Cleaner.clean!
|
15
|
+
Bulkrax.object_factory.clean!
|
17
16
|
Hyrax::PermissionTemplateAccess.delete_all
|
18
17
|
Hyrax::PermissionTemplate.delete_all
|
19
18
|
Bulkrax::PendingRelationship.delete_all
|
@@ -33,16 +32,17 @@ namespace :hyrax do
|
|
33
32
|
Mailboxer::Conversation::OptOut.delete_all
|
34
33
|
Mailboxer::Conversation.delete_all
|
35
34
|
AccountElevator.switch!(Site.instance.account) if defined?(AccountElevator)
|
35
|
+
|
36
36
|
# we need to wait till Fedora is done with its cleanup
|
37
37
|
# otherwise creating the admin set will fail
|
38
|
-
while
|
38
|
+
while Bulkrax.object_factory.default_admin_set_or_nil
|
39
39
|
puts 'waiting for delete to finish before reinitializing Fedora'
|
40
40
|
sleep 20
|
41
41
|
end
|
42
42
|
|
43
43
|
Hyrax::CollectionType.find_or_create_default_collection_type
|
44
44
|
Hyrax::CollectionType.find_or_create_admin_set_type
|
45
|
-
|
45
|
+
Bulkrax.object_factory.find_or_create_default_admin_set
|
46
46
|
|
47
47
|
collection_types = Hyrax::CollectionType.all
|
48
48
|
collection_types.each do |c|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bulkrax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 8.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Kaufman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.4.6
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.4.6
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: coderay
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +52,34 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: denormalize_fields
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: marcel
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
55
83
|
- !ruby/object:Gem::Dependency
|
56
84
|
name: iso8601
|
57
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -210,6 +238,20 @@ dependencies:
|
|
210
238
|
- - ">="
|
211
239
|
- !ruby/object:Gem::Version
|
212
240
|
version: '0'
|
241
|
+
- !ruby/object:Gem::Dependency
|
242
|
+
name: dry-monads
|
243
|
+
requirement: !ruby/object:Gem::Requirement
|
244
|
+
requirements:
|
245
|
+
- - ">="
|
246
|
+
- !ruby/object:Gem::Version
|
247
|
+
version: '0'
|
248
|
+
type: :development
|
249
|
+
prerelease: false
|
250
|
+
version_requirements: !ruby/object:Gem::Requirement
|
251
|
+
requirements:
|
252
|
+
- - ">="
|
253
|
+
- !ruby/object:Gem::Version
|
254
|
+
version: '0'
|
213
255
|
- !ruby/object:Gem::Dependency
|
214
256
|
name: sqlite3
|
215
257
|
requirement: !ruby/object:Gem::Requirement
|
@@ -283,6 +325,7 @@ files:
|
|
283
325
|
- app/assets/config/bulkrax_manifest.js
|
284
326
|
- app/assets/javascripts/bulkrax/application.js
|
285
327
|
- app/assets/javascripts/bulkrax/bulkrax.js
|
328
|
+
- app/assets/javascripts/bulkrax/datatables.js
|
286
329
|
- app/assets/javascripts/bulkrax/entries.js
|
287
330
|
- app/assets/javascripts/bulkrax/exporters.js
|
288
331
|
- app/assets/javascripts/bulkrax/importers.js.erb
|
@@ -296,14 +339,21 @@ files:
|
|
296
339
|
- app/controllers/bulkrax/exporters_controller.rb
|
297
340
|
- app/controllers/bulkrax/importers_controller.rb
|
298
341
|
- app/controllers/concerns/bulkrax/api.rb
|
342
|
+
- app/controllers/concerns/bulkrax/datatables_behavior.rb
|
299
343
|
- app/controllers/concerns/bulkrax/download_behavior.rb
|
300
344
|
- app/factories/bulkrax/object_factory.rb
|
345
|
+
- app/factories/bulkrax/object_factory_interface.rb
|
346
|
+
- app/factories/bulkrax/valkyrie_object_factory.rb
|
301
347
|
- app/helpers/bulkrax/application_helper.rb
|
302
348
|
- app/helpers/bulkrax/exporters_helper.rb
|
303
349
|
- app/helpers/bulkrax/importers_helper.rb
|
304
350
|
- app/helpers/bulkrax/validation_helper.rb
|
305
351
|
- app/jobs/bulkrax/application_job.rb
|
306
352
|
- app/jobs/bulkrax/create_relationships_job.rb
|
353
|
+
- app/jobs/bulkrax/delete_and_import_collection_job.rb
|
354
|
+
- app/jobs/bulkrax/delete_and_import_file_set_job.rb
|
355
|
+
- app/jobs/bulkrax/delete_and_import_job.rb
|
356
|
+
- app/jobs/bulkrax/delete_and_import_work_job.rb
|
307
357
|
- app/jobs/bulkrax/delete_collection_job.rb
|
308
358
|
- app/jobs/bulkrax/delete_file_set_job.rb
|
309
359
|
- app/jobs/bulkrax/delete_job.rb
|
@@ -313,6 +363,7 @@ files:
|
|
313
363
|
- app/jobs/bulkrax/exporter_job.rb
|
314
364
|
- app/jobs/bulkrax/import_collection_job.rb
|
315
365
|
- app/jobs/bulkrax/import_file_set_job.rb
|
366
|
+
- app/jobs/bulkrax/import_job.rb
|
316
367
|
- app/jobs/bulkrax/import_work_job.rb
|
317
368
|
- app/jobs/bulkrax/importer_job.rb
|
318
369
|
- app/jobs/bulkrax/schedule_relationships_job.rb
|
@@ -358,7 +409,10 @@ files:
|
|
358
409
|
- app/parsers/bulkrax/oai_qualified_dc_parser.rb
|
359
410
|
- app/parsers/bulkrax/parser_export_record_set.rb
|
360
411
|
- app/parsers/bulkrax/xml_parser.rb
|
412
|
+
- app/services/bulkrax/factory_class_finder.rb
|
361
413
|
- app/services/bulkrax/remove_relationships_for_importer.rb
|
414
|
+
- app/services/hyrax/custom_queries/find_by_source_identifier.rb
|
415
|
+
- app/services/wings/custom_queries/find_by_source_identifier.rb
|
362
416
|
- app/views/bulkrax/entries/_parsed_metadata.html.erb
|
363
417
|
- app/views/bulkrax/entries/_raw_metadata.html.erb
|
364
418
|
- app/views/bulkrax/entries/show.html.erb
|
@@ -372,6 +426,7 @@ files:
|
|
372
426
|
- app/views/bulkrax/importers/_browse_everything.html.erb
|
373
427
|
- app/views/bulkrax/importers/_csv_fields.html.erb
|
374
428
|
- app/views/bulkrax/importers/_edit_form_buttons.html.erb
|
429
|
+
- app/views/bulkrax/importers/_edit_item_buttons.html.erb
|
375
430
|
- app/views/bulkrax/importers/_form.html.erb
|
376
431
|
- app/views/bulkrax/importers/_oai_fields.html.erb
|
377
432
|
- app/views/bulkrax/importers/_xml_fields.html.erb
|
@@ -382,9 +437,7 @@ files:
|
|
382
437
|
- app/views/bulkrax/importers/upload_corrected_entries.html.erb
|
383
438
|
- app/views/bulkrax/shared/_bulkrax_errors.html.erb
|
384
439
|
- app/views/bulkrax/shared/_bulkrax_field_mapping.html.erb
|
385
|
-
- app/views/bulkrax/shared/
|
386
|
-
- app/views/bulkrax/shared/_file_set_entries_tab.html.erb
|
387
|
-
- app/views/bulkrax/shared/_work_entries_tab.html.erb
|
440
|
+
- app/views/bulkrax/shared/_entries_tab.html.erb
|
388
441
|
- app/views/hyrax/dashboard/sidebar/_bulkrax_sidebar_additions.html.erb
|
389
442
|
- app/views/hyrax/dashboard/sidebar/_repository_content.html.erb
|
390
443
|
- app/views/layouts/bulkrax/application.html.erb
|
@@ -425,6 +478,9 @@ files:
|
|
425
478
|
- db/migrate/20220413180915_add_generated_metadata_to_bulkrax_exporters.rb
|
426
479
|
- db/migrate/20220609001128_rename_bulkrax_importer_run_to_importer_run.rb
|
427
480
|
- db/migrate/20230608153601_add_indices_to_bulkrax.rb
|
481
|
+
- db/migrate/20240208005801_denormalize_status_message.rb
|
482
|
+
- db/migrate/20240209070952_update_identifier_index.rb
|
483
|
+
- db/migrate/20240307053156_add_index_to_metadata_bulkrax_identifier.rb
|
428
484
|
- lib/bulkrax.rb
|
429
485
|
- lib/bulkrax/engine.rb
|
430
486
|
- lib/bulkrax/entry_spec_helper.rb
|
@@ -457,7 +513,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
457
513
|
- !ruby/object:Gem::Version
|
458
514
|
version: '0'
|
459
515
|
requirements: []
|
460
|
-
rubygems_version: 3.
|
516
|
+
rubygems_version: 3.5.5
|
461
517
|
signing_key:
|
462
518
|
specification_version: 4
|
463
519
|
summary: Import and export tool for Hyrax and Hyku
|
@@ -1,39 +0,0 @@
|
|
1
|
-
<div role="tabpanel" class="tab-pane bulkrax-nav-tab-table-left-align" id="collection-entries">
|
2
|
-
<table class='table table-striped'>
|
3
|
-
<thead>
|
4
|
-
<tr>
|
5
|
-
<th><%= t('bulkrax.table_header.labels.identifier') %></th>
|
6
|
-
<th><%= t('bulkrax.table_header.labels.entry_id') %></th>
|
7
|
-
<th><%= t('bulkrax.table_header.labels.status') %></th>
|
8
|
-
<th><%= t('bulkrax.table_header.labels.errors') %></th>
|
9
|
-
<th><%= t('bulkrax.table_header.labels.status_set_at') %></th>
|
10
|
-
<th><%= t('bulkrax.table_header.labels.actions') %></th>
|
11
|
-
</tr>
|
12
|
-
</thead>
|
13
|
-
<tbody>
|
14
|
-
<% entries.each do |e| %>
|
15
|
-
<% entry_path = item.class.to_s.include?('Importer') ? bulkrax.importer_entry_path(item.id, e.id) : bulkrax.exporter_entry_path(item.id, e.id) %>
|
16
|
-
<tr>
|
17
|
-
<td><%= link_to e.identifier, entry_path %></td>
|
18
|
-
<td><%= e.id %></td>
|
19
|
-
<% if e.status == "Complete" %>
|
20
|
-
<td><span class="glyphicon glyphicon-ok" style="color: green;"></span> <%= e.status %></td>
|
21
|
-
<% elsif e.status == "Pending" %>
|
22
|
-
<td><span class="glyphicon glyphicon-option-horizontal" style="color: blue;"></span> <%= e.status %></td>
|
23
|
-
<% else %>
|
24
|
-
<td><span class="glyphicon glyphicon-remove" style="color: <%= e.status == 'Deleted' ? 'green' : 'red' %>;"></span> <%= e.status %></td>
|
25
|
-
<% end %>
|
26
|
-
<% if e.last_error.present? %>
|
27
|
-
<td><%= link_to e.last_error.dig("error_class"), entry_path %></td>
|
28
|
-
<% else %>
|
29
|
-
<td></td>
|
30
|
-
<% end %>
|
31
|
-
<td><%= e.status_at %></td>
|
32
|
-
<td><%= link_to raw('<span class="glyphicon glyphicon-info-sign"></span>'), entry_path %></td>
|
33
|
-
</tr>
|
34
|
-
<% end %>
|
35
|
-
</tbody>
|
36
|
-
</table>
|
37
|
-
<%= page_entries_info(entries) %><br />
|
38
|
-
<%= paginate(entries, theme: 'blacklight', param_name: :collections_entries_page, params: { anchor: 'collection-entries' }) %>
|
39
|
-
</div>
|
@@ -1,39 +0,0 @@
|
|
1
|
-
<div role="tabpanel" class="tab-pane bulkrax-nav-tab-table-left-align" id="file-set-entries">
|
2
|
-
<table class='table table-striped'>
|
3
|
-
<thead>
|
4
|
-
<tr>
|
5
|
-
<th><%= t('bulkrax.table_header.labels.identifier') %></th>
|
6
|
-
<th><%= t('bulkrax.table_header.labels.entry_id') %></th>
|
7
|
-
<th><%= t('bulkrax.table_header.labels.status') %></th>
|
8
|
-
<th><%= t('bulkrax.table_header.labels.errors') %></th>
|
9
|
-
<th><%= t('bulkrax.table_header.labels.status_set_at') %></th>
|
10
|
-
<th><%= t('bulkrax.table_header.labels.actions') %></th>
|
11
|
-
</tr>
|
12
|
-
</thead>
|
13
|
-
<tbody>
|
14
|
-
<% entries.each do |e| %>
|
15
|
-
<% entry_path = item.class.to_s.include?('Importer') ? bulkrax.importer_entry_path(item.id, e.id) : bulkrax.exporter_entry_path(item.id, e.id) %>
|
16
|
-
<tr>
|
17
|
-
<td><%= link_to e.identifier, entry_path %></td>
|
18
|
-
<td><%= e.id %></td>
|
19
|
-
<% if e.status == "Complete" %>
|
20
|
-
<td><span class="glyphicon glyphicon-ok" style="color: green;"></span> <%= e.status %></td>
|
21
|
-
<% elsif e.status == "Pending" %>
|
22
|
-
<td><span class="glyphicon glyphicon-option-horizontal" style="color: blue;"></span> <%= e.status %></td>
|
23
|
-
<% else %>
|
24
|
-
<td><span class="glyphicon glyphicon-remove" style="color: <%= e.status == 'Deleted' ? 'green' : 'red' %>;"></span> <%= e.status %></td>
|
25
|
-
<% end %>
|
26
|
-
<% if e.last_error.present? %>
|
27
|
-
<td><%= link_to e.last_error.dig("error_class"), entry_path %></td>
|
28
|
-
<% else %>
|
29
|
-
<td></td>
|
30
|
-
<% end %>
|
31
|
-
<td><%= e.status_at %></td>
|
32
|
-
<td><%= link_to raw('<span class="glyphicon glyphicon-info-sign"></span>'), entry_path %></td>
|
33
|
-
</tr>
|
34
|
-
<% end %>
|
35
|
-
</tbody>
|
36
|
-
</table>
|
37
|
-
<%= page_entries_info(entries) %><br />
|
38
|
-
<%= paginate(entries, theme: 'blacklight', param_name: :file_set_entries_page, params: { anchor: 'file-set-entries' }) %>
|
39
|
-
</div>
|
@@ -1,39 +0,0 @@
|
|
1
|
-
<div role="tabpanel" class="tab-pane active bulkrax-nav-tab-table-left-align" id="work-entries">
|
2
|
-
<table class='table table-striped'>
|
3
|
-
<thead>
|
4
|
-
<tr>
|
5
|
-
<th><%= t('bulkrax.table_header.labels.identifier') %></th>
|
6
|
-
<th><%= t('bulkrax.table_header.labels.entry_id') %></th>
|
7
|
-
<th><%= t('bulkrax.table_header.labels.status') %></th>
|
8
|
-
<th><%= t('bulkrax.table_header.labels.errors') %></th>
|
9
|
-
<th><%= t('bulkrax.table_header.labels.status_set_at') %></th>
|
10
|
-
<th><%= t('bulkrax.table_header.labels.actions') %></th>
|
11
|
-
</tr>
|
12
|
-
</thead>
|
13
|
-
<tbody>
|
14
|
-
<% entries.each do |e| %>
|
15
|
-
<% entry_path = item.class.to_s.include?('Importer') ? bulkrax.importer_entry_path(item.id, e.id) : bulkrax.exporter_entry_path(item.id, e.id) %>
|
16
|
-
<tr>
|
17
|
-
<td><%= link_to e.identifier, entry_path %></td>
|
18
|
-
<td><%= e.id %></td>
|
19
|
-
<% if e.status == "Complete" %>
|
20
|
-
<td><span class="glyphicon glyphicon-ok" style="color: green;"></span> <%= e.status %></td>
|
21
|
-
<% elsif e.status == "Pending" %>
|
22
|
-
<td><span class="glyphicon glyphicon-option-horizontal" style="color: blue;"></span> <%= e.status %></td>
|
23
|
-
<% else %>
|
24
|
-
<td><span class="glyphicon glyphicon-remove" style="color: <%= e.status == 'Deleted' ? 'green' : 'red' %>;"></span> <%= e.status %></td>
|
25
|
-
<% end %>
|
26
|
-
<% if e.last_error.present? %>
|
27
|
-
<td><%= link_to e.last_error.dig("error_class"), entry_path %></td>
|
28
|
-
<% else %>
|
29
|
-
<td></td>
|
30
|
-
<% end %>
|
31
|
-
<td><%= e.status_at %></td>
|
32
|
-
<td><%= link_to raw('<span class="glyphicon glyphicon-info-sign"></span>'), entry_path %></td>
|
33
|
-
</tr>
|
34
|
-
<% end %>
|
35
|
-
</tbody>
|
36
|
-
</table>
|
37
|
-
<%= page_entries_info(entries) %><br />
|
38
|
-
<%= paginate(entries, theme: 'blacklight', param_name: :work_entries_page, params: { anchor: 'work-entries' }) %>
|
39
|
-
</div>
|