Title: Message Title
|
|
Hi Alex Did the patch on the test server and did a test submission. It works. So I must have done an incorrect patch before on the production server. Here is the new code. >>> protected String getCanonical(Item item) { String canonical = item.getHandle(); if( canonical.matches(".*/.*\\.\\d+") && canonical.lastIndexOf(DOT)!=-1) { canonical = canonical.substring(0, canonical.lastIndexOf(DOT)); } return canonical; } protected String getCanonical(String identifier) { String canonical = identifier; if( canonical.matches(".*/.*\\.\\d+") && canonical.lastIndexOf(DOT)!=-1) { canonical = canonical.substring(0, canonical.lastIndexOf(DOT)); } return canonical; } >>> And here is the patch applied from the source folder, in my case, /home/dspace/source or /home/dspace/dspace-3.2-src-release >>> From 45d702c42faede5e58d35ef5631cdd0184a6576d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=80lex=20Magaz=20Gra=C3=A7a?= <alexandre.ma...@udl.cat> 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 >>> What a relief !!
|
|
|
|
|
|
|
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Dspace-devel mailing list
Dspace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-devel