Versions Compared

Key

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

...

The basic concept behind the DSpace 's Simple Archive Format is to create an archive, which is a directory containing one subdirectory per item. Each item directory contains a file for the item's descriptive metadata, and the files that make up the item.

...

The contents file simply enumerates, one file per line, the bitstream file names. See the following example:

Code Block
file_1.doc
        file_2.pdf
        license

Please notice that the license is optional, and if you wish to have one included, you can place the file in the .../item_001/ directory, for example.

...

  1. Create a separate file for the other schema named metadata_[prefix].xml, where the [prefix] is replaced with the schema's prefix.
  2. Inside the xml file use the dame same Dublin Core syntax, but on the <dublin_core> element include the attribute schema=[prefix].
  3. Here is an example for ETD metadata, which would be in the file metadata_etd.xml:

    Code Block
    <?xml version="1.0" encoding="UTF-8"?>
    <dublin_core schema="etd">
         <dcvalue element="degree" qualifier="department">Computer Science</dcvalue>
         <dcvalue element="degree" qualifier="level">Masters</dcvalue>
         <dcvalue element="degree" qualifier="grantor">Michigan Institute of Technology</dcvalue>
    </dublin_core>


...

Before running the item importer over items previously exported from a DSpace instance, please first refer to Transferring Items Between DSpace Instances.

Command used:

[dspace]/bin/dspace import

Java class:

org.dspace.app.itemimport.ItemImport

Arguments short and (long) forms:

Description

-a or --add

Add items to DSpace ‡

-r or --replace

Replace items listed in mapfile ‡

-d or --delete

Delete items listed in mapfile ‡

-s or --source

Source of the items (directory)

-c or --collection

Destination Collection by their Handle or database ID

-m or --mapfile

Where the mapfile for items can be found (name and directory)

-e or --eperson

Email of eperson doing the importing

-w or --workflow

Send submission through collection's workflow

-n or --notify

Kicks off the email alerting of the item(s) has(have) been imported

-t or --test

Test run‚ do not actually import items

-p or --template

Apply the collection template

-R or --resume

Resume a failed import (Used on Add only)

-h or --help

Command help

-z or --zip

Name of zipfile

‡ These are mutually exclusive.

...

Replacing existing items is relatively easy. Remember that mapfile you were supposed to savesaved above? Now you will use it. The command (in short form):

...

You are able to unimport or delete items provided you have the mapfile. Remember that mapfile you were supposed to savesaved above? The command is (in short form):

...

  1. Login
  2. Visit "My DSpace" page

  3. On the next page, you can see the history of batch imports. For each import, the following information is available:

    The status of the batch import (success or failure)
    The number of items that the user tried to import
    The number of items that were actually imported

     

    Moreover, the user can take the following actions:

    Download the map file that was produced during the import. This file contains a list of items that were imported with the corresponding handle assigned to them by DSpace.

    Delete the imported items. Everything that was imported will be deleted (including the history directory in the "[dspace]/import" directory)

    In case of failure, the user can "Resume" the import. The user is taken to the upload form again, but the system recognizes the initial import (and the map file) in order to resume the old import. There is a red label in the form that informs the user about the "Resume" form.

UI Batch Import (XMLUI)

A SimpleArchiveFormat package can be imported by an administrator in XMLUI. The SimpleArchiveFormat package needs to be compressed into a ZIP file, and it be will be uploaded to XMLUI through the browser. DSpace will then process that ZIP, and ingest items into DSpace. A stable network connection is recommended, as your browser will need to upload a potentially large ZIP file, and then wait while DSpace processes that ZIP file. 

While logged in as an administrator, click on Batch Import (ZIP):

Image Added

Then, choose the owning collection from the collection dropdown, and browse to the ZIP file on your computer that has the SimpleArchiveFormat ZIP file.

Image Added

If successful, you will get a green message with a list of handles that were imported. It is what is considered the "map file".

Image Added

If an error occurred, you will get a red error message with the issue:

Image Added

 

Exporting Items

The item exporter can export a single item or a collection of items, and creates a DSpace simple archive in the aforementioned format for each exported item. The items are exported in a sequential order in which they are retrieved from the database. As a consequence, the sequence numbers of the item subdirectories (item_000, item_001) are not related to DSpace handle or item ids.

Command used:

[dspace]/bin/dspace export

Java class:

org.dspace.app.itemexport.ItemExport

Arguments short and (long) forms:

Description

-t or --type

Type of export. COLLECTION will inform the program you want the whole collection. ITEM will be only the specific item. (You will actually key in the keywords in all caps. See examples below.)

-i or --id

The ID or Handle of the Collection or Item to export.

-d or --dest

The destination path where you want the file of items to be placed.

-n or --number

Sequence number to begin export the items with. Whatever number you give, this will be the name of the first directory created for your export. The layout of the export directory is the same as the layout used for import.

-m or --migrate

Export the item/collection for migration. This will remove the handle and metadata that will be re-created in the new instance of DSpace.

-h or --help

Brief Help.

Exporting a Collection

The CLI command to export the items of a collection:

...