I have to disagree with Christian because an item's item_id in the
database is NOT the same as an item's Handle. An item's Handle (in
Dspace terminology) is something like 123456789/123, while the item_id
is a single number (e.g 75) which does not have to be the same as the
postfix part of the Handle (i.e. an item in your repository may have
item_id 75 in the database while it's Handle is 123456789/123.)

The ItemImport tool automatically determines whether you've passed it a
Handle or an id:

                // is the ID a handle?
                if (collections[i].indexOf('/') != -1)
                {
                    // string has a / so it must be a handle - try and
resolve
[....]
                }
                // not a handle, try and treat it as an integer
collection
                // database ID

In other words, if the passed argument contains a slash character, it's
treated as a handle, otherwise as a database ID.

Best regards

Mathias Hjelt



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Christian Voelker
Sent: 9. syyskuuta 2007 11:06
To: wang jiahui
Cc: dspace-tech
Subject: Re: [Dspace-tech] about itemImport tool

Hello,

Am 09.09.2007 um 09:46 schrieb wang jiahui:

> I read that the there is an option named *-c* in ItemImport tool.
> The source file says that it means *destination collection(s)  
> Handle or database ID*.
> But I am confused that if we input a number, how does it know that  
> this is a handle
> or a database ID (collection ID)?

I guess it is just the same. When a handle gets
created, simply put, this is the row number in
the database. It is just a different perspective.
If you look at the URL, you will call this number
the handle, if you are the backend guy, you look
at the db and say it is the collection ID.

Bye, Christian


------------------------------------------------------------------------
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to