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

Integrates fetching citation counts online (Google Scholar, Semantic Scholar and OpenCitations), integrates a general structure for fechting reference metadata and integrates a general websocket server for JabRef #5943

Closed
wants to merge 80 commits into from

Conversation

systemoperator
Copy link
Contributor

@systemoperator systemoperator commented Feb 13, 2020

This PR integrates fetching citation counts online from Google Scholar, Semantic Scholar and OpenCitations, as well as a general structure for fechting reference metadata. Furthermore it integrates a general websocket server for JabRef, which currently communicates with the JabRef-Browser-Extension (JabFox) for fetching citation counts from Google Scholar.

References:

build.gradle Outdated Show resolved Hide resolved
@systemoperator
Copy link
Contributor Author

systemoperator commented Feb 20, 2020

Good news:

  • In the course of integrating this feature, JabRef got a robust, flexible WebSocket server, which can be used for many different requirements and use cases. :)
    • examples:
      • bidirectional communication (requests and responses in both ways) with other applications
      • remote control of JabRef
      • connecting to services (local or remote)
      • ...
  • With this system, I could successfully fetch several citation counts from Google Scholar via the JabRef-Browser-Extension.

May many future features flourish well! 🎉

@systemoperator
Copy link
Contributor Author

systemoperator commented Feb 24, 2020

Is it possible to show a dialog at this point

dialogService.showInformationDialogAndWait(Localization.lang("Test"),Localization.lang("Test")); // TODO: test

(this is within a TaskExecutor thread, where a ProgressDialogAndWait dialog is shown in parallel) which is waiting for some user interaction?

The corresponding task is created here:

Task<List<BibEntry>> fetchReferenceMetadataTask = new Task<List<BibEntry>>() {

I found the error IllegalStateException: Not on FX application thread. Thus, I tried the following wrapper:

Platform.runLater(() -> {
    dialogService.showInformationDialogAndWait(Localization.lang("JabRef-Browser-Extension Required"),Localization.lang("JabRef cannot connect to the JabRef-Browser-Extension. In order to use this functionality, please make sure that a web browser is running, where the JabRef-Browser-Extension is installed."));
});

But then the application does not wait on this line anymore. My intention is to integrate some simple user interaction.

@systemoperator
Copy link
Contributor Author

systemoperator commented Feb 24, 2020

This approach looks promising: https://www.java-forum.org/thema/alert-confirmation-dialog-aus-einem-service-thread.184035/ I will try that.

@systemoperator
Copy link
Contributor Author

Cool, works as expected. :)

@tobiasdiez tobiasdiez added the status: changes required Pull requests that are not yet complete label Apr 10, 2020
@tobiasdiez tobiasdiez marked this pull request as draft April 17, 2020 15:57
@koppor koppor removed the jabcon label Sep 2, 2020
# Conflicts:
#	src/main/java/org/jabref/model/entry/field/InternalField.java
@koppor koppor removed the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Nov 10, 2020
@koppor koppor added the status: freeze Issues posponed to a (much) later future label Jun 7, 2021
@koppor
Copy link
Member

koppor commented Jul 4, 2021

This is a major architectural change. With JabRef Online currently developed, this kind of architecture changes could be outdated. @systemoperator in case you have time and energy to join discussions with us on architecture, please contact us. For me it could be interesting, when thinking of integrating the MindMap feature into JabRef Desktop. See koppor#433 for details.

@koppor koppor closed this Jul 4, 2021
@tobiasdiez
Copy link
Member

To expand on @koppor's comment:

First of all, thank you very much for your contribution and I'm truly sorry that it took us so long to come to a conclusion how to proceed with this PR.

That we close this PR now shouldn't be meant as a criticism of your work. In the contrary, we really like the feature to get the citations for a given entry, so feature-wise this PR goes in a very good direction. However, the implementation using the browser as a middleman is not robust enough in our opinion. Thus, we hope to implement the citation feature very soon using the new and shiny JabRef Online. https://github.com/JabRef/JabRefOnline (contributions there are warmly welcome of course)

That being said, the websocket interface for JabRef is in itself a very nice addition. So if you still have the energy to go the extra mile, we would like to ask you if you could extract this part of the PR (without the citation count) to a new PR. Uses cases are to provide an alternative for the browser extension to communicate with JabRef (i.e. send references from the browser to JabRef) and for the integration with the word plugin.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: changes required Pull requests that are not yet complete status: freeze Issues posponed to a (much) later future
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants