Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

The Islandora Batch module provides the ability to ingest multiple objects at a time, either from a .zip file or a directory on the server.

Dependencies

This module requires the following modules/libraries:

Additionally, installing and enabling Views will allow additional reporting and management displays to be rendered.

Downloads

Release Notes and Downloads

Installation

Unzip this module into your site's modules directory as you would any other contrib module. See this for further information.

Configuration

After you have installed and enabled the Islandora Batch module, go to Administration » Islandora » Islandora Utility Modules » Islandora Batch Settings (admin/islandora/tools/batch) to configure the module.

 

You should make sure that the path to your java executable is correct.  Optionally, if you have the Drupal Views module enabled, you can also have the module link back to the Batch Queue in its results messages.

Usage

Detailed usage instructions for Islandora Batch are available here.

Drush Integration

The Islandora Batch module can also be run using drush.  This is a two stage process.  First you populate the Batch Queue by running the islandora_batch_scan_preprocess command.  

 

Info

Drush made the target parameter reserved as of Drush 7. To allow for backwards compatability this will be preserved.

 

Drush 7 and above:

drush -v -u 1 --uri=http://localhost islandora_batch_scan_preprocess --type=zip --scan_target=/path/to/archive.zip

Drush 6 and below:

drush -v -u 1 --uri=http://localhost islandora_batch_scan_preprocess --type=zip --target=/path/to/archive.zip


Available options include (Drush 7 and above):

 --content_models                          A comma-separated list of content models to assign to the objects.                          
 --namespace                               Namespace of objects to create. Defaults to namespace specified in Fedora configuration.    
 --parent                                  The collection to which the generated items should be added. Defaults to the root Islandora 
                                           repository PID.                                                                             
 --parent_relationship_pred                The predicate of the relationship to the parent. Defaults to "isMemberOfCollection".        
 --parent_relationship_uri                 The namespace URI of the relationship to the parent. Defaults to                            
                                           "info:fedora/fedora-system:def/relations-external#".                                        
 --scan_target (or --target)               The target to directory or zip file to scan. Required. 
                                           Requires the full path to your archive from root directory,
                                           e.g. /var/www/drupal/sites/archive.zip                                     
 --type                                    Either "directory" or "zip". Required.

 

After the Batch Queue has been populated, you start the actual ingest process with the islandora_batch_ingest command.  For example:

drush -v -u 1 --uri=http://localhost islandora_batch_ingest

This will process the batch, ingesting the objects and creating their derivatives.

 

Batch Ingest Cleanup

An illustrated explanation of this process is found at How to Batch Ingest Files#BatchIngestCleanup.

 

Customization

Custom ingests can be written by extending any of the existing preprocessors and batch object implementations. Checkout the example implemenation for more details.


Clearing the semaphore table

If a user kills a Drush batch ingest, or a batch ingest initiated via the web GUI dies for some reason, it is impossible to start another batch ingest until the Islandora Batch entry in Drupal's semaphore table expires. You may clear this entry manually within your database, but doing so may impact other batch ingest jobs that are running. If you are sure no other batch ingest jobs are running, delete the row from Drupal's semaphore table where the name is 'islandora_batch_ingest'.