On Mon, Feb 4, 2013 at 12:18 PM, Lighton Phiri <[email protected]> wrote:
> 1. Are there alternative options other than using import utility with
> mapfile [1]. I currently have to query PostgreSQL to get (ITEM_ID
> HANDLE_ID) and then create a map-file to feed to import utility.

So you have item_ids and you just want to skip the lookup part?

One thing you can try is writing a curation task [1]. I've recently
started experimenting with writing them in Jython [2], but you can use
Java or one of several scripting languages.

Another alternative I wanted to suggest is using "[dspace]/bin/dspace
dsrun" to run a class, but I didn't find any class that would just
accept an item_id and delete it for you. processDeleteItem(Context
context, int itemID) seems to be the closest - but there's no way for
you to specify context from command line. So you could write such
class, but that's actually very similar to just writing a curation
task in Java.

> 2. When an item id deleted from repository, is there a way to reset
> the counter for item_id?

Yes, the following script will do it for you. But there shouldn't
really be any need for you to care what the ids are. If you still
decide to run that script, make sure to run it while DSpace is not
running!
[dspace]/etc/postgres/update-sequences.sql

[1] https://wiki.duraspace.org/display/DSDOC3x/Curation+System
[2] https://wiki.duraspace.org/display/DSDOC3x/Curation+tasks+in+Jython


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
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