From ae5c28e54f7f0b2cac5794a175541175df0d8354 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Thu, 20 May 2021 16:13:06 +0200 Subject: [PATCH] code formatting --- .../dhp/oa/graph/raw/OdfToOafMapper.java | 4 +++- .../dnetlib/dhp/oa/graph/raw/MappersTest.java | 20 +++++++++---------- 2 files changed, 13 insertions(+), 11 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 121805bb71..9b0cf7a644 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 @@ -28,7 +28,9 @@ public class OdfToOafMapper extends AbstractMdRecordToOafMapper { @Override protected List prepareTitles(final Document doc, final DataInfo info) { return prepareListStructProps( - doc, "//*[local-name()='titles']/*[local-name()='title']|//*[local-name()='resource']/*[local-name()='title']", MAIN_TITLE_QUALIFIER, info); + doc, + "//*[local-name()='titles']/*[local-name()='title']|//*[local-name()='resource']/*[local-name()='title']", + MAIN_TITLE_QUALIFIER, info); } @Override 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 9a64aac9ed..61ecff4bd8 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 @@ -331,7 +331,7 @@ public class MappersTest { void testOdfBielefeld() throws IOException { final String xml = IOUtils.toString(getClass().getResourceAsStream("odf_bielefeld.xml")); - final List list = new OdfToOafMapper(vocs, false).processMdRecord(xml); + final List list = new OdfToOafMapper(vocs, false, true).processMdRecord(xml); assertEquals(1, list.size()); assertTrue(list.get(0) instanceof Publication); @@ -345,9 +345,9 @@ public class MappersTest { assertTrue(p.getAuthor().size() > 0); final Optional author = p - .getAuthor() - .stream() - .findFirst(); + .getAuthor() + .stream() + .findFirst(); assertTrue(author.isPresent()); assertEquals("Potwarka, Luke R.", author.get().getFullname()); @@ -363,12 +363,12 @@ public class MappersTest { assertNotNull(p.getInstance()); assertTrue(p.getInstance().size() > 0); p - .getInstance() - .stream() - .forEach(i -> { - assertNotNull(i.getAccessright()); - assertEquals("OPEN", i.getAccessright().getClassid()); - }); + .getInstance() + .stream() + .forEach(i -> { + assertNotNull(i.getAccessright()); + assertEquals("OPEN", i.getAccessright().getClassid()); + }); assertEquals("UNKNOWN", p.getInstance().get(0).getRefereed().getClassid()); }