Gary McGath wrote:
> Sigh ... Implemnting embargo on the Manakin side of DSpace 1.5 is 
> proving to be the bane of my life. I appreciate the suggestions I've 
> received, but most of them require waiting, and that isn't an option.
> 
> Anyway, I've been trying to implement a variant of Embargo v2 
> (http://wiki.dspace.org/index.php/Embargo_on_Bitstream_v2_%28JSP%29), 
> and making some progress. It comes down to a modification to 
> dspace-api/src/main/java/org/dspace/content/InstallItem.java , where I 
> add the following code to installItem:

I've found the problem, or at least a major part of it. In the Wiki, I'd 
provided Oracle code to set the primary key with a trigger, since the 
DEFAULT clause isn't legal under Oracle. But this was conflicting with 
DSpace's wrapper classes, with the result that the primary key was 
apparently being set twice. This meant that the UPDATE statement 
generated by DatabaseManager.java used a primary key value that didn't 
belong to the row it was trying to update.

I altered my database to remove the trigger, and now at least rows are 
appearing in the UMRESTRICTED table which have actual data. I'm 
wondering if the DEFAULT clause should be there at all, even for 
Postgresql. I'm far from an SQL expert, so my conclusions should be 
treated with caution.

I've updated the wiki page 
(http://wiki.dspace.org/index.php/Embargo_on_Bitstream_v2_%28JSP%29#Create_Database_Tables)
 
to delete the offending trigger, so that now the Oracle code looks just 
like the old SQL except for the absence of a DEFAULT clause.

If there are further issues with this, I'll post again to the list.


-- 
Gary McGath
Digital Library Software Engineer
Harvard University Library Office for Information Systems
http://hul.harvard.edu/~gary/index.html


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to