Ooops! I meant to address this to Hugh Barnes instead of Andrea Schweer. My
apologies!
George Kozak
Digital Library Specialist
Cornell University Library Information Technologies (CUL-IT)
218 Olin Library
Cornell University
Ithaca, NY 14853
607-255-8924
From: George Stanley Kozak
Sent: Friday, March 21, 2014 1:33 PM
To: 'Andrea Schweer'; [email protected]
Subject: RE: [Dspace-tech] Changing item display to flag embargoed items more
clearly in JSPUI
Andrea:
What we did at Cornell University was add the Embargo date to the item display
(see http://ecommons.library.cornell.edu/handle/1813/29299) and I made a change
to the java code that puts up a display based on the group that controls a
bitstream. So, here at Cornell, we have our embargo code set up to restrict a
bitstream to a specific group "embargo" which has read access to the bitstream.
Click on the bitstream for the item above and you will see the embargo
display.
I have the code for DSpace 1.8.2 and DSpace 3.2 (JSPUI or XMLUI) that does this
. If you are interested in the details, I can send them to you off-list.
Credit where credit is due: the java code that I am using is based on code
originally created by Terry Owen at the University of Maryland.
George Kozak
Digital Library Specialist
Cornell University Library Information Technologies (CUL-IT)
218 Olin Library
Cornell University
Ithaca, NY 14853
607-255-8924
From: Andrea Schweer [mailto:[email protected]]
Sent: Friday, March 21, 2014 12:39 AM
To: [email protected]<mailto:[email protected]>
Subject: Re: [Dspace-tech] Changing item display to flag embargoed items more
clearly in JSPUI
Hi again,
On 21/03/14 17:21, Andrea Schweer wrote:
On 21/03/14 16:46, Barnes, Hugh wrote:
We are implementing the (legacy) embargo functionality in the above
environment. Ideally, we think it's better user interface to inform users that
the item is embargoed, and even not taunt them with a link until that is
lifted. Otherwise, users are denied access without obvious reason (and will
probably contact us about it).
So we really want to edit the single item display page to mark embargoed items
much more clearly for users.
My jspui experience is a few years old -- but might it work to change the logic
in the displayItem method in HandleServlet, similar to what's done for
withdrawn items? See here:
https://github.com/DSpace/DSpace/blob/dspace-3_x/dspace-jspui/src/main/java/org/dspace/app/webui/servlet/HandleServlet.java#L298
except you'd have another if clause to check whether the item is embargoed
according to your legacy definition of embargoed, which may or may not involve
EmbargoManager.getEmbargoTermsAsDate(context,item) != null
If that condition is fulfilled, pass the user on to either the same tombstone
page as for withdrawn items (or a different one if you prefer) like so:
JSPManager.showJSP(request, response, "/tombstone.jsp");
return;
This approach feels a little cleaner to me than messing with extra conditionals
in display-item.jsp.
Actually, never mind me -- I was going by our local definition of "embargo",
which means the entire item is suppressed. If you "only" want to remove the
link to the files on the item page of an embargoed item, your best bet is to
modify the listBitstreams() method in ItemTag.java:
https://github.com/DSpace/DSpace/blob/dspace-3_x/dspace-jspui/src/main/java/org/dspace/app/webui/jsptag/ItemTag.java#L754
-- exactly what you need to do depends on whether you have items where only
some files are embargoed but others are visible.
cheers,
Andrea
--
Dr Andrea Schweer
IRR Technical Specialist, ITS Information Systems
The University of Waikato, Hamilton, New Zealand
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
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