Search in sources :

Example 11 with BranchContext

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

the class SnomedEclRefinementEvaluator method evalAxiomStatements.

static Set<Property> evalAxiomStatements(final BranchContext context, final boolean groupedRelationshipsOnly, final Collection<String> sourceIds, final Collection<String> typeIds, final Collection<String> destinationIds) {
    try {
        // search existing axioms (no values!) defined for the given set of conceptIds
        ExpressionBuilder axiomFilter = Expressions.builder().filter(hasDestinationId());
        if (typeIds != null) {
            axiomFilter.filter(typeIds(typeIds));
        }
        if (destinationIds != null) {
            axiomFilter.filter(destinationIds(destinationIds));
        }
        if (groupedRelationshipsOnly) {
            axiomFilter.filter(relationshipGroup(1, Integer.MAX_VALUE));
        }
        ExpressionBuilder activeOwlAxiomMemberQuery = Expressions.builder().filter(active()).filter(Expressions.nestedMatch(SnomedRefSetMemberIndexEntry.Fields.CLASS_AXIOM_RELATIONSHIP, axiomFilter.build()));
        if (sourceIds != null) {
            activeOwlAxiomMemberQuery.filter(SnomedRefSetMemberIndexEntry.Expressions.referencedComponentIds(sourceIds));
        }
        final Query<SnomedRefSetMemberIndexEntry> activeAxiomStatementsQuery = Query.select(SnomedRefSetMemberIndexEntry.class).where(activeOwlAxiomMemberQuery.build()).limit(Integer.MAX_VALUE).build();
        return context.service(RevisionSearcher.class).search(activeAxiomStatementsQuery).stream().filter(owlMember -> !CompareUtils.isEmpty(owlMember.getClassAxiomRelationships())).flatMap(owlMember -> {
            return owlMember.getClassAxiomRelationships().stream().filter(classAxiom -> {
                return (typeIds == null || typeIds.contains(classAxiom.getTypeId())) && (destinationIds == null || destinationIds.contains(classAxiom.getDestinationId())) && (!groupedRelationshipsOnly || classAxiom.getRelationshipGroup() >= 1);
            }).map(classAxiom -> {
                return new Property(owlMember.getReferencedComponentId(), classAxiom.getTypeId(), classAxiom.getDestinationId(), classAxiom.getRelationshipGroup());
            });
        }).collect(Collectors.toSet());
    } catch (IOException e) {
        throw new SnowowlRuntimeException(e);
    }
}
Also used : SnomedRefSetMemberIndexEntry(com.b2international.snowowl.snomed.datastore.index.entry.SnomedRefSetMemberIndexEntry) PolymorphicDispatcher(org.eclipse.xtext.util.PolymorphicDispatcher) Query(com.b2international.index.query.Query) SnomedRefSetMemberIndexEntry(com.b2international.snowowl.snomed.datastore.index.entry.SnomedRefSetMemberIndexEntry) Promise(com.b2international.snowowl.core.events.util.Promise) ID(com.b2international.index.revision.Revision.Fields.ID) Concepts(com.b2international.snowowl.snomed.common.SnomedConstants.Concepts) SnomedDocument(com.b2international.snowowl.snomed.datastore.index.entry.SnomedDocument) SnomedRequests(com.b2international.snowowl.snomed.datastore.request.SnomedRequests) Options(com.b2international.commons.options.Options) RevisionSearcher(com.b2international.index.revision.RevisionSearcher) ExpressionBuilder(com.b2international.index.query.Expressions.ExpressionBuilder) Sets.newHashSet(com.google.common.collect.Sets.newHashSet) com.b2international.snomed.ecl.ecl(com.b2international.snomed.ecl.ecl) RepositoryConfiguration(com.b2international.snowowl.core.config.RepositoryConfiguration) CompareUtils(com.b2international.commons.CompareUtils) com.google.common.collect(com.google.common.collect) ResourceURI(com.b2international.snowowl.core.ResourceURI) BadRequestException(com.b2international.commons.exceptions.BadRequestException) Function(com.google.common.base.Function) SnowowlRuntimeException(com.b2international.snowowl.core.api.SnowowlRuntimeException) RelationshipValue(com.b2international.snowowl.snomed.core.domain.RelationshipValue) Collection(java.util.Collection) SnomedRelationshipSearchRequestBuilder(com.b2international.snowowl.snomed.datastore.request.SnomedRelationshipSearchRequestBuilder) DataType(com.b2international.snowowl.snomed.core.domain.refset.DataType) Set(java.util.Set) IOException(java.io.IOException) Collectors(java.util.stream.Collectors) BinaryOperator(java.util.function.BinaryOperator) Trees(com.b2international.snowowl.snomed.core.tree.Trees) SearchResourceRequest(com.b2international.snowowl.core.request.SearchResourceRequest) Objects(java.util.Objects) TimeUnit(java.util.concurrent.TimeUnit) List(java.util.List) Expressions(com.b2international.index.query.Expressions) Expressions.active(com.b2international.snowowl.snomed.datastore.index.entry.SnomedDocument.Expressions.active) Entry(java.util.Map.Entry) Expression(com.b2international.index.query.Expression) SnomedRf2Headers(com.b2international.snowowl.snomed.common.SnomedRf2Headers) BranchContext(com.b2international.snowowl.core.domain.BranchContext) Fields(com.b2international.snowowl.snomed.datastore.index.entry.SnomedRelationshipIndexEntry.Fields) Expressions(com.b2international.snowowl.snomed.datastore.index.entry.SnomedRelationshipIndexEntry.Expressions) SnomedRefSetType(com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType) IOException(java.io.IOException) ExpressionBuilder(com.b2international.index.query.Expressions.ExpressionBuilder) RevisionSearcher(com.b2international.index.revision.RevisionSearcher) SnowowlRuntimeException(com.b2international.snowowl.core.api.SnowowlRuntimeException)

