Discussion:
[Dspace-tech] Handle service
Stephano John
2015-08-14 11:31:21 UTC
Permalink
Dear all,

We have not implemented any handle services in our repository. After
accepting the document to be archived in our repository, the submitter gets
the following message

Your submission has been accepted and archived in DSpace,
and it has been assigned the following identifier:
http://hdl.handle.net/123456789/390
Please use this identifier when citing your submission.

But when you click the link, you get the following message

[image: Handle.net Logo]

The handle you requested, *123456789/390*, could not be found.

This handle is not valid. The numbers 123456789 are just a place holder for
a valid handle prefix. It appears the DSpace site you encountered has not
yet implemented handles. You will need to send an email to a contact from
the DSpace site. There is nothing we can do from this end. Good luck.

I know we need to have a mechanism of identifying all the records submitted
with its handle. Can any one give us steps on how to implement the same or
DOI??
Mark H. Wood
2015-08-14 16:56:40 UTC
Permalink
Post by Stephano John
We have not implemented any handle services in our repository. After
accepting the document to be archived in our repository, the submitter gets
the following message
Your submission has been accepted and archived in DSpace,
http://hdl.handle.net/123456789/390
Please use this identifier when citing your submission.
But when you click the link, you get the following message
[image: Handle.net Logo]
The handle you requested, *123456789/390*, could not be found.
This handle is not valid. The numbers 123456789 are just a place holder for
a valid handle prefix. It appears the DSpace site you encountered has not
yet implemented handles. You will need to send an email to a contact from
the DSpace site. There is nothing we can do from this end. Good luck.
I know we need to have a mechanism of identifying all the records submitted
with its handle. Can any one give us steps on how to implement the same or
DOI??
First: you can easily change the constant text of the email template.
It is in config/emails/submit_archive. You could explain that the
Handle has only local meaning instead of recommending it for citation.
This edit would take only a moment.

You could provide the local working URL for the Item to the email
formatter, so that it can be merged into the text in place of (or
addition to) the unusable Handle URL. This is done in
org.dspace.workflow.WorkflowManager at around line 770 using
email.addArgument(String). I needed to do this just recently. I
suggest simply adding a new argument rather than bothering to replace
the call that adds the Handle argument.

You mention DOI. Are you providing DOIs for your site's submissions?
You could easily provide a DOI argument to the submit_archive
template. That was the change I needed to make:

-----------8<--cut here for patch---8<-----------------------------
diff --git a/dspace-api/src/main/java/org/dspace/workflow/WorkflowManager.java b/dspace-api/src/main/java/org/dspace/workflow/WorkflowManager.java
index db06c55..70ab452 100644
--- a/dspace-api/src/main/java/org/dspace/workflow/WorkflowManager.java
+++ b/dspace-api/src/main/java/org/dspace/workflow/WorkflowManager.java
@@ -38,6 +38,7 @@ import org.dspace.curate.WorkflowCurator;
import org.dspace.eperson.EPerson;
import org.dspace.eperson.Group;
import org.dspace.handle.HandleManager;
+import org.dspace.identifier.DOI;
import org.dspace.storage.rdbms.DatabaseManager;
import org.dspace.storage.rdbms.TableRow;
import org.dspace.storage.rdbms.TableRowIterator;
@@ -768,6 +769,17 @@ public class WorkflowManager
email.addArgument(coll.getMetadata("name"));
email.addArgument(HandleManager.getCanonicalForm(handle));

+ // Argument {3} is "best" identifier: DOI if present, or Handle.
+ String doi = HandleManager.getCanonicalForm(handle);
+ for (String identifier : i.getIdentifiers(c))
+ if (identifier.startsWith(DOI.SCHEME)
+ | identifier.startsWith(DOI.RESOLVER))
+ {
+ doi = identifier;
+ break;
+ }
+ email.addArgument(doi);
+
email.send();
}
catch (MessagingException e)
diff --git a/dspace/config/emails/submit_archive b/dspace/config/emails/submit_archive
index 187cb53..89240b3 100644
--- a/dspace/config/emails/submit_archive
+++ b/dspace/config/emails/submit_archive
@@ -2,7 +2,8 @@
#
# {0} Title of submission
# {1} Name of collection
-# {2} handle
+# {2} handle
+# {3} DOI (or Handle if none)
#
Subject: DSpace: Submission Approved and Archived

@@ -14,6 +15,6 @@ Your submission of {0} to {1} has been accepted for deposit. This item
will be archived to provide long-term access.

Your submission has been assigned a digital object identifier [DOI] to
-enable easy citation and discovery. This identifier is: {2}
+enable easy citation and discovery. This identifier is: {3}

Explore how your data is being viewed and downloaded at {2}/statistics.
-----------8<--cut here for patch---8<-----------------------------

The above patch is against DSpace 5.2.
--
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu
Loading...