Merge pull request 'mapping `oaf:fulltext` element in the `result.fulltext` field' (#226) from oaf_fulltext_mapping into beta

Reviewed-on: D-Net/dnet-hadoop#226
This commit is contained in:
Alessia Bardi 2022-07-12 11:13:08 +02:00
commit 28a32facf6
2 changed files with 5 additions and 1 deletions

View File

@ -379,7 +379,7 @@ public abstract class AbstractMdRecordToOafMapper {
r.setPublisher(preparePublisher(doc, info)); r.setPublisher(preparePublisher(doc, info));
r.setEmbargoenddate(prepareField(doc, "//oaf:embargoenddate", info)); r.setEmbargoenddate(prepareField(doc, "//oaf:embargoenddate", info));
r.setSource(prepareSources(doc, info)); r.setSource(prepareSources(doc, info));
r.setFulltext(new ArrayList<>()); // NOT PRESENT IN MDSTORES r.setFulltext(prepareListFields(doc, "//oaf:fulltext", info));
r.setFormat(prepareFormats(doc, info)); r.setFormat(prepareFormats(doc, info));
r.setContributor(prepareContributors(doc, info)); r.setContributor(prepareContributors(doc, info));
r.setResourcetype(prepareResourceType(doc, info)); r.setResourcetype(prepareResourceType(doc, info));

View File

@ -122,6 +122,10 @@ class MappersTest {
assertNotNull(p.getBestaccessright()); assertNotNull(p.getBestaccessright());
assertEquals("OPEN", p.getBestaccessright().getClassid()); assertEquals("OPEN", p.getBestaccessright().getClassid());
assertNotNull(p.getFulltext());
assertEquals(1, p.getFulltext().size());
assertEquals("https://oneecosystem.pensoft.net/article/13718/", p.getFulltext().get(0).getValue());
// RESULT PROJECT // RESULT PROJECT
List<Relation> resultProject = list List<Relation> resultProject = list
.stream() .stream()