From 87ad1c393b168d0a1d69539adcff8c58e3830c62 Mon Sep 17 00:00:00 2001 From: aloofwisdom <945517787@qq.com> Date: Sun, 25 Apr 2021 15:31:41 +0800 Subject: [PATCH] add javadoc for fix #6199 --- .../logic/importer/fileformat/EndnoteXmlImporter.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/org/jabref/logic/importer/fileformat/EndnoteXmlImporter.java b/src/main/java/org/jabref/logic/importer/fileformat/EndnoteXmlImporter.java index 81c4fe316d9..aa79fb543c5 100644 --- a/src/main/java/org/jabref/logic/importer/fileformat/EndnoteXmlImporter.java +++ b/src/main/java/org/jabref/logic/importer/fileformat/EndnoteXmlImporter.java @@ -259,6 +259,14 @@ private Optional getUrl(Record record) { .findFirst(); } + /** + * Extracts url address of Class Url generated from a user-imported .xml file. + * More specifically, this method will check whether text of url is wrapped in a style tag. + * If it is, extract from inner text; otherwise, use vanilla text outside. + * + * @param url a Url class object containing info from .xml file imported by user. + * @return entity url address of given class url + */ private Optional getUrlValue(Url url) { Optional> urlContent = Optional.ofNullable(url).map(Url::getContent); List list = urlContent.orElse(null);