forked from D-Net/dnet-hadoop
using actual result subclasses instead of their parent class
This commit is contained in:
parent
152916890f
commit
7d325e2c57
|
@ -108,7 +108,7 @@ public class SparkResultToCommunityFromOrganizationJob {
|
|||
.stream()
|
||||
.map(con -> con.getId())
|
||||
.collect(Collectors.toList());
|
||||
Result res = new Result();
|
||||
R res = (R) ret.getClass().newInstance();
|
||||
res.setId(ret.getId());
|
||||
List<Context> propagatedContexts = new ArrayList<>();
|
||||
for (String cId : communitySet) {
|
||||
|
|
|
@ -130,7 +130,7 @@ public class SparkResultToCommunityThroughSemRelJob {
|
|||
})
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.toList());
|
||||
Result r = new Result();
|
||||
R r = (R) ret.getClass().newInstance();
|
||||
r.setId(ret.getId());
|
||||
r.setContext(contextList);
|
||||
ret.mergeFrom(r);
|
||||
|
|
Loading…
Reference in New Issue