Search in sources :

Example 1 with SnomedComponent

use of com.b2international.snowowl.snomed.core.domain.SnomedComponent in project snow-owl by b2ihealthcare.

the class ModuleExpander method expand.

void expand(List<? extends SnomedComponent> results) {
    if (expand.containsKey(SnomedComponent.Expand.MODULE)) {
        final Options moduleOptions = expand.get(SnomedComponent.Expand.MODULE, Options.class);
        final Iterable<String> moduleIds = results.stream().map(SnomedComponent::getModuleId)::iterator;
        context.service(SnomedConceptRequestCache.class).request(moduleIds, moduleOptions.getOptions("expand"), locales, modulesById -> {
            for (SnomedComponent component : results) {
                component.setModule(modulesById.get(component.getModuleId()));
            }
        });
    }
}
Also used : Options(com.b2international.commons.options.Options) SnomedConceptRequestCache(com.b2international.snowowl.snomed.datastore.request.SnomedConceptRequestCache) SnomedComponent(com.b2international.snowowl.snomed.core.domain.SnomedComponent)

Aggregations

Options (com.b2international.commons.options.Options)1 SnomedComponent (com.b2international.snowowl.snomed.core.domain.SnomedComponent)1 SnomedConceptRequestCache (com.b2international.snowowl.snomed.datastore.request.SnomedConceptRequestCache)1