Example 12 with BranchContext

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

the class SnomedEclRefinementEvaluator method evalStatements.

/**
 * Executes a SNOMED CT Relationship search request using the given source, type, destination filters.
 * If the groupedRelationshipsOnly boolean flag is <code>true</code>, then the search will match relationships that are grouped (their groupId is greater than or equals to <code>1</code>).
 * @param context - the context where the search should happen
 * @param sourceFilter - filter for relationship sources
 * @param typeFilter - filter for relationship types
 * @param destinationFilter - filter for relationship destinations
 * @param groupedRelationshipsOnly - whether the search should consider grouped relationships only or not
 * @return a {@link Promise} of {@link Collection} of {@link Property} objects that match the criteria
 * @see SnomedRelationshipSearchRequestBuilder
 */
/*package*/
static Promise<Collection<Property>> evalStatements(final BranchContext context, final Collection<String> sourceFilter, final Collection<String> typeFilter, final Collection<String> destinationFilter, final boolean groupedRelationshipsOnly, final String expressionForm) {
    final ImmutableList.Builder<String> fieldsToLoad = ImmutableList.builder();
    fieldsToLoad.add(SnomedDocument.Fields.ID, SOURCE_ID, TYPE_ID, DESTINATION_ID);
    if (groupedRelationshipsOnly) {
        fieldsToLoad.add(RELATIONSHIP_GROUP);
    }
    SnomedRelationshipSearchRequestBuilder searchRelationships = SnomedRequests.prepareSearchRelationship().filterByActive(true).filterBySources(sourceFilter).filterByTypes(typeFilter).filterByDestinations(destinationFilter).filterByCharacteristicTypes(getCharacteristicTypes(expressionForm)).setEclExpressionForm(expressionForm).setFields(fieldsToLoad.build()).setLimit(context.service(RepositoryConfiguration.class).getIndexConfiguration().getResultWindow());
    // if a grouping refinement, then filter relationships with group >= 1
    if (groupedRelationshipsOnly) {
        searchRelationships.filterByGroup(1, Integer.MAX_VALUE);
    }
    Promise<Collection<Property>> relationshipSearch = searchRelationships.transformAsync(context, req -> req.build(context.service(ResourceURI.class)), relationships -> relationships.stream().map(r -> new Property(r.getSourceId(), r.getTypeId(), r.getDestinationId(), r.getRelationshipGroup())));
    if (Trees.STATED_FORM.equals(expressionForm)) {
        final Set<Property> axiomStatements = evalAxiomStatements(context, groupedRelationshipsOnly, sourceFilter, typeFilter, destinationFilter);
        return relationshipSearch.then(relationshipStatements -> ImmutableSet.<Property>builder().addAll(relationshipStatements).addAll(axiomStatements).build());
    } else {
        return relationshipSearch;
    }
}
Also used : PolymorphicDispatcher(org.eclipse.xtext.util.PolymorphicDispatcher) Query(com.b2international.index.query.Query) SnomedRefSetMemberIndexEntry(com.b2international.snowowl.snomed.datastore.index.entry.SnomedRefSetMemberIndexEntry) Promise(com.b2international.snowowl.core.events.util.Promise) ID(com.b2international.index.revision.Revision.Fields.ID) Concepts(com.b2international.snowowl.snomed.common.SnomedConstants.Concepts) SnomedDocument(com.b2international.snowowl.snomed.datastore.index.entry.SnomedDocument) SnomedRequests(com.b2international.snowowl.snomed.datastore.request.SnomedRequests) Options(com.b2international.commons.options.Options) RevisionSearcher(com.b2international.index.revision.RevisionSearcher) ExpressionBuilder(com.b2international.index.query.Expressions.ExpressionBuilder) Sets.newHashSet(com.google.common.collect.Sets.newHashSet) com.b2international.snomed.ecl.ecl(com.b2international.snomed.ecl.ecl) RepositoryConfiguration(com.b2international.snowowl.core.config.RepositoryConfiguration) CompareUtils(com.b2international.commons.CompareUtils) com.google.common.collect(com.google.common.collect) ResourceURI(com.b2international.snowowl.core.ResourceURI) BadRequestException(com.b2international.commons.exceptions.BadRequestException) Function(com.google.common.base.Function) SnowowlRuntimeException(com.b2international.snowowl.core.api.SnowowlRuntimeException) RelationshipValue(com.b2international.snowowl.snomed.core.domain.RelationshipValue) Collection(java.util.Collection) SnomedRelationshipSearchRequestBuilder(com.b2international.snowowl.snomed.datastore.request.SnomedRelationshipSearchRequestBuilder) DataType(com.b2international.snowowl.snomed.core.domain.refset.DataType) Set(java.util.Set) IOException(java.io.IOException) Collectors(java.util.stream.Collectors) BinaryOperator(java.util.function.BinaryOperator) Trees(com.b2international.snowowl.snomed.core.tree.Trees) SearchResourceRequest(com.b2international.snowowl.core.request.SearchResourceRequest) Objects(java.util.Objects) TimeUnit(java.util.concurrent.TimeUnit) List(java.util.List) Expressions(com.b2international.index.query.Expressions) Expressions.active(com.b2international.snowowl.snomed.datastore.index.entry.SnomedDocument.Expressions.active) Entry(java.util.Map.Entry) Expression(com.b2international.index.query.Expression) SnomedRf2Headers(com.b2international.snowowl.snomed.common.SnomedRf2Headers) BranchContext(com.b2international.snowowl.core.domain.BranchContext) Fields(com.b2international.snowowl.snomed.datastore.index.entry.SnomedRelationshipIndexEntry.Fields) Expressions(com.b2international.snowowl.snomed.datastore.index.entry.SnomedRelationshipIndexEntry.Expressions) SnomedRefSetType(com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType) SnomedRelationshipSearchRequestBuilder(com.b2international.snowowl.snomed.datastore.request.SnomedRelationshipSearchRequestBuilder) Collection(java.util.Collection) RepositoryConfiguration(com.b2international.snowowl.core.config.RepositoryConfiguration)

