removed not useful method and changed because of D-Net/dnet-hadoop#40 (comment) and D-Net/dnet-hadoop#40 (comment)

This commit is contained in:
Miriam Baglioni 2020-08-13 12:14:37 +02:00
parent 7fd8397123
commit bfd1fcde6d
1 changed files with 1 additions and 23 deletions

View File

@ -5,12 +5,12 @@ import java.io.Serializable;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import eu.dnetlib.dhp.schema.dump.oaf.community.Context;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import eu.dnetlib.dhp.schema.common.ModelConstants; import eu.dnetlib.dhp.schema.common.ModelConstants;
import eu.dnetlib.dhp.schema.dump.oaf.*; import eu.dnetlib.dhp.schema.dump.oaf.*;
import eu.dnetlib.dhp.schema.dump.oaf.community.CommunityResult; import eu.dnetlib.dhp.schema.dump.oaf.community.CommunityResult;
import eu.dnetlib.dhp.schema.dump.oaf.community.Context;
import eu.dnetlib.dhp.schema.oaf.DataInfo; import eu.dnetlib.dhp.schema.oaf.DataInfo;
import eu.dnetlib.dhp.schema.oaf.Field; import eu.dnetlib.dhp.schema.oaf.Field;
import eu.dnetlib.dhp.schema.oaf.Journal; import eu.dnetlib.dhp.schema.oaf.Journal;
@ -472,15 +472,6 @@ public class ResultMapper implements Serializable {
private static Author getAuthor(eu.dnetlib.dhp.schema.oaf.Author oa) { private static Author getAuthor(eu.dnetlib.dhp.schema.oaf.Author oa) {
Author a = new Author(); Author a = new Author();
Optional
.ofNullable(oa.getAffiliation())
.ifPresent(
value -> a
.setAffiliation(
value
.stream()
.map(aff -> aff.getValue())
.collect(Collectors.toList())));
a.setFullname(oa.getFullname()); a.setFullname(oa.getFullname());
a.setName(oa.getName()); a.setName(oa.getName());
a.setSurname(oa.getSurname()); a.setSurname(oa.getSurname());
@ -529,18 +520,5 @@ public class ResultMapper implements Serializable {
return null; return null;
} }
private static Pid getPid(StructuredProperty p) {
Pid pid = new Pid();
pid.setId(ControlledField.newInstance(p.getQualifier().getClassid(), p.getValue()));
Optional<DataInfo> di = Optional.ofNullable(p.getDataInfo());
Provenance provenance = new Provenance();
if (di.isPresent()) {
provenance.setProvenance(di.get().getProvenanceaction().getClassname());
provenance.setTrust(di.get().getTrust());
pid.setProvenance(provenance);
}
return pid;
}
} }