Ok.  I will give this a try.

Still two questions:
(1) Where can I get the file Dublin_core.XML?
(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?

Thanks a lot!


On 1/30/07, Jayan Chirayath Kurian <Jayan@ntu.edu.sg> wrote:

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.





From: Pan Family [mailto:pan.family@gmail.com]
Sent: Wednesday, January 31, 2007 4:06 AM
To: Jayan Chirayath Kurian
Cc: Dorothea Salo; dspace-tech@lists.sourceforge.net

Subject: Re: [Dspace-tech] how can I find out the collectionID?


Thanks for your help!

I am working on Mac OS X.  Yes, "pan" contains "tmp"

It seems that for me the dir that I give to source= cannot contain any
subdirs.  For example, if I give it "/Users/pan/" I got an error
complaining about the missing file ".fvwm/dublin_core.xml"
.fvwm is a subdir under "Users/pan/"

If I give it "/Users/pan/tmp/"
then it complains about the same missing file under the subdirs
of "tmp" until I removed all the subdirs under "tmp"
But I still don't get the files under "tmp" imported to my collection,
even if no error shows after I removed all subdirs.

bubba:$ dsrun org.dspace.app.itemimport.ItemImport --add --eperson=pan.family@gmail.com --collection=123456789/2 --source=/Users/pan/ --mapfile=/Users/pan/test_map --test
**Test Run** - not actually importing items.
Destination collections:
Owning  Collection: PODAAC collection
Adding items from directory: /Users/pan/
Generating mapfile: /Users/pan/test_map
Adding item from directory .fvwm
java.io.FileNotFoundException : /Users/pan/.fvwm/dublin_core.xml (No such file or directory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at java.io.FileInputStream .<init>(FileInputStream.java:66)
        at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
        at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java :161)
        at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
        at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.DOMParser.parse (Unknown Source)
        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:172)
        at org.dspace.app.itemimport.ItemImport.loadXML (ItemImport.java:1269)
        at org.dspace.app.itemimport.ItemImport.loadDublinCore(ItemImport.java:795)
        at org.dspace.app.itemimport.ItemImport.loadMetadata(ItemImport.java:780)
        at org.dspace.app.itemimport.ItemImport.addItem (ItemImport.java:626)
        at org.dspace.app.itemimport.ItemImport.addItems(ItemImport.java:498)
        at org.dspace.app.itemimport.ItemImport.main(ItemImport.java:407)
java.io.FileNotFoundException: /Users/pan/.fvwm/dublin_core.xml (No such file or directory)
***End of Test Run***

On 1/29/07, Jayan Chirayath Kurian <Jayan@ntu.edu.sg> wrote:

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.





From: dspace-tech-bounces@lists.sourceforge.net [mailto:dspace-tech-bounces@lists.sourceforge.net] On Behalf Of Pan Family
Sent: Tuesday, January 30, 2007 8:02 AM
To: Dorothea Salo
Cc: dspace-tech@lists.sourceforge.net
Subject: Re: [Dspace-tech] how can I find out the collectionID?


Hi Dorothea:

Thanks a lot for your help!
In my case, the handle is 123456789/2.
So I used the following command to add
a pdf file under /User/pan/tmp, but somehow
the pdf file was not added into the collection
and the file test_map is empty.  No error
message was shown either.  I wonder what
I did wrong.  Could you give me some ideas
on how to debug?

Thanks again,


bubba:~/dspace-1.4.1-source /bin pan$ dsrun org.dspace.app.itemimport.ItemImport --add --eperson=pan.family@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 <dsalo@gmu.edu> wrote:

Pan Family wrote:
> dsrun org.dspace.app.itemimport.ItemImport --add
> --eperson=joe@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?

        You can use the collection's handle for this; go to the collection's home page
and use the numbers after "handle/" in the URL.

        If you should need the internal DSpace collection ID for some reason, though,
log in, surf to the collection page, and then use the "Edit" button under Admin
Tools. From there, choose "Collection's Authorizations," and DSpace will pop up
the "DB ID" in the title of the page.

        (I hope there's an easier way to do this! There certainly should be.)


Dorothea Salo, Digital Repository Services Librarian
(703)993-3742     dsalo@gmu.edu     AIM: gmumars
MSN 2FL, Fenwick Library
George Mason University
4400 University Drive, Fairfax VA 22031

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
DSpace-tech mailing list