helix84, To clarify...
On 1/12/2011 9:49 AM, helix84 wrote: > Thank you for your response. > > On Wed, Jan 12, 2011 at 16:21, Tim Donohue<[email protected]> wrote: >> This auto-incrementing number ensures the next assigned handle is always >> unique, and won't accidentally create a conflict in the system. > > I'm aware that there's a sequence in database which accomplishes this. > >> However, that being said, in DSpace 1.7.0, the underlying API now adds the >> ability to *assign* your own specified handles to newly created objects >> (Communities, Collections& Items). See these 1.7.0 API methods.. >> >> Collection.create(context,handle) >> Community.create(parent,context,handle) >> InstallItem.installItem(context,submission,handle) >> >> At this point in time, these methods are *not* used by the DSpace UIs >> (XMLUI, JSPUI etc), since DSpace doesn't yet have another method to >> determine unique handles. > > I'm not sure I understand what you mean here by "method", since the > first method is the sequence. > Here, I mean there are *Java API* methods which would allow you to assign your own handles. But, currently they are not used anywhere *except* for in the new 1.7.0 AIP Backup & Restore feature: https://wiki.duraspace.org/display/DSDOC/AIP+Backup+and+Restore >> But, you would need to do some customizations to the UI to >> ensure it was somehow determining the next unique handles to assign. > > Here I thought generating the handle has nothing to do with UI, > because the handle.handle column contains '12345/6789'. So I imagined > if I changed only the generating code, there would be nothing to > change in the reading/UI part. Is this wrong? Technically, you are right. I was talking about an alternative way to get around this issue, if you knew Java. So, currently, the DSpace API assigns handles (and the UI has nothing to do with handle assigning). What I was pointing out is that there's now a way in the API to specify your own handles. However, the UI doesn't know about this, and nothing else currently uses it. So, it's in the API, but another bit of API code (or UI code) would need to be written in Java to make it work how you want it to work. > > What if I only changed this (dspace/etc/oracle/update-sequences.sql:97): > > @updateseq.sql handle_seq handle "to_number(regexp_replace(handle, > '.*/', ''), '999999999999')" "WHERE REGEXP_LIKE(handle, > '^.*/[0123456789]*$')" Changing update-sequences.sql won't do anything. This SQL file is actually not used by DSpace. It's only there for System Admins to use after a restore from backup (as it ensures their handle sequence is reset properly). > >> But, should you go this route, I'm sure others would be interested in the >> work >> (and it could also lead towards a new feature in a future version of >> DSpace). > > I'm afraid I don't have the Java skills needed, so anything may I do > will probably be limited to my simple use case of a static prefix to > the local handle part. Though I can imagine other useful use cases - > like generating a prefix for each comunity, i.e. "/comm1.1234", > "comm2.1234" and some less useful ones like a hash or UUID. Ok, no worries then. I wasn't sure if you knew Java or not. If you did, or if we can find someone else who is interested, I think this could make a nice feature. - Tim ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ DSpace-tech mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dspace-tech

