On Mon, May 13, 2013 at 11:25 AM, Jonathan Freesbay
<[email protected]> wrote:
> (1) Is there a programmatically way (in Java) to register (not copy) a
> bitstream on local disk? The only way I see is using itemupdate from the
> command line.

Anything you can call from command line you can call also from Java.
You can find the command line launcher command mappings to java
classes here:
https://github.com/DSpace/DSpace/blob/dspace-3_x/dspace/config/launcher.xml#L114

So the import command with the register parameter is processed here:
https://github.com/DSpace/DSpace/blob/dspace-3_x/dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java#L1237


> (2) I want to add a bitstream to the database (inbox for large files). I do
> this by exporting the item using "dspace export", adding the bitstream to
> the mets-folder and updating the "contents" file and reimporting the item
> using "dspace itemupdate -A". The import part runs fast, but the export part
> may be long based on the size of bitstreams of the item. To fasten the
> process, I want to create an empty metsfile with the dublin_core.xml file, a
> "contents" file containing the new content name and the bitstream itself.
> How can I get the dublin_core.xml file without "dspace export"? Something as
> wget http://server/xmlui/handle/XXX/Y/dublin_core.xml would be fine...


You can get it via OAI-PMH:
http://demo.dspace.org/oai/request?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai:localhost:10673/7

If you don't insist on the DC format, getting METS is even simpler:
http://demo.dspace.org/xmlui/metadata/handle/10673/7/mets.xml
You can use mets with the AIP import/export:
https://wiki.duraspace.org/display/DSDOC3x/AIP+Backup+and+Restore
https://wiki.duraspace.org/display/DSDOC3x/Importing+and+Exporting+Content+via+Packages


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to