Batch Ingest Plugin for Hyrax
-
Add the Hyrax Batch Ingest gem to your Gemfile
# in your Gemfile gem 'hyrax-batch_ingest'
-
Run bundle install
# from your application's root directory... bundle install
-
Run the Hyrax Batch Ingest installer
# from your application's root directory... bin/rails generate hyrax:batch_ingest:install
The installer does a few things:
- Adds batch ingest routes:
/batches
will list all batches./batches/[batch_id]
will show details for a batch, including a list of all batch items./batches/[batch_id]/items/[batch_item_id]
will show details for single batch item within a batch.
- Adds database migrations.
- Includes
Hyrax::BatchIngest::Ability
in your applicaton'sAbility
class atapp/models/ability.rb
.
- Adds batch ingest routes:
-
Run database migrations
# from your application's root directory... bundle exec rails db:migrate
By default, Hyrax Batch Ingest will try to load configuration from config/batch_ingest.yml
.
You can tell Hyrax Batch Ingest to load a different configuration file at runtime like this:
# Inline syntax
Hyrax::BatchIngest.config.load_config('path/to/your_batch_ingest_config.yml')
# Block syntax, useful if you have additional configuration to set at runtime.
Hyrax::BatchIngest.configure do |config|
config.load_config('path/to/your_batch_ingest_config.yml')
# additional config...
end
Each Bach Ingest has a specific type. The ingest type determines how the batch should be read into the system, and how it should be mapped to the persistence layer (i.e. Fedora)