[BipFinder] refactoring

This commit is contained in:
Miriam Baglioni 2022-10-04 09:47:27 +02:00
parent 188f25eefa
commit 28dc317350
2 changed files with 5 additions and 4 deletions

View File

@ -11,7 +11,6 @@ import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import com.fasterxml.jackson.core.JsonParser;
import org.apache.commons.io.IOUtils;
import org.apache.spark.SparkConf;
import org.apache.spark.api.java.JavaRDD;
@ -23,6 +22,7 @@ import org.apache.spark.sql.SparkSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.ObjectMapper;
import eu.dnetlib.dhp.actionmanager.bipmodel.BipDeserialize;

View File

@ -151,7 +151,8 @@ public class PrepareTest {
Assertions.assertEquals(1, tmp.filter(r -> r.getId().equals(doi2)).count());
Assertions.assertEquals(1, tmp.filter(r -> r.getId().equals(doi2)).collect().get(0).getInstance().size());
tmp.filter(r -> r.getId().startsWith("unresolved::10.2111/1551-5028(2004)057"))
tmp
.filter(r -> r.getId().startsWith("unresolved::10.2111/1551-5028(2004)057"))
.foreach(r -> System.out.println(OBJECT_MAPPER.writeValueAsString(r)));
}