Print

Print


Mr. Banerjee--

I'll assume that you're using a recent version of Fedora (3.x series). 

You've got a number of methods at your disposal, including the batch ingest scripts, but if you can write some simple scripts, you can use Fedora's REST interface to create objects by:

POST to MY_FEDORA/objects/new
or 
POST to MY_FEDORA/objects/my-pid

If you use "new" Fedora will return a PID (persistent ID for the new object) or you can select one yourself (as shown above). In either case you can then use the PID of the object to add datastreams by:

POST to MY_FEDORA/objects/my-pid/datastreams/datastream-id

e.g. MY_FEDORA/objects/test:345/datastreams/DC 
and
MY_FEDORA/objects/test:345/datastreams/JPG

or the like. That's all you need do. I suggest that might be the simplest approach. Take a look at the documentation on the REST interface:

https://wiki.duraspace.org/display/FCR30/REST+API

and I think you'll find it pretty clear and useful. The "create an object" method I describe above is called "ingest" for historical reasons. You'll find its documentation at:

https://wiki.duraspace.org/display/FCR30/REST+API#RESTAPI-ingest

The "add a datastream" method is documented at:

https://wiki.duraspace.org/display/FCR30/REST+API#RESTAPI-addDatastream

Good luck!

---
A. Soroka
Digital Research and Scholarship R & D
the University of Virginia Library



On Jul 28, 2010, at 11:00 PM, CODE4LIB automatic digest system wrote:

> From: Kyle Banerjee <[log in to unmask]>
> Date: July 28, 2010 7:36:34 PM EDT
> Subject: Batch loading in fedora
> 
> 
> Howdy all,
> 
> I've never used fedora before, and I've found myself in the position of
> needing to load thousands of objects with metadata into a test instance
> which I don't maintain (and won't have to maintain later). Timeline is tight
> so I need to figure this out fast.
> 
> The data are very simple -- DC records which correspond with a bunch of
> image files that I have
> 
> In the short time I've had to familiarize myself with fedora today, it
> appears that I need to use the batch utility. I've found some documentation,
> most notably at
> http://www.fedora-commons.org/download/1.0/userdocs/client/admin-gui/batch/<http://www.fedora-commons.org/download/1.0/userdocs/client/admin-gui/batch/index.html#d0e220>
> but
> I'm wondering where else I need to look.
> 
> If someone could point me to documentation (or better yet, an example) that
> a n00b could use fairly quickly prep what I have so that it will be ready to
> go in, it would be highly appreciated. I'm concerned that if I try to plow
> through documentation until I get it, I'll run out of time.
> 
> Thanks,
> 
> kyle
> 
> -- 
> ----------------------------------------------------------
> Kyle Banerjee
> Digital Services Program Manager
> Orbis Cascade Alliance
> [log in to unmask] / 503.999.9787