-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSL Citation support #11163
Open
qqmyers
wants to merge
30
commits into
IQSS:develop
Choose a base branch
from
GlobalDataverseCommunityConsortium:DANS-CSL
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
CSL Citation support #11163
qqmyers
wants to merge
30
commits into
IQSS:develop
from
GlobalDataverseCommunityConsortium:DANS-CSL
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it: This PR adds support for viewing/copying dataset citations in any of the journal/society citation formats described in the Citation Style Language like Zotero, Mendeley, and others. (Strictly just the 1000K+ "independent" ones as coded, but that could be changed.)
Which issue(s) this PR closes:
It's related to #10512 in that it provides a copy-to-clipboard option for retrieving a citation, but it does not add a copy button for the main (custom) citation displayed on the dataset page.
It's also relevant w.r.t. #9994. It doesn't adopt the design discussed there of making the EndNote/RIS/BibTeX formats into exports (which are currently only available for the latest version).
Special notes for your reviewer: The PR uses a combination of Java and Javascript libraries that have overlapping functionality. As coded, the Java library is only used to create the ~native CSLJson format which is then sent to the front end where Javascript reads that and generates any of the available formats. I'm hoping this makes more sense for the SPA than doing everything in the back-end Java. The PR includes an
/api/pids/<pid>/csl
api call that will return the CSLJson required by the front-end Javascript.The code also leverages DataCite's API to get their version of CSL for DataCite DOIs for the latest published version of the dataset. This should assure that Dataverse's output would match that from those generated externally from the DOI. For drafts and older versions, and for other PID types, the Java library noted above is used to generate the CSLJson required. This is a compromise but gives us the opportunity to see if/when DataCite's mapping to CSLJson differs from our own.
The PR includes an API call as well, which is hopefully useful for the SPA - as a way to get the EndNote/RIS/BibTeX formats (and the Internal one without the JSON wrapper if that's helpful) as well as to get the CSLJson which could then be transformed by the JavaScript library used here or others to generate all the other styled formats. The one thing that this PR does not do that is supported by the current download mechanism is assigning a filename to the download. That shouldn't be hard to do if it's useful, but would take a little refactoring.
Suggestions on how to test this: Create a Dataset with lots of metadata and verify that the popup allows you to generate an copy any format you select.
Set the dataverse.csl.common-styles JVM option to a comma-separated list of formats other than "chicago-author-date, ieee" and verify that the entries for common styles in the dialog match.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Is there a release notes update needed for this change?: added
Additional documentation: UI, API, and setting documented.