Citation Sharing Technology

From Dryad wiki
Jump to: navigation, search

Overview

Dryad provides the ability to download a citation for a data package stored in Dryad. It also provides the ability to 'bookmark' a link to a data package on a variety of social networking sites (e.g., Delicious, Facebook, Digg, Mendeley, etc.) Both of these options are available from the item view pages for data files and packages. If the option to download a citation (or bookmark) is made from a data file page, the information for that file's data package will be used as what's cited (or bookmarked) -- instead of the information from the data file.

Functionality

The functionality provided by the citation download is related to Dryad's DOI module. Inside that module is a CitationServlet Java class that resolves the DOI provided as the authoritative reference for that data package. Once the DOI is resolved to a DSpace record, the metadata for that record is extracted and converted into either the BibTex or RIS format and made available for download from the servlet.

The sharing works in a slightly different way. It uses the metadata from the data package but because we're just building a link to a remote social networking site, we can use the metadata that is already available to the XSLT that renders the item view page (and the links to the remote social networking sites). One thing this depends on is the ability to make the data package's metadata available on the data file's item view page.

The data package's metadata is included in the display for the data file thanks to the org.datadryad.dspace.xmlui.aspect.browse.ItemViewer class. This is a modification of the ItemViewer class that comes with DSpace. Because we've completely co-opted the ItemViewer, though, to represent the package to file relationship, we've moved this ItemViewer class into the org.datadryad.dspace package and changed the DSpace Discovery aspect to use this viewer (instead of the standard DSpace ItemViewer).

Question: Why is the ItemViewer in the DSpace Discovery module in the first place? Seems like there would be a better place for it.

Both of these mechanisms rely on the DryadItemSummary.xsl file to construct the links that provide the functionality and to present the options underneath the "How to cite a Dryad package" box. In the design stage, we decided we didn't want the cite and share options visible at first glance, but hidden in a div that is exposed to the user when s/he clicks on the option to "cite | share" (displayed under the citation display when they are visible).

The JavaScript that hides and displays the divs with the cite and share options is the utils.js file, a !JavaScript file that contains some generic utilities used throughout the site.

COinS is also supported by Dryad. Sites like Mendeley and Zotero can read the COinS data in a page and enable the page to be bookmarked through their (Mendeley's and Zotero's) browser plugins. The COinS information is put into the HTML page via the Dryad theme's XSLTs, specifically the DryadUtils.xsl file, which provides some general templates for use by the other XSLTs.

Workflow

Sharing

  1. User visits item page (package or file)
  2. XSLT pulls metadata from the item record or the page metadata (e.g., in the case of the data file, the ItemViewer has put Dryad data package metadata into the pageMeta element)
  3. XSLT constructs a link from DOI, title, etc. and uses the remote site supplied iframe, HTML, or JavaScript to pass this information on through the link
  4. XSLT displays this option in a hidden div whose content can be viewed by the user by clicking on the option to view it (under the citation information at the top of the page)
  5. When a user clicks this option, the hidden div is made visible by the utils.js !JavaScript
  6. The user clicks the link and is taken to the remote site with all or some of the form information supplied by the metadata values in the link they followed

Citation

  1. User visits item page (package or file)
  2. XSLT presents an option to cite, which is hidden by default, but displayed by the utils.js !JavaScript when the user clicks the "cite" link
  3. An option for RIS or !BibTex is presented to the user in the form of a parameterized link
  4. The user clicks on a link and is sent to the CitationServlet with information about which format they want
  5. The CitationServlet uses the DOI that is sent and resolves that to a DSpace item record
  6. The servlet extracts the metadata from the DSpace item record
  7. The servlet formats this metadata as either RIS or !BibTex, depending on which parameter it receives, and sends the data citation back to the browser as a data stream
  8. The user is given the option to download the data to their file system where their citation management software can then import it

Configuration

The 'configuration' of both these options occurs in the code itself: in the share option, the methods of linking out to the remote social networking sites (as well as which sites are chosen) is done in the XSLT. We basically just use the code (either plain link, iframe, or JavaScript, that the remote site provides for use). Which ones are displayed depends on which ones are included in the ItemSummaryView XSL.

The configuration of which citation formats are supported (currently BibTex and RIS) is built into the CitationServlet itself. There are separate methods for rendering the item metadata into the official citation format. More formats could be supported by adding additional methods, though we've determined the RIS format covers most of the citation management software packages (Endnote, etc.)

Relation to DSpace

This functionality is related to the DSpace Discovery ItemViewer in that it is this class that is overlaid to provide the additional functionality required by Dryad. There are others in the DSpace community taking a different approach to providing this functionality. There are some social networking sites that will provide a drop-in mechanism for bookmarking on other sites. Some are using this and this might be something Dryad wants to look at in the future. One downside to the current method is that some of the sites require resolution of additional content (through JavaScript or iframes). This causes a delay in the Dryad page loading while these remote resources are resolved, though the main content of the page displays almost instantly.