From dbc9125f3a406b574bc075e4e49ec231e4875ed9 Mon Sep 17 00:00:00 2001 From: jhshinn Date: Wed, 24 May 2017 15:54:33 +0900 Subject: [PATCH] Adsurl to url (#2861) * move adsurl field to url field when fetching with ADS fetcher. * Update CHANGELOG.md * Update AstrophysicsDataSystem.java use FieldName.URL instead of "url" as commented by @tobiasdiez --- CHANGELOG.md | 1 + .../logic/importer/fetcher/AstrophysicsDataSystem.java | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdcbfa43487..9af03547d66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# ## [Unreleased] ### Changed +- We moved the `adsurl` field to `url` field when fetching with the ADS fetcher. - We continued to improve the new groups interface: - You can now again select multiple groups (and a few related settings were added to the preferences) [#2786](https://github.com/JabRef/jabref/issues/2786). - We further improved performance of group operations, especially of the new filter feature [#2852](https://github.com/JabRef/jabref/issues/2852). diff --git a/src/main/java/org/jabref/logic/importer/fetcher/AstrophysicsDataSystem.java b/src/main/java/org/jabref/logic/importer/fetcher/AstrophysicsDataSystem.java index f3ecdc21700..d8a50a9d333 100644 --- a/src/main/java/org/jabref/logic/importer/fetcher/AstrophysicsDataSystem.java +++ b/src/main/java/org/jabref/logic/importer/fetcher/AstrophysicsDataSystem.java @@ -10,6 +10,7 @@ import java.util.List; import java.util.Objects; +import org.jabref.logic.cleanup.MoveFieldCleanup; import org.jabref.logic.formatter.bibtexfields.ClearFormatter; import org.jabref.logic.formatter.bibtexfields.NormalizeNamesFormatter; import org.jabref.logic.formatter.bibtexfields.RemoveBracesFormatter; @@ -154,8 +155,9 @@ public void doPostCleanup(BibEntry entry) { new FieldFormatterCleanup(FieldName.TITLE, new RemoveBracesFormatter()).cleanup(entry); new FieldFormatterCleanup(FieldName.AUTHOR, new NormalizeNamesFormatter()).cleanup(entry); - // Remove url to ADS page + // Remove ADS note new FieldFormatterCleanup("adsnote", new ClearFormatter()).cleanup(entry); - new FieldFormatterCleanup("adsurl", new ClearFormatter()).cleanup(entry); + // Move adsurl to url field + new MoveFieldCleanup("adsurl", FieldName.URL).cleanup(entry); } }