Example 13 with BranchContext

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

the class SnomedEclRefinementEvaluator method evalAxiomsWithValue.

private Promise<Collection<Property>> evalAxiomsWithValue(BranchContext context, Set<String> focusConceptIds, Collection<String> typeIds, RelationshipValue value, SearchResourceRequest.Operator operator) {
    // search existing axioms defined for the given set of conceptIds
    ExpressionBuilder axiomFilter = Expressions.builder();
    if (typeIds != null) {
        axiomFilter.filter(typeIds(typeIds));
    }
    switch(operator) {
        case EQUALS:
            axiomFilter.filter(values(List.of(value)));
            break;
        case GREATER_THAN:
            axiomFilter.filter(valueGreaterThan(value, false));
            break;
        case GREATER_THAN_EQUALS:
            axiomFilter.filter(valueGreaterThan(value, true));
            break;
        case LESS_THAN:
            axiomFilter.filter(valueLessThan(value, false));
            break;
        case LESS_THAN_EQUALS:
            axiomFilter.filter(valueLessThan(value, true));
            break;
        case NOT_EQUALS:
            axiomFilter.mustNot(values(List.of(value)));
            break;
        default:
            throw new IllegalStateException("Unexpected operator '" + operator + "'.");
    }
    ExpressionBuilder activeOwlAxiomMemberQuery = Expressions.builder().filter(active()).filter(Expressions.nestedMatch(SnomedRefSetMemberIndexEntry.Fields.CLASS_AXIOM_RELATIONSHIP, axiomFilter.build()));
    if (focusConceptIds != null) {
        activeOwlAxiomMemberQuery.filter(SnomedRefSetMemberIndexEntry.Expressions.referencedComponentIds(focusConceptIds));
    }
    final Query<SnomedRefSetMemberIndexEntry> activeAxiomStatementsQuery = Query.select(SnomedRefSetMemberIndexEntry.class).where(activeOwlAxiomMemberQuery.build()).limit(context.service(RepositoryConfiguration.class).getIndexConfiguration().getResultWindow()).build();
    final Set<Property> axiomProperties = newHashSet();
    context.service(RevisionSearcher.class).stream(activeAxiomStatementsQuery).forEach(chunk -> {
        chunk.stream().filter(owlMember -> !CompareUtils.isEmpty(owlMember.getClassAxiomRelationships())).forEachOrdered(owlMember -> {
            owlMember.getClassAxiomRelationships().stream().filter(r -> typeIds == null || typeIds.contains(r.getTypeId())).filter(r -> r.getValueAsObject().matches(operator, value)).map(r -> new Property(owlMember.getReferencedComponentId(), r.getTypeId(), r.getValueAsObject().toObject(), r.getRelationshipGroup())).forEachOrdered(axiomProperties::add);
        });
    });
    return Promise.immediate(axiomProperties);
}
Also used : SnomedRefSetMemberIndexEntry(com.b2international.snowowl.snomed.datastore.index.entry.SnomedRefSetMemberIndexEntry) PolymorphicDispatcher(org.eclipse.xtext.util.PolymorphicDispatcher) Query(com.b2international.index.query.Query) SnomedRefSetMemberIndexEntry(com.b2international.snowowl.snomed.datastore.index.entry.SnomedRefSetMemberIndexEntry) Promise(com.b2international.snowowl.core.events.util.Promise) ID(com.b2international.index.revision.Revision.Fields.ID) Concepts(com.b2international.snowowl.snomed.common.SnomedConstants.Concepts) SnomedDocument(com.b2international.snowowl.snomed.datastore.index.entry.SnomedDocument) SnomedRequests(com.b2international.snowowl.snomed.datastore.request.SnomedRequests) Options(com.b2international.commons.options.Options) RevisionSearcher(com.b2international.index.revision.RevisionSearcher) ExpressionBuilder(com.b2international.index.query.Expressions.ExpressionBuilder) Sets.newHashSet(com.google.common.collect.Sets.newHashSet) com.b2international.snomed.ecl.ecl(com.b2international.snomed.ecl.ecl) RepositoryConfiguration(com.b2international.snowowl.core.config.RepositoryConfiguration) CompareUtils(com.b2international.commons.CompareUtils) com.google.common.collect(com.google.common.collect) ResourceURI(com.b2international.snowowl.core.ResourceURI) BadRequestException(com.b2international.commons.exceptions.BadRequestException) Function(com.google.common.base.Function) SnowowlRuntimeException(com.b2international.snowowl.core.api.SnowowlRuntimeException) RelationshipValue(com.b2international.snowowl.snomed.core.domain.RelationshipValue) Collection(java.util.Collection) SnomedRelationshipSearchRequestBuilder(com.b2international.snowowl.snomed.datastore.request.SnomedRelationshipSearchRequestBuilder) DataType(com.b2international.snowowl.snomed.core.domain.refset.DataType) Set(java.util.Set) IOException(java.io.IOException) Collectors(java.util.stream.Collectors) BinaryOperator(java.util.function.BinaryOperator) Trees(com.b2international.snowowl.snomed.core.tree.Trees) SearchResourceRequest(com.b2international.snowowl.core.request.SearchResourceRequest) Objects(java.util.Objects) TimeUnit(java.util.concurrent.TimeUnit) List(java.util.List) Expressions(com.b2international.index.query.Expressions) Expressions.active(com.b2international.snowowl.snomed.datastore.index.entry.SnomedDocument.Expressions.active) Entry(java.util.Map.Entry) Expression(com.b2international.index.query.Expression) SnomedRf2Headers(com.b2international.snowowl.snomed.common.SnomedRf2Headers) BranchContext(com.b2international.snowowl.core.domain.BranchContext) Fields(com.b2international.snowowl.snomed.datastore.index.entry.SnomedRelationshipIndexEntry.Fields) Expressions(com.b2international.snowowl.snomed.datastore.index.entry.SnomedRelationshipIndexEntry.Expressions) SnomedRefSetType(com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType) ExpressionBuilder(com.b2international.index.query.Expressions.ExpressionBuilder)

