From 505477f36fe2be46ca46fceba474d03c5e1c39b8 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Mon, 25 Jan 2021 18:02:49 +0100 Subject: [PATCH] format code --- .../main/java/eu/dnetlib/dhp/oa/graph/raw/OdfToOafMapper.java | 3 +-- .../src/test/java/eu/dnetlib/dhp/oa/graph/raw/MappersTest.java | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/raw/OdfToOafMapper.java b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/raw/OdfToOafMapper.java index 9dc0bb44b..683b37630 100644 --- a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/raw/OdfToOafMapper.java +++ b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/raw/OdfToOafMapper.java @@ -53,7 +53,7 @@ public class OdfToOafMapper extends AbstractMdRecordToOafMapper { final String fullname = n.valueOf("./datacite:creatorName"); final String name = n.valueOf("./datacite:givenName"); final String surname = n.valueOf("./datacite:familyName"); - if(StringUtils.isNotBlank(fullname) || StringUtils.isNotBlank(name) || StringUtils.isNotBlank(surname)){ + if (StringUtils.isNotBlank(fullname) || StringUtils.isNotBlank(name) || StringUtils.isNotBlank(surname)) { author.setFullname(fullname); final PacePerson pp = new PacePerson(fullname, false); @@ -64,7 +64,6 @@ public class OdfToOafMapper extends AbstractMdRecordToOafMapper { author.setName(name); } - if (StringUtils.isBlank(surname) & pp.isAccurate()) { author.setSurname(pp.getNormalisedSurname()); } else { diff --git a/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/raw/MappersTest.java b/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/raw/MappersTest.java index ae203b3a7..9827dcc99 100644 --- a/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/raw/MappersTest.java +++ b/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/raw/MappersTest.java @@ -388,6 +388,7 @@ public class MappersTest { System.out.println(new ObjectMapper().writeValueAsString(list)); System.out.println("***************"); } + @Test void testBologna() throws IOException { final String xml = IOUtils.toString(getClass().getResourceAsStream("oaf-bologna.xml"));