dsrun org.dspace.app.itemimport.ItemImport --add --eperson=j...@user.com --collection=collectionID --source=items_dir --mapfile=mapfile
Hi,
The above command for batch import requires
the collectionID as input. I wonder how
I can find out this ID? Is it the string
that I used to name my collection, or an ID
that DSpace uses internally?
Thanks a lot!
-Pan
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
DSpace-tech mailing list
DSpac...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
Can you please try with source=/Users/pan/
I encountered the same problem on windows platform. This was rectified by giving the main folder name with the import command. I assume that “pan” contains the subfolder “tmp” which infact contains the pdf file. Hope you will let me know if this works with you.
Thanks,
Jayan
I feel the tmp directory should have (1) the Dublin_core.XML (2) contents file and (3) actual resource. The tmp directory should have all these files without any more subdirectories for these files. Can you try with source=/Users/pan/ and removing all subdirectories under tmp and having only these 3 files listed above. Hope it works.
My structure is src = C:\DSpace\bin\archive_directory
The archive_directory contains the directory Item_001
Item_001 contains (1) Dublin_core.XML (2) contents file and (3) actual resource.
There are no more subdirectories under Item_001.
Thanks,
Jayan
From: Pan Family
[mailto:pan.f...@gmail.com]
Sent: Wednesday, January 31, 2007
1:15 PM
To: Jayan
Chirayath Kurian
Cc: Dorothea Salo;
dspac...@lists.sourceforge.net
Subject: Re: [Dspace-tech] how can
I find out the collectionID?
Ok. I will give
this a try.
Still two questions:
(1) Where can I get the file Dublin_core.XML?
Dublin_core.xml contains the meta data descriptions of the resource (e.g. title, date published etc). You have to create the xml file using a notepad.
(2) Let's say I only want
to index one file named: foo.pdf, and I put
it under /Users/pan/tmp/foo.pdf and pass
src=/Users/pan to dsrun
Is foo.pdf considered the content file or the
resource? And which is
the third type of file?
foo.pdf is the resource (i.e. pdf or ppt or jpeg…..)
Content file is a text file that just contains the name of the resource i.e. foo.pdf
Thanks a lot!
-Pan
<?xml version="1.0" encoding="iso-8859-1" ?>
- <!--
title of pdf AMIC_1984_10_CM_03.pdf
-->
- <dublin_core>
<dcvalue element="creator" qualifier="conference">AMIC-Chiangmai University Refresher Course on Communication Research Methodology : Chiangmai, Oct 29-Nov 2, 1984.</dcvalue>
<dcvalue element="title" qualifier="none">The Logic of Social Science Research.</dcvalue>
<dcvalue element="contributor" qualifier="author">Atal, Yogesh.</dcvalue>
<dcvalue element="date" qualifier="issued">1984-10-29</dcvalue>
</dublin_core>
You solved your problem in importing documents or are u using the interface to upload documents into the repository.
Jayan
From: Pan Family [mailto:pan.f...@gmail.com]
Sent: Friday, February 02, 2007 5:19 AM
To: Jayan Chirayath Kurian
Subject: Re: [Dspace-tech] how can I find out the collectionID?
Thanks a lot!
-PanOn 1/31/07, Jayan Chirayath Kurian <Ja...@ntu.edu.sg> wrote:
<? xml version="1.0" encoding="iso-8859-1" ?>
- <!--
title of pdf AMIC_1984_10_CM_03.pdf
-->
- <dublin_core>
<dcvalue element=" creator" qualifier ="conference">AMIC-Chiangmai University Refresher Course on Communication Research Methodology : Chiangmai, Oct 29-Nov 2, 1984.</dcvalue >
<dcvalue element=" title" qualifier ="none">The Logic of Social Science Research. </dcvalue>
<dcvalue element=" contributor" qualifier ="author">Atal, Yogesh. </dcvalue>
You solved your problem in importing documents or are u using the interface to upload documents into the repository.
Sent: Friday, February 02, 2007 5:19 AM
To: Jayan Chirayath Kurian
Subject: Re: [Dspace-tech] how can I find out the collectionID?
Thanks a lot!
-PanOn 1/31/07, Jayan Chirayath Kurian <Ja...@ntu.edu.sg> wrote:
<? xml version="1.0" encoding="iso-8859-1" ?>
- <!--
title of pdf AMIC_1984_10_CM_03.pdf
-->
- <dublin_core>
<dcvalue element=" creator" qualifier ="conference">AMIC-Chiangmai University Refresher Course on Communication Research Methodology : Chiangmai, Oct 29-Nov 2, 1984.</dcvalue >
<dcvalue element=" title" qualifier ="none">The Logic of Social Science Research. </dcvalue>
<dcvalue element=" contributor" qualifier ="author">Atal, Yogesh. </dcvalue>
<dcvalue element=" date" qualifier ="issued">1984-10-29 </ dcvalue>
</dublin_core>
> -e= pan.f...@gmail.com -c=123456789/2 -s=C:\DSpace\bin\archive_directory
> org.apache.xerces.parsers.XMLParser.parse (Unknown Source)
> --eperson= pan.f...@gmail.com --collection=123456789/2
> --source=/Users/pan/tmp/ --mapfile=/Users/pan/tmp/test_map
> > > > Destination collections:
> > > > Owning Collection: PODAAC collection
> > > > Adding items from directory: /Users/pan/tmp/
> > > > Generating mapfile: /Users/pan/tmp/test_map
> > > >
> > > >
> > > > On 1/29/07, Dorothea Salo < ds...@gmu.edu> wrote:
> > > >
> > > > Pan Family wrote:
> > > > > dsrun org.dspace.app.itemimport.ItemImport --add
> > > > > --eperson= j...@user.com --collection=collectionID --source=items_dir
Thanks, Stephen!
I used --add --resume and it worked: If the items under my archive_dir
are the same, nothing is added. But if I add new items under
the archive_dir, only the new items are added.
I assume that I can use the same mapfile in this way, and as
I grow the number of items under the archive_dir, my mapfile
will have more and more items listed in the file. Correct?
--replace did not work for me. I got NullPointerException,
as shown below. What is the right way of using --replace?
Thanks,
-Pan
-------- error from --replace -------------
dsrun org.dspace.app.itemimport.ItemImport --replace --eperson= pan.f...@gmail.com --collection=123456789/2 --source=/Users/pan/tmp/ --mapfile=/Users/pan/matfile2.txt
Destination collections:
Owning Collection: PODAAC collection
Replacing: 123456789/18
java.lang.NullPointerException
at org.dspace.app.itemimport.ItemImport.deleteItem (ItemImport.java:692)
> --eperson= pan.f...@gmail.com --collection=123456789/2
> --add --eperson= pan.f...@gmail.com --collection=123456789/2
Hi! Pan,
For replacing items in Dspace
Say, you have a jpg item in one of the folders from which you are importing. You want to replace that item with a modified version of the jpg file. Save the modified version of the jpg in the respective folder and issue the command. The item will be replaced. The same can be applied if you want to replace a jpg item with a pdf item.
Thanks,
Jayan
C:\DSpace\bin>dsrun org.dspace.app.itemimport.ItemImport -a --replace -e nack@nt
u.edu.sg -c 123456789/153 -s c:\dspace\bin\archive_directory -m mapfile100
Using DSpace installation in: C:\DSpace
Destination collections:
Owning Collection: First Collection
Replacing: 123456789/174
Adding item from directory item_002
Loading dublin core from c:\dspace\bin\archive_directory\item_002\dublin
_core.xml
Schema: dc Element: date Qualifier: issued Value: 1971
Schema: dc Element: title Qualifier: none Value: Mass Communication In P
akistan
Schema: dc Element: contributor Qualifier: author Value: Abdus Salam Khu
rshid
Processing contents file: c:\dspace\bin\archive_directory\item_002\conte
nts
Bitstream: AMIC_1971_09_11.jpg
Processing handle file: handle
read handle: '123456789/174'