[Building Sakai] Bulk changes to content resources

Raad Al-Rawi Raad.Al-Rawi at admin.cam.ac.uk
Fri Feb 3 06:31:26 PST 2012


Hello All

My understanding of content hosting on Sakai 2.7 is that metadata for content is serialised in the BINARY_ENTITY field in CONTENT_RESOURCE
I would like to make a bulk change to a given attribute (mime type), but of course this is not possible with a straight text replace operation at the db level (unless the change happens to perfectly preserve the block affected, which mine doesn't).

So, I'm guessing it's a case of writing some java code.
Has anyone done this sort of operation, and if so, is there some code that I could reuse?

Cheers

Raad

(incidentally, this has been brought about by a change in Google Chrome, which no longer supports the "x-pdf" mime type, displaying a blank page if one is clicked on in Resources. I have over 46,000 of these in our system, so I'd really like to fix them!)

~~
Raad Al-Rawi
CamTools Operations Analyst
University of Cambridge

Management Information Services Division
Greenwich House
Madingley Rise
Cambridge
CB3 0TX
UK

Tel: +44 (0)1223 760905



More information about the sakai-dev mailing list