Open Citation integration #401

Merged
claudio.atzori merged 5 commits from ocnew into beta 2024-03-25 16:10:41 +01:00
1 changed files with 1 additions and 10 deletions
Showing only changes of commit 5a32bb9578 - Show all commits

View File

@ -166,15 +166,6 @@ public class MapOCIdsInPids implements Serializable {
.option("compression", "gzip") .option("compression", "gzip")
.json(outputPath); .json(outputPath);
mappedCitingDataset
.joinWith(correspondenceData, mappedCitingDataset.col("cited").equalTo(correspondenceData.col("_1")))
.map((MapFunction<Tuple2<COCI, Tuple2<String, String>>, COCI>) t2 -> {
String correspondent = t2._2()._2();
t2._1().setCited_pid(correspondent.substring(0, correspondent.indexOf(":")));
t2._1().setCited(correspondent.substring(correspondent.indexOf(":") + 1));
return t2._1();
}, Encoders.bean(COCI.class))
.foreach((ForeachFunction<COCI>) c -> System.out.println(OBJECT_MAPPER.writeValueAsString(c)));
} }
} }