Thanks for the (very) fast response helix84.

I actually did look at ItemUpdate. This still requires that you delete 
one bitstream and add another. The delete option requires a bitstream 
ID, which I have no way of knowing by iterating the filesystem.

Unless the internal_id in the bitstream table is unique and corresponds 
to the filename as stored in assetstore, which it now looks likely to me.

If that is true, then I should be able to use ItemUpdate by using the 
filename that I am busy with to do a lookup of the bistream_id in the 
bitstream table.

The question then becomes, am I correct in assuming that the 
bitstream.internal_id field is the actual filename?

If I am to use your other suggestion and calculate my own MD5 checksum 
and insert it into the database, I will then also need to update the 
bitstream.size_bytes field.

Both of these methods sound likely to work, but I think that the 
ItemUpdate is safer. I will test both and let you know.

On 11/01/2012 06:38 PM, helix84 wrote:
> You don't have to make it so complicated, DSpace data structures are
> very sane as opposed to some other systems. After you replaced the
> files in the assetstore, calculate a new MD5 checksum for them and
> store it to the bitstream table. Notice that bitstream file name in
> asset store is not equal to its checksum. The checksum is in the
> bitstream.checksum columns and is indeed MD5.
>
> Don't forget to run index-update after you change the values. Running
> the checksum checker is a matter of course, you know that.
>
> Just to comment on the problem with the mappings:
> you probably used ItemImport with the replace parameter:
> https://wiki.duraspace.org/display/DSDOC3x/Importing+and+Exporting+Items+via+Simple+Archive+Format#ImportingandExportingItemsviaSimpleArchiveFormat-ReplacingItemsinCollection
>
> That one deletes the item and submits a new one. using ItemUpdate
> instead might work as expected:
> https://wiki.duraspace.org/display/DSDOC3x/Updating+Items+via+Simple+Archive+Format
>
> Regards,
> ~~helix84
>


------------------------------------------------------------------------------
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_sfd2d_oct
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to