Page History
Panel | ||||||
---|---|---|---|---|---|---|
Contents
|
...
Background
At Leiden University, The Netherlands, we use DSpace among other things for "Dissertations Online" https://openaccess.leidenuniv.nl/handle/1887/492
Sometimes the dissertation is in the repository, but the publisher disallows the distribution of the full text of the dissertation or part of the dissertation. It must be under embargo. Because DSpace 1.3.2 did not support this kind of behaviour, we implemented it.
...
Here you can see the functionality at work:
https://openaccess.leidenuniv.nl/handle/1887/12291
https://openaccess.leidenuniv.nl/handle/1887/12151
Note: our DSpace implementation has lots of other modifications, including a very different look and feel. This is not included in this patch.
...
Code Block |
---|
Date date = bitstreams[k].getEmbargoEndDate();
if (bitstreams[k].isEmbargoed() && (handle != null || date != null))
\{
out.println(LocaleSupport.getLocalizedMessage(pageContext,
"org.dspace.app.webui.jsptag.ItemTag.underEmbargo"));
if (date != null)
\{
out.print(LocaleSupport.getLocalizedMessage(pageContext,
"org.dspace.app.webui.jsptag.ItemTag.embargoUntil"));
Calendar cal = Calendar.getInstance();
cal.setTime(date);
out.print(cal.get(Calendar.DAY_OF_MONTH));
out.print("/");
out.print(cal.get(Calendar.MONTH) + 1);
out.print("/");
out.println(cal.get(Calendar.YEAR));
\}
\}
Context context = null;
boolean allowed = false;
try \{
context = UIUtil.obtainContext(request);
allowed = AuthorizeManager.authorizeActionBoolean(context,bitstreams[k],Constants.READ);
\}
catch (SQLException e) \{
allowed = false;
\}
if (!bitstreams[k].isEmbargoed() || allowed)
\{
out.println(bsLink
+ LocaleSupport
.getLocalizedMessage(
pageContext,
"org.dspace.app.webui.jsptag.ItemTag.view")
+ "</a>");
\}
out.println("</td></tr>");
|
...
Code Block |
---|
jsp.dspace-admin.general.startdate-colon = Start date: jsp.dspace-admin.general.enddate-colon = End date: jsp.dspace-admin.general.startdate-help = (dd/mm/yyyy or blank) jsp.dspace-admin.general.enddate-help = (dd/mm/yyyy or blank) jsp.dspace-admin.general.period = Period jsp.submit.choose-file.embargohead =If the file is under embargo, please enter the end date of the embargo below jsp.submit.choose-file.embargo =Embargo Ends on: jsp.submit.choose-file.embargohelp = (dd/mm/yyyy, is optional) jsp.submit.upload-file-list.tableheading7 = Embargo jsp.submit.upload-file-list.no-embargo = None org.dspace.app.webui.jsptag.ItemTag.underEmbargo = Under Embargo org.dspace.app.webui.jsptag.ItemTag.embargoUntil = until |
Step 4: Change more JSP files (optional)
...
With the following perl script you can set or remove the embargo of a list of items in one go:
setembargo.plMissing File: Setembargo.pl
The script is executed from the command line and gets 2 arguments:
...