dspace

Dspace: Add current download date in citation cover page dynamically


I am following this wiki https://wiki.duraspace.org/display/DSDOC5x/PDF+Citation+Cover+Page

and configured to add cover page on fly using config/module/disseminate-citation.cfg, which works fine.

There is new requirement raised to add current date (when user download pdf) on citation cover page.

Creating a new Metadata field and add value in it. but how can we add dynamic code snippet so It will get current server date rather than fix date?

I had a look to dspace-5.5-src-release\dspace-api\src\main\java\org\dspace\disseminate\CitationDocument.java

But could not find any way to add date without changing core code, which I would like to avoid.

I am kind of new to Dspace, any help/direction would be appreciated.


Solution

  • While I am not familiar with the citation cover page feature of DSpace, I would recommend that you look at the source code overlay process. It is fairly easy to override individual classes without needing to pull in an entire branch of code.

    See https://wiki.duraspace.org/display/DSDOC5x/Advanced+Customisation#AdvancedCustomisation-Additionsmodule

    In order to override

    you simply need to copy that file to