Example 14 with BranchContext

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

the class SnomedEclRefinementEvaluator method evalRefinement.

/**
 * Evaluates an {@link AttributeConstraint} refinement on the given focusConceptId set on the given {@link BranchContext}.
 * Grouped parameter can
 */
private Promise<Collection<Property>> evalRefinement(final BranchContext context, final AttributeConstraint refinement, final boolean grouped, final Set<String> focusConceptIds) {
    final Comparison comparison = refinement.getComparison();
    final Collection<String> typeConceptFilter = evalToConceptIds(context, refinement.getAttribute(), expressionForm).getSync(1, TimeUnit.MINUTES);
    if (comparison instanceof AttributeComparison) {
        // resolve non-* focusConcept ECLs to IDs, so we can filter relationships by source/destination
        // filterByType and filterByDestination accepts ECL expressions as well, so serialize them into ECL and pass as String when required
        // if reversed refinement, then we are interested in the destinationIds otherwise we need the sourceIds
        final Collection<String> destinationConceptFilter = evalToConceptIds(context, ((AttributeComparison) comparison).getValue(), expressionForm).getSync(1, TimeUnit.MINUTES);
        final Collection<String> focusConceptFilter = refinement.isReversed() ? destinationConceptFilter : focusConceptIds;
        final Collection<String> valueConceptFilter = refinement.isReversed() ? focusConceptIds : destinationConceptFilter;
        return evalStatements(context, focusConceptFilter, typeConceptFilter, valueConceptFilter, grouped, expressionForm);
    } else if (comparison instanceof DataTypeComparison) {
        if (refinement.isReversed()) {
            throw new BadRequestException("Reversed flag is not supported in data type based comparison (string/numeric)");
        } else {
            final Promise<Collection<Property>> statementsWithValue = evalStatementsWithValue(context, focusConceptIds, typeConceptFilter, (DataTypeComparison) comparison);
            final Promise<Collection<Property>> members = evalMembers(context, focusConceptIds, typeConceptFilter, (DataTypeComparison) comparison);
            return Promise.all(statementsWithValue, members).then(results -> {
                final Collection<Property> s = (Collection<Property>) results.get(0);
                final Collection<Property> m = (Collection<Property>) results.get(1);
                return FluentIterable.concat(s, m).toSet();
            });
        }
    } else {
        return SnomedEclEvaluationRequest.throwUnsupported(comparison);
    }
}
Also used : PolymorphicDispatcher(org.eclipse.xtext.util.PolymorphicDispatcher) Query(com.b2international.index.query.Query) SnomedRefSetMemberIndexEntry(com.b2international.snowowl.snomed.datastore.index.entry.SnomedRefSetMemberIndexEntry) Promise(com.b2international.snowowl.core.events.util.Promise) ID(com.b2international.index.revision.Revision.Fields.ID) Concepts(com.b2international.snowowl.snomed.common.SnomedConstants.Concepts) SnomedDocument(com.b2international.snowowl.snomed.datastore.index.entry.SnomedDocument) SnomedRequests(com.b2international.snowowl.snomed.datastore.request.SnomedRequests) Options(com.b2international.commons.options.Options) RevisionSearcher(com.b2international.index.revision.RevisionSearcher) ExpressionBuilder(com.b2international.index.query.Expressions.ExpressionBuilder) Sets.newHashSet(com.google.common.collect.Sets.newHashSet) com.b2international.snomed.ecl.ecl(com.b2international.snomed.ecl.ecl) RepositoryConfiguration(com.b2international.snowowl.core.config.RepositoryConfiguration) CompareUtils(com.b2international.commons.CompareUtils) com.google.common.collect(com.google.common.collect) ResourceURI(com.b2international.snowowl.core.ResourceURI) BadRequestException(com.b2international.commons.exceptions.BadRequestException) Function(com.google.common.base.Function) SnowowlRuntimeException(com.b2international.snowowl.core.api.SnowowlRuntimeException) RelationshipValue(com.b2international.snowowl.snomed.core.domain.RelationshipValue) Collection(java.util.Collection) SnomedRelationshipSearchRequestBuilder(com.b2international.snowowl.snomed.datastore.request.SnomedRelationshipSearchRequestBuilder) DataType(com.b2international.snowowl.snomed.core.domain.refset.DataType) Set(java.util.Set) IOException(java.io.IOException) Collectors(java.util.stream.Collectors) BinaryOperator(java.util.function.BinaryOperator) Trees(com.b2international.snowowl.snomed.core.tree.Trees) SearchResourceRequest(com.b2international.snowowl.core.request.SearchResourceRequest) Objects(java.util.Objects) TimeUnit(java.util.concurrent.TimeUnit) List(java.util.List) Expressions(com.b2international.index.query.Expressions) Expressions.active(com.b2international.snowowl.snomed.datastore.index.entry.SnomedDocument.Expressions.active) Entry(java.util.Map.Entry) Expression(com.b2international.index.query.Expression) SnomedRf2Headers(com.b2international.snowowl.snomed.common.SnomedRf2Headers) BranchContext(com.b2international.snowowl.core.domain.BranchContext) Fields(com.b2international.snowowl.snomed.datastore.index.entry.SnomedRelationshipIndexEntry.Fields) Expressions(com.b2international.snowowl.snomed.datastore.index.entry.SnomedRelationshipIndexEntry.Expressions) SnomedRefSetType(com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType) Promise(com.b2international.snowowl.core.events.util.Promise) BadRequestException(com.b2international.commons.exceptions.BadRequestException) Collection(java.util.Collection)

