PS: Attached patch.

*Hilton Gibson*
Ubuntu Linux Systems Administrator
JS Gericke Library
Room 1025D
Stellenbosch University
Private Bag X5036
Stellenbosch
7599
South Africa

Tel: +27 21 808 4100 | Cell: +27 84 646 4758
http://scholar.sun.ac.za
http://bit.ly/goodir
http://library.sun.ac.za
http://za.linkedin.com/in/hiltongibson


On 30 January 2014 13:20, Hilton Gibson <[email protected]> wrote:

> Hi All
>
> Applied patch as per attached tmp.txt.
> Attached patched file.
> See: http://scholar.sun.ac.za/handle/10019.1/86097
> Still incorrect.
> Disabled "Discovery" as a possible cause.
>
> Regards
>
> hg
>
>
> *Hilton Gibson*
> Ubuntu Linux Systems Administrator
> JS Gericke Library
> Room 1025D
> Stellenbosch University
> Private Bag X5036
> Stellenbosch
> 7599
> South Africa
>
> Tel: +27 21 808 4100 | Cell: +27 84 646 4758
> http://scholar.sun.ac.za
> http://bit.ly/goodir
> http://library.sun.ac.za
> http://za.linkedin.com/in/hiltongibson
>
>
> On 30 January 2014 12:40, helix84 <[email protected]> wrote:
>
>> On Thu, Jan 30, 2014 at 11:27 AM, Hilton Gibson <[email protected]>
>> wrote:
>> > I seem to remember now, there were issues with handles that contain
>> dots in
>> > DSpace 3.2, for example 10019.1
>> > What happened with that, were the issues resolved?
>>
>> You're right, here it is:
>> https://jira.duraspace.org/browse/DS-1536
>>
>> Could you please test the patch and report back? There's still time
>> before the 4.1 release and I suggested doing a 3.3 - I think this fix
>> would warrant a 3.3.
>>
>> Don't worry about the existing handles - we'll fix those shortly.
>>
>>
>> Regards,
>> ~~helix84
>>
>> Compulsory reading: DSpace Mailing List Etiquette
>> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>>
>
>
From 45d702c42faede5e58d35ef5631cdd0184a6576d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=80lex=20Magaz=20Gra=C3=A7a?= <[email protected]>
Date: Mon, 29 Jul 2013 14:29:40 +0200
Subject: [PATCH] DS-1536 having a DOT in handle prefix causes identifier.uri
 to be cut off when being created.

---
 .../java/org/dspace/identifier/VersionedHandleIdentifierProvider.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dspace-api/src/main/java/org/dspace/identifier/VersionedHandleIdentifierProvider.java b/dspace-api/src/main/java/org/dspace/identifier/VersionedHandleIdentifierProvider.java
index fc0cbd1..f4bb4c0 100644
--- a/dspace-api/src/main/java/org/dspace/identifier/VersionedHandleIdentifierProvider.java
+++ b/dspace-api/src/main/java/org/dspace/identifier/VersionedHandleIdentifierProvider.java
@@ -545,7 +545,7 @@ protected String modifyHandleRecord(Context context, DSpaceObject dso, TableRow
     protected String getCanonical(Item item)
     {
         String canonical = item.getHandle();
-        if( canonical.lastIndexOf(DOT)!=-1)
+        if( canonical.matches(".*/.*\\.\\d+") && canonical.lastIndexOf(DOT)!=-1)
         {
             canonical =  canonical.substring(0, canonical.lastIndexOf(DOT));
         }
@@ -556,7 +556,7 @@ protected String getCanonical(Item item)
     protected String getCanonical(String identifier)
     {
         String canonical = identifier;
-        if( canonical.lastIndexOf(DOT)!=-1)
+        if( canonical.matches(".*/.*\\.\\d+") && canonical.lastIndexOf(DOT)!=-1)
         {
             canonical =  canonical.substring(0, canonical.lastIndexOf(DOT));
         }
-- 
1.8.5.1
------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
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