forked from D-Net/dnet-hadoop
format code
This commit is contained in:
parent
ded6ed8d7d
commit
505477f36f
|
@ -53,7 +53,7 @@ public class OdfToOafMapper extends AbstractMdRecordToOafMapper {
|
||||||
final String fullname = n.valueOf("./datacite:creatorName");
|
final String fullname = n.valueOf("./datacite:creatorName");
|
||||||
final String name = n.valueOf("./datacite:givenName");
|
final String name = n.valueOf("./datacite:givenName");
|
||||||
final String surname = n.valueOf("./datacite:familyName");
|
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);
|
author.setFullname(fullname);
|
||||||
|
|
||||||
final PacePerson pp = new PacePerson(fullname, false);
|
final PacePerson pp = new PacePerson(fullname, false);
|
||||||
|
@ -64,7 +64,6 @@ public class OdfToOafMapper extends AbstractMdRecordToOafMapper {
|
||||||
author.setName(name);
|
author.setName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (StringUtils.isBlank(surname) & pp.isAccurate()) {
|
if (StringUtils.isBlank(surname) & pp.isAccurate()) {
|
||||||
author.setSurname(pp.getNormalisedSurname());
|
author.setSurname(pp.getNormalisedSurname());
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -388,6 +388,7 @@ public class MappersTest {
|
||||||
System.out.println(new ObjectMapper().writeValueAsString(list));
|
System.out.println(new ObjectMapper().writeValueAsString(list));
|
||||||
System.out.println("***************");
|
System.out.println("***************");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testBologna() throws IOException {
|
void testBologna() throws IOException {
|
||||||
final String xml = IOUtils.toString(getClass().getResourceAsStream("oaf-bologna.xml"));
|
final String xml = IOUtils.toString(getClass().getResourceAsStream("oaf-bologna.xml"));
|
||||||
|
|
Loading…
Reference in New Issue