[Dspace-tech] Best practices for scripted metadata modifications

2007-09-11 Thread Mathias Hjelt
We have a few metadata maintenance related tasks (e.g. scan through the
metadata of items changed since last run and make sure the metadata
complies to certain rules) that we want to automate with scheduled
tasks. As I see it we have the following options:

- shell / perl scripts that use psql and finish by running index-all
- standalone java applications that use jdbc to modify database contents
- java applications based on the DSpace API

I guess using the API would be the safest way to access the metadata,
but I'm wondering if it's overkill for operations that could easily be
carried out with a small number of relatively simple SQL statements in a
script. On the other hand, bypassing the API and tweaking database
contents manually carries the risk of screwing stuff up unintentionally,
unless one's 100% sure about the scripts.. Any thoughts about this?

Some sample code for how to use the API would also come in handy, if
someone happens to have something they want to share. 

Best regards

Mathias Hjelt


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Best practices for scripted metadata modifications

2007-09-11 Thread James Rutherford
On Tue, Sep 11, 2007 at 09:39:05AM +0300, Mathias Hjelt wrote:
 I guess using the API would be the safest way to access the metadata,
 but I'm wondering if it's overkill for operations that could easily be
 carried out with a small number of relatively simple SQL statements in a
 script. On the other hand, bypassing the API and tweaking database
 contents manually carries the risk of screwing stuff up unintentionally,
 unless one's 100% sure about the scripts.. Any thoughts about this?

Yes, using the DSpace API would be the officially recommended route.
Writing scripts would probably be much faster (in terms of development
time), but support would be more difficult and you would have to have a
lot of confidence that you got it right :) Something else to consider is
that if you write scripts, you would need to check that they still
worked every time you updated your DSpace installation (which isn't
going to be very often, presumably).

I don't have any code samples, but depending on what you're doing (and
which version of DSpace you're using), the DSpace Developer guide by
Richard Jones may be of interest:

http://wiki.dspace.org/static_files/7/7d/DevelopersDocumentation.pdf

cheers,

Jim

-- 
James Rutherford  |  Hewlett-Packard Limited registered Office:
Research Engineer |  Cain Road,
HP Labs   |  Bracknell,
Bristol, UK   |  Berks
+44 117 312 7066  |  RG12 1HN.
[EMAIL PROTECTED]   |  Registered No: 690597 England

The contents of this message and any attachments to it are confidential and
may be legally privileged. If you have received this message in error, you
should delete it from your system immediately and advise the sender. To any
recipient of this message within HP, unless otherwise stated you should
consider this message and attachments as HP CONFIDENTIAL.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech