change order of name parts: familyName, givenName

(cherry picked from commit 076f1f233e)
This commit is contained in:
Sascha Szott
2024-07-08 19:26:11 +02:00
committed by github-actions[bot]
parent 8a997abf6a
commit f61c45bdc6

View File

@@ -42,8 +42,8 @@ public class CrossRefAuthorMetadataProcessor implements JsonPathMetadataProcesso
JsonNode author = authors.next(); JsonNode author = authors.next();
String givenName = author.at("/given").textValue(); String givenName = author.at("/given").textValue();
String familyName = author.at("/family").textValue(); String familyName = author.at("/family").textValue();
if (StringUtils.isNoneBlank(givenName) && StringUtils.isNoneBlank(familyName)) { if (StringUtils.isNotBlank(givenName) && StringUtils.isNotBlank(familyName)) {
values.add(givenName + " " + familyName); values.add(familyName.trim() + ", " + givenName.trim());
} }
} }
return values; return values;
@@ -64,4 +64,4 @@ public class CrossRefAuthorMetadataProcessor implements JsonPathMetadataProcesso
this.pathToArray = pathToArray; this.pathToArray = pathToArray;
} }
} }