Skip to content
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

[Spike - API] Extend the Native API to support dataset and datafile citation export #9994

Open
GPortas opened this issue Oct 11, 2023 · 5 comments
Labels
pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows Size: 30 A percentage of a sprint. 21 hours. (formerly size:33) User Role: API User Makes use of APIs

Comments

@GPortas
Copy link
Contributor

GPortas commented Oct 11, 2023

Overview of the Feature Request

Currently the export of citation in different formats (EndNote XML, RIS and BibTeX) is a feature available only from JSF.

We need to expose this logic via API and allow the export in the different formats to be invoked from consumer applications such as the SPA.

What kind of user is the feature intended for?
API User

What inspired the request?

What existing behavior do you want changed?

None

Any brand new behavior do you want to add to Dataverse?

Dataset and datafile citation export via API

Any open or closed issues related to this feature request?

@GPortas GPortas added Size: 30 A percentage of a sprint. 21 hours. (formerly size:33) pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows labels Oct 11, 2023
@GPortas GPortas moved this to Re-arch: SPA MVP (Guillermo) in IQSS Dataverse Project Oct 11, 2023
@GPortas GPortas added the User Role: API User Makes use of APIs label Oct 11, 2023
@GPortas
Copy link
Contributor Author

GPortas commented Oct 11, 2023

I just realized @pdurbin already mentioned the requested feature in a comment on the analysis issue.

IQSS/dataverse-frontend#63 (comment)

@GPortas GPortas changed the title Extend the Native API to support dataset and datafile citation export [Spike - API] Extend the Native API to support dataset and datafile citation export Oct 11, 2023
@johannes-darms
Copy link
Contributor

Could we handle EndNote, RIS, and the other citation formats similar to how we handle metadata Exporter. IMHO those are just additionally export formats. Handling them similar would allow to reuse the existing API and reduces code complexity.

@pdurbin
Copy link
Member

pdurbin commented Nov 28, 2023

@johannes-darms we haven't added a size to this issue yet. Your idea would make the size bigger, of course, but it's worth considering either as part of this effort or a future effort.

For anyone new, he's talking about https://github.com/gdcc/dataverse-exporters and https://guides.dataverse.org/en/6.0/installation/advanced.html#installing-external-metadata-exporters

@johannes-darms
Copy link
Contributor

johannes-darms commented Nov 29, 2023

@pdurbin my idea is to add a boolean isCitationFormat() (with a default of false to be backwards compatible) to the io.gdcc.spi.export.Exporter SPI and an additional method within the ExportService (which filters the exporterMap) to get the list of exporters that provide a citation format. This would allow us to reuse the existing advanced exporter feature, including the ability to add custom citation formats. However, this will require rewriting the DataCitation as an exporter (possibly even splitting the three options into separate classes) and adapting the 8 files using the current DataCitation implementation to reuse the ExporterService. This will allow the frontend to use the already existing API - Export metadata of a dataset in various formats](https://guides.dataverse.org/en/6.0/api/native-api.html#export-metadata-of-a-dataset-in-various-formats) to get the citation. In addition, we need to add an API to list and filter the possible export/citation options (i.e. the ExporterService's exporterMap). This feature is also needed by the frontend to implement the export metadata dropdown.

@johannes-darms
Copy link
Contributor

johannes-darms commented Nov 29, 2023

However, this will not directly work for the FileMetadata, or at least will require additional effort. As far as I understand the codebase, the only difference to the dataset export is the addition of the UNF for tabular data and the filename. The PID remains the same (although the related code looks a bit more complex).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows Size: 30 A percentage of a sprint. 21 hours. (formerly size:33) User Role: API User Makes use of APIs
Projects
None yet
Development

No branches or pull requests

3 participants