Hi,

I've written a java class to do this. I put it here
http://hdl.handle.net/10197/6335 in case anyone would like to use it in
future.

Description and usage:

DSpace utility to withdraw and reinstate a list of items. Withdraws items
via the DSpace API. Removes items from browse indexes, OAI-PMH interface and
updates the dc.description.provenence field as expected. Tested on DSpace
1.8.2. Install in
[dspace_src]/dspace/modules/api/src/main/java/org/dspace/content and rebuild
DSpace. Call by running [dspace]/bin/dspace dsrun
org.dspace.content.BulkWithdraw login_email password itemIdsFile
[reinstate]. ItemIDsFile is a list of DSpace item_ids to be withdrawn, one
item_id per line. The default mode is withdraw. Optionally, add 'reinstate'
as the fourth argument to completely reverse the process.

Disclaimer:

This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option)
any later version. This program is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details. You should have received a copy of the GNU
General Public License along with this program. If not, see
<http://www.gnu.org/licenses/>. This program uses third-party libraries
which may be distributed under different licenses to the above. Information
about these licenses is detailed at <http://www.dspace.org/license/>.

Regards,
Joseph

-----Original Message-----
From: Joseph Greene [mailto:[email protected]] 
Sent: 30 January 2015 09:58
To: [email protected]
Subject: Bulk withdraw tool?

Hi,

I have a list of item_ids based on an sql query, e.g.

item_id
----------
2
3
15
23
...
(582 rows)

I'd like to withdraw the items from DSpace. I assume it isn't safe to just
change the item.withdrawn field to 'true' (side effects for solr, oai_pmh,
etc). Is this correct?

Does anyone have or know of a tool to withdraw these via the command line?
After looking I only found the bulk metadata edit tool, but these items are
scattered across several collections.

Best regards,
Joseph


Joseph Greene
Research Repository Librarian
James Joyce Library
University College Dublin
(353 0)1 716 7398
[email protected]
http://researchrepository.ucd.ie






------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to