Search in sources :

Example 6 with SnomedCoreComponent

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

the class ConcreteDomainChangeConverter method expandComponentCategory.

// Copied from SnomedReferenceSetMemberConverter
private void expandComponentCategory(final String branch, final ComponentCategory category, final Collection<String> componentIds, final Options componentOptions, final Multimap<String, ReasonerConcreteDomainMember> membersByReferencedComponent) {
    final SearchResourceRequestBuilder<?, BranchContext, ? extends CollectionResource<? extends SnomedCoreComponent>> searchRequestBuilder = createSearchRequestBuilder(category);
    searchRequestBuilder.filterByIds(componentIds).setLimit(componentIds.size()).setLocales(locales()).setExpand(componentOptions.get("expand", Options.class));
    final CollectionResource<? extends SnomedCoreComponent> referencedComponents = new BranchRequest<>(branch, new RevisionIndexReadRequest<>(searchRequestBuilder.build())).execute(context());
    for (final SnomedCoreComponent referencedComponent : referencedComponents) {
        for (final ReasonerConcreteDomainMember member : membersByReferencedComponent.get(referencedComponent.getId())) {
            member.setReferencedComponent(referencedComponent);
        }
    }
}
Also used : Options(com.b2international.commons.options.Options) SnomedCoreComponent(com.b2international.snowowl.snomed.core.domain.SnomedCoreComponent) BranchContext(com.b2international.snowowl.core.domain.BranchContext) RevisionIndexReadRequest(com.b2international.snowowl.core.request.RevisionIndexReadRequest)

Aggregations

SnomedCoreComponent (com.b2international.snowowl.snomed.core.domain.SnomedCoreComponent)6 Options (com.b2international.commons.options.Options)4 SnomedReferenceSetMember (com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMember)4 BranchContext (com.b2international.snowowl.core.domain.BranchContext)2 SnomedConcept (com.b2international.snowowl.snomed.core.domain.SnomedConcept)2 SnomedDescription (com.b2international.snowowl.snomed.core.domain.SnomedDescription)2 SnomedRelationship (com.b2international.snowowl.snomed.core.domain.SnomedRelationship)2 OptionsBuilder (com.b2international.commons.options.OptionsBuilder)1 IComponent (com.b2international.snowowl.core.domain.IComponent)1 RevisionIndexReadRequest (com.b2international.snowowl.core.request.RevisionIndexReadRequest)1 ComponentCategory (com.b2international.snowowl.core.terminology.ComponentCategory)1 SnomedConcepts (com.b2international.snowowl.snomed.core.domain.SnomedConcepts)1 SnomedReferenceSetMembers (com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMembers)1 SnomedRefSetMemberSearchRequestBuilder (com.b2international.snowowl.snomed.datastore.request.SnomedRefSetMemberSearchRequestBuilder)1