2020-05-08 16:49:47 +02:00
|
|
|
|
2020-05-07 12:31:26 +02:00
|
|
|
package eu.dnetlib.dhp.broker.oa.util;
|
|
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import eu.dnetlib.broker.objects.Pid;
|
2020-05-13 12:00:27 +02:00
|
|
|
import eu.dnetlib.dhp.broker.model.Topic;
|
2020-05-07 12:31:26 +02:00
|
|
|
import eu.dnetlib.dhp.schema.oaf.Result;
|
|
|
|
|
2020-05-13 12:00:27 +02:00
|
|
|
public class EnrichMorePid extends UpdateMatcher<Pid> {
|
2020-05-07 12:31:26 +02:00
|
|
|
|
2020-05-13 12:00:27 +02:00
|
|
|
public EnrichMorePid() {
|
|
|
|
super(true);
|
2020-05-07 12:31:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2020-05-13 12:00:27 +02:00
|
|
|
protected List<UpdateInfo<Pid>> findUpdates(final Result source, final Result target) {
|
|
|
|
// return Arrays.asList(new EnrichMissingAbstract("xxxxxxx", 0.9f));
|
|
|
|
return Arrays.asList();
|
2020-05-07 12:31:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2020-05-13 12:00:27 +02:00
|
|
|
public UpdateInfo<Pid> generateUpdateInfo(final Pid highlightValue, final Result source, final Result target) {
|
|
|
|
return new UpdateInfo<>(
|
|
|
|
Topic.ENRICH_MORE_PID,
|
|
|
|
highlightValue, source, target,
|
|
|
|
(p, pid) -> p.getPids().add(pid),
|
|
|
|
pid -> pid.getType() + "::" + pid.getValue());
|
2020-05-07 12:31:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|