Date: Thu, 28 Mar 2024 05:17:46 -0400 (EDT) Message-ID: <205372481.27310.1711617466739@lyrasis1-roc-mp1> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_27309_168264070.1711617466739" ------=_Part_27309_168264070.1711617466739 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
ItemUpdate is a batch-mode command-line tool for altering the metadata a= nd bitstream content of existing items in a DSpace instance. It is a compan= ion 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 ItemImport will find a similar environment in the use= of this batch processing tool.
For metadata, ItemUpdate can perform 'add' and 'delete' actions on speci= fied metadata elements. For bitstreams, 'add' and 'delete' are similarly av= ailable. All these actions can be combined in a single batch run.
ItemUpdate supports an undo feature for all actions except bitstream del= etion. There is also a test mode, as with ItemImport. However, unlike ItemI= mport, there is no resume feature for incomplete processing. There is more = extensive logging with a summary statement at the end with counts of succes= sful and unsuccessful items processed.
One probable scenario for using this tool is where there is an external = primary data source for which the DSpace instance is a secondary or down-st= ream system. Metadata and/or bitstream content changes in the primary syste= m can be exported to the simple archive format to be used by ItemUpdate to = synchronize the changes.
A note on terminology: item refers to a DSpace item. metadata element refers generally to a qualified or unqualif=
ied element in a schema in the form [schema].[element].[qualifier] or
[schema].[element]
and occasionally in a more specific=
way to the second part of that form. metadata field refer=
s to a specific instance pairing a metadata element to a value.
As with ItemImporter, the idea behind the DSpace's simple = archive format is to create an archive directory with a subdirectory per it= em. There are a few additional features added to this format specifically f= or ItemUpdate. Note that in the simple archive format, the item directories= are merely local references and only used by ItemUpdate in the log output.=
The user is referred to the previous section DSpace Simple Arc= hive Format.
Additionally, the use of a delete_contents is now avail= able. This file lists the bitstreams to be deleted, one bitstream ID per li= ne. Currently, no other identifiers for bitstreams are usable for this func= tion. This file is an addition to the Archive format specifically for ItemU= pdate.
The optional suppress_undo file is a flag to indicate that the 'undo arc= hive' should not be written to disk. This file is usually written by the ap= plication in an undo archive to prevent a recursive undo. This file is an a= ddition to the Archive format specifically for ItemUpdate.
Command used: |
|
Java class: |
org.dspace.app.itemupdate.ItemUpdate= |
Arguments short and (long) forms: |
Description |
|
Repeatable for multiple elements. The metadat= a element should be in the form dc.x or dc.x.y. The mandatory argument indi= cates the metadata fields in the dublin_core.xml file to be added unless al= ready present (multiple fields should be separated by a semicolon ';'). How= ever, duplicate fields will not be added to the item metadata without warni= ng or error. |
|
Repeatable for multiple elements. All metadat= a fields matching the element will be deleted. |
|
Adds bitstreams listed in the contents file w= ith the bitstream metadata cited there. |
|
Not repeatable. With no argument, this operat=
ion deletes bitstreams listed in the |
| Displays brief command line help. |
|
Email address of the person or the user's dat= abase ID (Required) |
| Directory archive to process (Require= d) |
|
Specifies the metadata field that contains th= e item's identifier; Default value is "dc.identifier.uri" (Optional) |
| Runs the process in test mode with logging. B= ut no changes applied to the DSpace instance. (Optional) |
|
Prevents any changes to the provenance field = to represent changes in the bitstream content resulting from an Add or Dele= te. In other words, when this flag is specified, no new provenance informat= ion is added to the DSpace Item when adding/deleting a bitstream. No proven= ance statements are written for thumbnails or text derivative bitstreams, i= n keeping with the practice of MediaFilterManager. (Optional) |
|
The filter properties files to be used by the= delete bitstreams action (Optional) |
|
Turn on verbose logging. |
Adding Metadata:
[dspace= ]/bin/dspace itemupdate -e joe@user.com -s [path/to/archive] -a dc.descript= ion
This will update all DSpace Items listed in your archive directory, =
adding a new dc.description
metadata field. =
Items will be located in DSpace based on the handle found in 'dc.identifier=
.uri' (since the -i
argument wasn't used, th=
e default metadata field, dc.identifier.uri, from the dublin_core.xml file =
in the archive folder, is used).