Example 15 with BranchContext

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

the class SnomedReferenceSetMemberConverter method expandComponentCategory.

private void expandComponentCategory(Options expandOptions, Multimap<String, SnomedReferenceSetMember> referencedComponentIdToMemberMap, Multimap<ComponentCategory, String> componentCategoryToIdMap, ComponentCategory category) {
    final Collection<String> componentIds = componentCategoryToIdMap.get(category);
    final SearchResourceRequestBuilder<?, BranchContext, ? extends CollectionResource<? extends SnomedCoreComponent>> search;
    switch(category) {
        case CONCEPT:
            search = SnomedRequests.prepareSearchConcept();
            break;
        case DESCRIPTION:
            search = SnomedRequests.prepareSearchDescription();
            break;
        case RELATIONSHIP:
            search = SnomedRequests.prepareSearchRelationship();
            break;
        default:
            throw new UnsupportedOperationException("Category is not supported in referenced component expansion");
    }
    search.filterByIds(componentIds).setLimit(componentIds.size()).setLocales(locales()).setExpand(expandOptions.get("expand", Options.class));
    CollectionResource<? extends SnomedCoreComponent> components = search.build().execute(context());
    for (SnomedCoreComponent component : components) {
        for (SnomedReferenceSetMember member : referencedComponentIdToMemberMap.get(component.getId())) {
            ((SnomedReferenceSetMember) member).setReferencedComponent(component);
        }
    }
}
Also used : SnomedReferenceSetMember(com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMember) Options(com.b2international.commons.options.Options) SnomedCoreComponent(com.b2international.snowowl.snomed.core.domain.SnomedCoreComponent) BranchContext(com.b2international.snowowl.core.domain.BranchContext)

