-
Notifications
You must be signed in to change notification settings - Fork 488
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
Feature/1013 add bibtex support #3020
Feature/1013 add bibtex support #3020
Conversation
@@ -143,7 +143,8 @@ public BundleDownloadInstance datafileBundle(@PathParam("fileId") Long fileId, @ | |||
|
|||
downloadInstance.setFileCitationEndNote(datasetService.createCitationXML(datasetVersion, fileMetadata)); | |||
downloadInstance.setFileCitationRIS(datasetService.createCitationRIS(datasetVersion, fileMetadata)); | |||
|
|||
downloadInstance.setFileCitationBibtex(datasetService.createCitationBibtex(datasetVersion, fileMetadata)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bmckinney does this mean that the bibtex citation will be available via API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pdurbin I believe this means that it will be included in the zip file produced by datafile/bundle/{fileId}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh. What if I want to get the citation in bibtex format via API? Might be nice. And you could write an integration test around it.
Will this feature ever make it to the online version? My community is very latex centric, if this is not available, I will probably have to use a different data repository |
@amunozj if what you're asking is when will this feature be merged into our develop branch (and therefore be on track to be released on Harvard Dataverse as well as other installations), I can't give a certain answer yet. We're planning a new release (4.4) for April and it possibly will get in for that. Otherwise it should make it to 4.5, the next release, which would be in the May / June time frame. |
Thank you @scolapasta! I will keep my eyes peeled. This is certainly a feature that dataverse is sorely missing. Figshare, and Zenodo allow users to easily export the citation in a host of different formats. |
return createCitationBibtex(version, null); | ||
} | ||
|
||
public String createCitationBibtex(DatasetVersion version, FileMetadata fileMetadata) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bmckinney I mentioned a while ago that it would be great to have unit tests for this createCitationBibtex
method but it hasn't been until today at http://irclog.iq.harvard.edu/dataverse/2016-03-22#i_33154 that I got around to explaining my suggestion. As we discussed, it boils down to using DatasetVersionDTO
and FileMetadataDTO
objects rather than the non-DTO "entity" equivalents you're using now. To see some DTO objects in action see https://github.com/IQSS/dataverse/blob/v4.3/src/main/java/edu/harvard/iq/dataverse/export/ddi/DdiExportUtil.java and the unit tests that exercise them at https://github.com/IQSS/dataverse/blob/v4.3/src/test/java/edu/harvard/iq/dataverse/export/ddi/DdiExportUtilTest.java
The advantage of using these DTO objects is that you can run the unit tests without having PostgreSQL running.
@scolapasta just asked @kcondon to take a look at this pull request (#3020) so you may want to ping @scolapasta on if he'd like you to add unit tests.
OK to merge. |
@amunozj if you'd like to check out this feature I just deployed "v. 4.3 build 16-origin/develop-0c13184" to http://phoenix.dataverse.org @bmckinney from a glance it looks good! |
@pdurbin Ah! beautiful!!! That is awesome! Great job guys! I super impressed with how responsive you are! |
RFI Checklist
Before submitting the pull request, fill out sections (1.) Related Issues and (2.) Pull Request Checklist.
1. Related Issues
2. Pull Request Checklist
3. Review Checklist
After the pull request has been submitted, fill out this section.