[
https://jira.duraspace.org/browse/DS-1536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=27957#comment-27957
]
Jose Blanco commented on DS-1536:
---------------------------------
At our institution where our handle.prefix has a dot (2027.42), when an item
was deposited, the identifier.uri created was being cutoff at the 2027. I made
the following changes to
VersionedHandleIdentifierProvider.java
and the identifier uri did not get cut off. Note that I am not using
versioning, so this was not tested with a system that has versioning.
This change is in ==> public void register(Context context, DSpaceObject dso,
String identifier)
133,134c133,135
< if(!identifier.matches(".*/.*\\.\\d+$") && itemHistory!=null){
< int newVersionNumber =
itemHistory.getLatestVersion().getVersionNumber()+1;
---
> if(!identifier.matches(".*/.*\\.\\d+") && itemHistory!=null){
>
> int newVersionNumber =
> itemHistory.getLatestVersion().getVersionNumber()+1;
140c141
< else if(identifier.matches(".*/.*\\.\\d+$"))
---
> else if(identifier.matches(".*/.*\\.\\d+"))
This change is in ==> protected String getCanonical(Item item)
548,554c550
< //Make sure the handle prefix does not have a dot, in other
< //words that the dot correspondes to the version, and not the
< //handle prefix
< if(canonical.matches(".*/.*\\.\\d+$"))
< {
< canonical = canonical.substring(0, canonical.lastIndexOf(DOT));
< }
---
> canonical = canonical.substring(0, canonical.lastIndexOf(DOT));
> having a DOT in handle prefix causes identifier.uri to be cut off when being
> created.
> -------------------------------------------------------------------------------------
>
> Key: DS-1536
> URL: https://jira.duraspace.org/browse/DS-1536
> Project: DSpace
> Issue Type: Bug
> Components: DSpace API
> Affects Versions: 3.0
> Reporter: Jose Blanco
> Priority: Critical
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel