Versions Compared

Key

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

Table of Contents
minLevel2
outlinetrue
stylenone

Item Update Tool

ItemUpdate is a batch-mode command-line tool for altering the metadata and bitstream content of existing items in a DSpace instance. It is a companion tool to ItemImport and uses the DSpace simple archive format to specify changes in metadata and bitstream contents. Those familiar with generating the source trees for ItemImporter ItemImport will find a similar environment in the use of this batch processing tool.

...

The optional suppress_undo file is a flag to indicate that the 'undo archive' should not be written to disk. This file is usually written by the application in an undo archive to prevent a recursive undo. This file is an addition to the Archive format specifically for ItemUpdate.

ItemUpdate Commands

Command used:

[dspace]/bin/dspace itemupdate

Java class:

org.dspace.app.itemupdate.ItemUpdate

Arguments short and (long) forms:

Description

-a or --addmetadata [metadata element]

Repeatable for multiple elements. The metadata element should be in the form dc.x or dc.x.y. The mandatory argument indicates the metadata fields in the dublin_core.xml file to be added unless already present (multiple fields should be separated by a semicolon ';'). However, duplicate fields will not be added to the item metadata without warning or error.

-d or --deletemetadata [metadata element]

Repeatable for multiple elements. All metadata fields matching the element will be deleted.

-A or --addbitstreams

Adds bitstreams listed in the contents file with the bitstream metadata cited there.

-D or --deletebitstreams [filter plug classname or alias]

Not repeatable. With no argument, this operation deletes bitstreams listed in the deletes_contents file. Only bitstream IDs are recognized identifiers for this operation. The optional filter argument is the classname of an implementation of org.dspace.app.itemdupate.BitstreamFilter class to identify files for deletion or one of the aliases (e.g. ORIGINAL, ORIGINAL_AND_DERIVATIVES, TEXT, THUMBNAIL) which reference existing filters based on membership in a bundle of that name. In this case, the delete_contents file is not required for any item. The filter properties file will contains properties pertinent to the particular filer used. Multiple filters are not allowed.

-h or --help

Displays brief command line help.

-e or --eperson

Email address of the person or the user's database ID (Required)

-s or --source

Directory archive to process (Required)

-i or --itemfield

Specifies the metadata field that contains the item's identifier; Default value is "dc.identifier.uri" (Optional)

-t or --test

Runs the process in test mode with logging. But no changes applied to the DSpace instance. (Optional)

-P or --provenance

Prevents any changes to the provenance field to represent changes in the bitstream content resulting from an Add or Delete. In other words, when this flag is specified, no new provenance information is added to the DSpace Item when adding/deleting a bitstream. No provenance statements are written for thumbnails or text derivative bitstreams, in keeping with the practice of MediaFilterManager. (Optional)

-F or --filter-properties

The filter properties files to be used by the delete bitstreams action (Optional)

-v or --verbose

Turn on verbose logging.

CLI Examples

Adding Metadata:

...