use of com.b2international.snowowl.snomed.reasoner.domain.ConcreteDomainChanges in project snow-owl by b2ihealthcare.
the class ClassificationTaskConverter method expandConcreteDomainChanges.
private void expandConcreteDomainChanges(final List<ClassificationTask> results, final Set<String> classificationTaskIds) {
if (!expand().containsKey(ClassificationTask.Expand.CONCRETE_DOMAIN_CHANGES)) {
return;
}
final Options expandOptions = expand().get(ClassificationTask.Expand.CONCRETE_DOMAIN_CHANGES, Options.class);
final ConcreteDomainChanges concreteDomainChanges = ClassificationRequests.prepareSearchConcreteDomainChange().filterByClassificationId(classificationTaskIds).all().setExpand(expandOptions.get("expand", Options.class)).setLocales(locales()).build().execute(context());
final ListMultimap<String, ConcreteDomainChange> concreteDomainChangesByTaskId = Multimaps.index(concreteDomainChanges, ConcreteDomainChange::getClassificationId);
for (final ClassificationTask classificationTask : results) {
final List<ConcreteDomainChange> taskChanges = concreteDomainChangesByTaskId.get(classificationTask.getId());
classificationTask.setConcreteDomainChanges(new ConcreteDomainChanges(taskChanges, null, taskChanges.size(), taskChanges.size()));
}
}
Aggregations