Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

1. CitationManager.java
This is a new java class which is used to read and parse the citation configures and assemble the citation for the given item. Please download File__download CitationManager.java  and place it under dspace/dpace-api/src/main/java/org/dspace/app/util directory.

2. FormatIt.java
This new java class is used to customize the metadata fields for the citation. Please see citation-config.xml for details.File__ FormatIt.java  is under dspace/dpace-api/src/main/java/org/dspace/app/util directory too.

3. Item.java
Item.java is where the citation gets generated. When you access an item, the citation will be generated (if configured) and stored into field dc.identifier.citation. It is a in-memory copy and won't be written back to the database. It gives you the flexibility to change the citation format whenever you want. Download File__Download Item.java  (for DSpace 1.5.0) and replace the one under dspace/dpace-api/src/main/java/org/dspace/content directory. Please backup your old copy of Item.java.

4. DSpaceCocoonServlet.java and LoadDSpaceOAIConfig.java
Finally, you need to load your configurations. For XMLUI, this can be done in DSpaceCocoonServlet.java. Download File__Download DSpaceCocoonServlet.java  and replace the one under dspace/dpace-xmlui-api/src/main/java/org/dspace/. If you would like to expose the citation in OAI harvesting, please refer to the changes made in DSpaceCocoonServlet.java and do the same in LoadDSpaceOAIConfig.java. Also, as mentioned earlier, this should work for JSPUI too. You just need to find the appropriate file to load the configuration.

...

You can access the generated citation in dc.identifier.citation just like you access title or author in a Manakin Theme. However, to correctly render the HTML tags in your citation format, you need this xslt script File__htmlHtml-tag-parser.xsl to   to parse them. Here is an example of how to use it -

...