Lookup BibEntry from ISBN and merge information#1621
Conversation
| @@ -50,46 +51,75 @@ public class MergeEntryDOIDialog extends JDialog { | |||
| private final BasePanel panel; | |||
There was a problem hiding this comment.
Rename class to MergeEntryDialog?
There was a problem hiding this comment.
There is already one with that name. :-)
|
I pass on rewriting to the new interface at the moment, but there is a rewrite of the code to make it very simple to add merging based on other fields. I'll make one small fix (add ISBN as a FieldExtra) and then it is ready for review. |
8992bc5 to
11eb2c7
Compare
|
With the current code structure it would be simple to allow marking of several entries and loop through them. Main issue I would guess is that there is no way to effectively canceling this operation at the moment, one will just have to go through everything and it is not straightforward to solve that part. Should I still implement it? |
|
I think the looping through multiple entries should be done in another PR. And we have to think about how to handle this in general. The user should be able to abort such actions if they require user interaction per entry. |
|
I agree that there should be some better mechanism for canceling multiple entries. The conflicts are all for translations. I wait with rebasing until this gets an OK to be merged. Btw, I added merging from ArXiv as well to this PR. |
|
To me, it looks good. But I think the IdBasedFetcher would be really helpful to implement here. However, this can be done in another PR. |
| } else { | ||
| JOptionPane.showMessageDialog(frame(), | ||
| Localization.lang("This operation requires exactly one item to be selected."), | ||
| Localization.lang("Merge entry with %0 information", "DOI/ISBN"), |
There was a problem hiding this comment.
"with fetched information" ? since DOI, ISBN and now eprint is supported.
|
In general, this PR looks good to me 👍 Just a few minor remarks. By the way, I still don't get why there are two different dialogs for comparing/merging entries (MergeEntryDialog vs the new MergeFetchedEntryDialog) |
|
I changed things based on your comments, but will not push until Thursday.
I wasn't completely sure if ArXiv was the only thing that used eprint so
didn't want to add the button before clarifying that. Now I introduced a
more general approach so will be easier to do that now.
Historical reasons. There are some differences in the handling of entries
at the end though which may complicate merging them. Most of the code is in
MergeEntries which generates the table though.
|
| private boolean isAnyFieldSetForSelectedEntry(List<String> fieldnames) { | ||
| if (panel.getMainTable().getSelectedRowCount() == 1) { | ||
| BibEntry entry = panel.getMainTable().getSelected().get(0); | ||
| for (String fieldname : fieldnames) { |
There was a problem hiding this comment.
Simple one liner: ! Collections.disjoint(list1, list2);
From the apidoc: disjoint (a, b) Returns true if the two specified collections have no elements in common.
There was a problem hiding this comment.
Great! There should have been an easier way...
* master: (22 commits) Do not cite entries without a key in OpenOffice/LibreOffice (JabRef#1682) (JabRef#1683) Got rid of unused preferences (JabRef#1672) Move labelpattern (JabRef#1626) Implementation of shared database support (full system). (JabRef#1451) Removed bst from architecture tests JabRef#1699 Update PULL_REQUEST_TEMPLATE.md French localization: Menu: Translation of an empty string French localization: Jabref_fr: empty strings translated Updated string similarity version (JabRef#1698) Minify description of release process Announce switch from GPL to MIT in CONTRIBUTING.md and README.md Some cleanups to initialize empty MetaData at fewer positions (JabRef#1696) Automatic group names are converted from LaTeX to Unicode (JabRef#1684) Update ISSUE_TEMPLATE.md (JabRef#1686) Removed (false) NPE issue reported by FindBugs More Swedish translations (JabRef#1691) Updated wiremock version (JabRef#1690) Some minor code cleanups (JabRef#1689) Removed dependencies of Globals.prefs in some tests (JabRef#1688) Lookup BibEntry from ISBN and merge information (JabRef#1621) ... # Conflicts: # src/main/java/net/sf/jabref/gui/BasePanel.java # src/main/java/net/sf/jabref/importer/ImportMenuItem.java # src/main/resources/l10n/JabRef_da.properties # src/main/resources/l10n/JabRef_de.properties # src/main/resources/l10n/JabRef_en.properties # src/main/resources/l10n/JabRef_es.properties # src/main/resources/l10n/JabRef_fa.properties # src/main/resources/l10n/JabRef_fr.properties # src/main/resources/l10n/JabRef_in.properties # src/main/resources/l10n/JabRef_it.properties # src/main/resources/l10n/JabRef_ja.properties # src/main/resources/l10n/JabRef_nl.properties # src/main/resources/l10n/JabRef_no.properties # src/main/resources/l10n/JabRef_pt_BR.properties # src/main/resources/l10n/JabRef_ru.properties # src/main/resources/l10n/JabRef_sv.properties # src/main/resources/l10n/JabRef_tr.properties # src/main/resources/l10n/JabRef_vi.properties # src/main/resources/l10n/JabRef_zh.properties
* Lookup BibEntry from ISBN and merge information * Added support for ArXiv eprint merging
Should fix the translations and just add ISBN where applicable.