forked from D-Net/dnet-hadoop
Merge pull request '[FoS integration]fix issue on FoS integration. Removing the null values from FoS' (#375) from fosPreparationBeta into beta
Reviewed-on: D-Net/dnet-hadoop#375
This commit is contained in:
commit
2d302e6827
|
@ -124,8 +124,19 @@ public class PrepareFOSSparkJob implements Serializable {
|
||||||
FOSDataModel first) {
|
FOSDataModel first) {
|
||||||
level1.add(first.getLevel1());
|
level1.add(first.getLevel1());
|
||||||
level2.add(first.getLevel2());
|
level2.add(first.getLevel2());
|
||||||
|
if (Optional.ofNullable(first.getLevel3()).isPresent() &&
|
||||||
|
!first.getLevel3().equalsIgnoreCase(NA) && !first.getLevel3().equalsIgnoreCase(NULL)
|
||||||
|
&& first.getLevel3() != null)
|
||||||
level3.add(first.getLevel3() + "@@" + first.getScoreL3());
|
level3.add(first.getLevel3() + "@@" + first.getScoreL3());
|
||||||
|
else
|
||||||
|
level3.add(NULL);
|
||||||
|
if (Optional.ofNullable(first.getLevel4()).isPresent() &&
|
||||||
|
!first.getLevel4().equalsIgnoreCase(NA) &&
|
||||||
|
!first.getLevel4().equalsIgnoreCase(NULL) &&
|
||||||
|
first.getLevel4() != null)
|
||||||
level4.add(first.getLevel4() + "@@" + first.getScoreL4());
|
level4.add(first.getLevel4() + "@@" + first.getScoreL4());
|
||||||
|
else
|
||||||
|
level4.add(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue