1
|
package eu.dnetlib.data.mapreduce.hbase.openorgs;
|
2
|
|
3
|
import org.apache.commons.lang.StringUtils;
|
4
|
|
5
|
import eu.dnetlib.data.proto.OafProtos.Oaf;
|
6
|
|
7
|
public class GenerateSimilaritiesMapper extends AbstractOpenOrgsMapper {
|
8
|
|
9
|
@Override
|
10
|
protected String calculateKeyOut(final Oaf oaf, final String rootId, final Context context) {
|
11
|
|
12
|
if (oaf.getDataInfo().getDeletedbyinference() && StringUtils.isNotBlank(rootId)) {
|
13
|
context.getCounter("organization", "deletedbyinference = true").increment(1);
|
14
|
return rootId;
|
15
|
} else {
|
16
|
return null;
|
17
|
}
|
18
|
}
|
19
|
|
20
|
}
|