master #11

Manually merged
claudio.atzori merged 275 commits from :master into enrichment_wfs 2020-05-11 15:14:56 +02:00
1 changed files with 6 additions and 1 deletions
Showing only changes of commit 5cd092114f - Show all commits

View File

@ -98,15 +98,20 @@ public class SparkResultToCommunityFromOrganizationJob2 {
if(rcl.isPresent()){
ArrayList<String> communitySet = rcl.get().getCommunityList();
List<String> contextList = ret.getContext().stream().map(con -> con.getId()).collect(Collectors.toList());
Result res = new Result();
res.setId(ret.getId());
List<Context> propagatedContexts = new ArrayList<>();
for(String cId:communitySet){
if(!contextList.contains(cId)){
Context newContext = new Context();
newContext.setId(cId);
newContext.setDataInfo(Arrays.asList(getDataInfo(PROPAGATION_DATA_INFO_TYPE,
PROPAGATION_RESULT_COMMUNITY_ORGANIZATION_CLASS_ID, PROPAGATION_RESULT_COMMUNITY_ORGANIZATION_CLASS_NAME)));
ret.getContext().add(newContext);
propagatedContexts.add(newContext);
}
}
res.setContext(propagatedContexts);
ret.mergeFrom(res);
}
return ret;
}, Encoders.bean(resultClazz))