Aggregations

BranchContext (com.b2international.snowowl.core.domain.BranchContext)27 Collectors (java.util.stream.Collectors)18 SnomedRequests (com.b2international.snowowl.snomed.datastore.request.SnomedRequests)16 Options (com.b2international.commons.options.Options)15 List (java.util.List)15 Set (java.util.Set)14 Sets.newHashSet (com.google.common.collect.Sets.newHashSet)13 IOException (java.io.IOException)13 BadRequestException (com.b2international.commons.exceptions.BadRequestException)12 RevisionSearcher (com.b2international.index.revision.RevisionSearcher)12 Query (com.b2international.index.query.Query)11 ResourceURI (com.b2international.snowowl.core.ResourceURI)11 SnowowlRuntimeException (com.b2international.snowowl.core.api.SnowowlRuntimeException)11 Request (com.b2international.snowowl.core.events.Request)11 Concepts (com.b2international.snowowl.snomed.common.SnomedConstants.Concepts)11 Expression (com.b2international.index.query.Expression)10 SnomedRf2Headers (com.b2international.snowowl.snomed.common.SnomedRf2Headers)10 Expressions (com.b2international.index.query.Expressions)9 ExpressionBuilder (com.b2international.index.query.Expressions.ExpressionBuilder)9 Function (com.google.common.base.Function)9