Search in sources :

Example 6 with RevisionSearcher

use of com.b2international.index.revision.RevisionSearcher in project snow-owl by b2ihealthcare.

the class SnomedEclEvaluationRequest method executeDescriptionSearch.

private static Expression executeDescriptionSearch(BranchContext context, Expression descriptionExpression) {
    if (descriptionExpression.isMatchAll()) {
        return Expressions.matchAll();
    } else if (descriptionExpression.isMatchNone()) {
        return SnomedDocument.Expressions.ids(Set.of());
    }
    final RevisionSearcher searcher = context.service(RevisionSearcher.class);
    try {
        final Query<String> descriptionIndexQuery = Query.select(String.class).from(SnomedDescriptionIndexEntry.class).fields(SnomedDescriptionIndexEntry.Fields.CONCEPT_ID).where(descriptionExpression).limit(Integer.MAX_VALUE).build();
        final Hits<String> descriptionHits = searcher.search(descriptionIndexQuery);
        final Set<String> conceptIds = Set.copyOf(descriptionHits.getHits());
        return SnomedDocument.Expressions.ids(conceptIds);
    } catch (IOException e) {
        throw new SnowowlRuntimeException(e);
    }
}
Also used : IOException(java.io.IOException) RevisionSearcher(com.b2international.index.revision.RevisionSearcher) SnowowlRuntimeException(com.b2international.snowowl.core.api.SnowowlRuntimeException)

Example 7 with RevisionSearcher

use of com.b2international.index.revision.RevisionSearcher in project snow-owl by b2ihealthcare.

the class SnomedVersioningRequest method doVersionComponents.

@Override
protected void doVersionComponents(TransactionContext context) throws Exception {
    final Logger log = context.service(Logger.class);
    log.info("Publishing SNOMED CT components [effectiveTime: {}]...", EffectiveTimes.format(config().getEffectiveTime()));
    // sourceModuleId to targetModuleId map
    final Multimap<String, String> componentIdsByReferringModule = HashMultimap.create();
    final RevisionSearcher searcher = context.service(RevisionSearcher.class);
    final Stream<Hits<? extends SnomedDocument>> documentsToVersion = Streams.concat(Query.select(SnomedConceptDocument.class).where(SnomedDocument.Expressions.effectiveTime(EffectiveTimes.UNSET_EFFECTIVE_TIME)).limit(getCommitLimit(context)).build().stream(searcher), Query.select(SnomedDescriptionIndexEntry.class).where(SnomedDocument.Expressions.effectiveTime(EffectiveTimes.UNSET_EFFECTIVE_TIME)).limit(getCommitLimit(context)).build().stream(searcher), Query.select(SnomedRelationshipIndexEntry.class).where(SnomedDocument.Expressions.effectiveTime(EffectiveTimes.UNSET_EFFECTIVE_TIME)).limit(getCommitLimit(context)).build().stream(searcher), Query.select(SnomedRefSetMemberIndexEntry.class).where(SnomedDocument.Expressions.effectiveTime(EffectiveTimes.UNSET_EFFECTIVE_TIME)).limit(getCommitLimit(context)).build().stream(searcher));
    documentsToVersion.forEachOrdered(componentsToVersion -> versionComponents(context, componentsToVersion, componentIdsByReferringModule));
    // iterate over each module and get modules of all components registered to componentsByReferringModule
    log.info("Collecting module dependencies of changed components...");
    final Multimap<String, String> moduleDependencies = HashMultimap.create();
    final Map<String, Long> moduleToLatestEffectiveTime = newHashMap();
    for (String module : ImmutableSet.copyOf(componentIdsByReferringModule.keySet())) {
        final Collection<String> dependencies = componentIdsByReferringModule.removeAll(module);
        for (Class<? extends SnomedComponentDocument> type : CORE_COMPONENT_TYPES) {
            Query.select(String[].class).from(type).fields(SnomedComponentDocument.Fields.ID, SnomedComponentDocument.Fields.MODULE_ID, SnomedComponentDocument.Fields.EFFECTIVE_TIME).where(SnomedComponentDocument.Expressions.ids(dependencies)).limit(10000).build().stream(searcher).flatMap(Hits::stream).forEachOrdered(dependency -> {
                String targetModule = dependency[1];
                if (!module.equals(targetModule)) {
                    moduleDependencies.put(module, targetModule);
                }
                moduleToLatestEffectiveTime.merge(targetModule, Long.parseLong(dependency[2]), (oldEffectiveTime, newEffectiveTime) -> {
                    if (oldEffectiveTime == EffectiveTimes.UNSET_EFFECTIVE_TIME || newEffectiveTime == EffectiveTimes.UNSET_EFFECTIVE_TIME) {
                        return EffectiveTimes.UNSET_EFFECTIVE_TIME;
                    } else {
                        return Math.max(oldEffectiveTime, newEffectiveTime);
                    }
                });
            });
        }
    }
    log.info("Collecting module dependencies of changed components successfully finished.");
    log.info("Adjusting effective time changes on module dependency...");
    adjustDependencyRefSetMembers(context, moduleDependencies, moduleToLatestEffectiveTime, effectiveTime);
    log.info("Effective time adjustment successfully finished on module dependency.");
}
Also used : Hits(com.b2international.index.Hits) Logger(org.slf4j.Logger) RevisionSearcher(com.b2international.index.revision.RevisionSearcher)

Example 8 with RevisionSearcher

use of com.b2international.index.revision.RevisionSearcher in project snow-owl by b2ihealthcare.

the class ClassificationJobRequest method executeClassification.

private void executeClassification(final BranchContext context, final String classificationId, final ClassificationTracker tracker) {
    final RevisionSearcher revisionSearcher = context.service(RevisionSearcher.class);
    TerminologyResource resource = context.service(TerminologyResource.class);
    @SuppressWarnings("unchecked") final Set<String> reasonerExcludedModuleIds = Collections3.toImmutableSet((Iterable) resource.getSettings().getOrDefault(REASONER_EXCLUDE_MODULE_IDS, Collections.emptySet()));
    final SnomedCoreConfiguration configuration = context.service(SnomedCoreConfiguration.class);
    final boolean concreteDomainSupported = configuration.isConcreteDomainSupported();
    final ReasonerTaxonomy taxonomy;
    try (Locks locks = Locks.on(context).lock(DatastoreLockContextDescriptions.CLASSIFY, parentLockContext)) {
        taxonomy = buildTaxonomy(revisionSearcher, reasonerExcludedModuleIds, concreteDomainSupported);
    } catch (final LockedException e) {
        throw new ReasonerApiException("Couldn't acquire exclusive access to terminology store for classification; %s", e.getMessage(), e);
    }
    final OWLOntologyManager ontologyManager = OWLManager.createOWLOntologyManager();
    ontologyManager.getOntologyFactories().add(new DelegateOntologyFactory(taxonomy));
    // TODO: custom moduleId in ontology IRI?
    final IRI ontologyIRI = IRI.create(DelegateOntology.NAMESPACE_SCTM + Concepts.MODULE_SCT_CORE);
    try {
        final DelegateOntology ontology = (DelegateOntology) ontologyManager.createOntology(ontologyIRI);
        final ReasonerTaxonomyInferrer inferrer = new ReasonerTaxonomyInferrer(reasonerId, ontology, context);
        final ReasonerTaxonomy inferredTaxonomy = inferrer.addInferences(taxonomy);
        final NormalFormGenerator normalFormGenerator = new NormalFormGenerator(inferredTaxonomy);
        tracker.classificationCompleted(classificationId, inferredTaxonomy, normalFormGenerator);
    } catch (final OWLOntologyCreationException e) {
        throw new ReasonerApiException("Exception caught while creating ontology instance.", e);
    } catch (final ReasonerInterruptedException | OWLReasonerRuntimeException e) {
        throw new ReasonerApiException("Exception caught while classifying the ontology.", e);
    }
}
Also used : ReasonerTaxonomy(com.b2international.snowowl.snomed.datastore.index.taxonomy.ReasonerTaxonomy) IRI(org.semanticweb.owlapi.model.IRI) LockedException(com.b2international.commons.exceptions.LockedException) ReasonerInterruptedException(org.semanticweb.owlapi.reasoner.ReasonerInterruptedException) SnomedCoreConfiguration(com.b2international.snowowl.snomed.datastore.config.SnomedCoreConfiguration) ReasonerApiException(com.b2international.snowowl.snomed.reasoner.exceptions.ReasonerApiException) DelegateOntologyFactory(com.b2international.snowowl.snomed.reasoner.ontology.DelegateOntologyFactory) Locks(com.b2international.snowowl.core.locks.Locks) NormalFormGenerator(com.b2international.snowowl.snomed.reasoner.normalform.NormalFormGenerator) OWLReasonerRuntimeException(org.semanticweb.owlapi.reasoner.OWLReasonerRuntimeException) DelegateOntology(com.b2international.snowowl.snomed.reasoner.ontology.DelegateOntology) ReasonerTaxonomyInferrer(com.b2international.snowowl.snomed.reasoner.classification.ReasonerTaxonomyInferrer) OWLOntologyCreationException(org.semanticweb.owlapi.model.OWLOntologyCreationException) TerminologyResource(com.b2international.snowowl.core.TerminologyResource) OWLOntologyManager(org.semanticweb.owlapi.model.OWLOntologyManager) RevisionSearcher(com.b2international.index.revision.RevisionSearcher)

Example 9 with RevisionSearcher

use of com.b2international.index.revision.RevisionSearcher in project snow-owl by b2ihealthcare.

the class OntologyExportRequest method execute.

@Override
public String execute(final BranchContext context) {
    final RevisionSearcher revisionSearcher = context.service(RevisionSearcher.class);
    TerminologyResource resource = context.service(TerminologyResource.class);
    @SuppressWarnings("unchecked") final Set<String> reasonerExcludedModuleIds = Collections3.toImmutableSet((Iterable) resource.getSettings().getOrDefault(REASONER_EXCLUDE_MODULE_IDS, Collections.emptySet()));
    final SnomedCoreConfiguration configuration = context.service(SnomedCoreConfiguration.class);
    final boolean concreteDomainSupportEnabled = configuration.isConcreteDomainSupported();
    final ReasonerTaxonomyBuilder taxonomyBuilder = new ReasonerTaxonomyBuilder(reasonerExcludedModuleIds);
    taxonomyBuilder.addActiveConceptIds(revisionSearcher);
    taxonomyBuilder.finishConcepts();
    taxonomyBuilder.addFullySpecifiedNames(revisionSearcher);
    taxonomyBuilder.addConceptFlags(revisionSearcher);
    taxonomyBuilder.addActiveStatedEdges(revisionSearcher);
    taxonomyBuilder.addActiveStatedRelationships(revisionSearcher);
    taxonomyBuilder.addNeverGroupedTypeIds(revisionSearcher);
    taxonomyBuilder.addActiveAxioms(revisionSearcher);
    if (concreteDomainSupportEnabled) {
        taxonomyBuilder.addActiveConcreteDomainMembers(revisionSearcher);
    }
    final ReasonerTaxonomy taxonomy = taxonomyBuilder.build();
    final OWLOntologyManager ontologyManager = OWLManager.createOWLOntologyManager();
    ontologyManager.getOntologyFactories().add(new DelegateOntologyFactory(taxonomy));
    final IRI ontologyIRI = IRI.create(DelegateOntology.NAMESPACE_SCTM + ontologyModuleId);
    try {
        final OWLOntology ontology = ontologyManager.createOntology(ontologyIRI);
        OWLOntology ontologyToExport = ontologyManager.createOntology();
        ontology.getAxioms().forEach(axiom -> {
            ontologyManager.addAxiom(ontologyToExport, axiom);
        });
        final OWLDocumentFormat documentFormat = getOWLDocumentFormat();
        final AttachmentRegistry fileRegistry = context.service(AttachmentRegistry.class);
        final UUID id = UUID.randomUUID();
        final PipedOutputStream os = new PipedOutputStream();
        final PipedInputStream is = new PipedInputStream(os, PIPE_SIZE);
        final ForkJoinTask<?> uploadTask = ForkJoinTask.adapt(() -> fileRegistry.upload(id, is));
        final ForkJoinTask<?> saveTask = ForkJoinTask.adapt(() -> {
            try {
                ontologyManager.saveOntology(ontologyToExport, documentFormat, os);
            } catch (final OWLOntologyStorageException e) {
                throw createExportFailedException(context, e);
            } finally {
                try {
                    os.close();
                } catch (final IOException e) {
                    throw createExportFailedException(context, e);
                }
            }
        });
        ForkJoinTask.invokeAll(saveTask, uploadTask);
        return id.toString();
    } catch (final OWLOntologyCreationException e) {
        throw createExportFailedException(context, e);
    } catch (final IOException e) {
        throw createExportFailedException(context, e);
    } finally {
        // invalidate static cache entries :'(
        ontologyManager.getOntologies().forEach(o -> {
            ontologyManager.applyChange(new SetOntologyID(o, new OWLOntologyID()));
        });
    }
}
Also used : ReasonerTaxonomy(com.b2international.snowowl.snomed.datastore.index.taxonomy.ReasonerTaxonomy) ReasonerTaxonomyBuilder(com.b2international.snowowl.snomed.datastore.index.taxonomy.ReasonerTaxonomyBuilder) AttachmentRegistry(com.b2international.snowowl.core.attachments.AttachmentRegistry) SnomedCoreConfiguration(com.b2international.snowowl.snomed.datastore.config.SnomedCoreConfiguration) DelegateOntologyFactory(com.b2international.snowowl.snomed.reasoner.ontology.DelegateOntologyFactory) PipedOutputStream(java.io.PipedOutputStream) PipedInputStream(java.io.PipedInputStream) IOException(java.io.IOException) TerminologyResource(com.b2international.snowowl.core.TerminologyResource) UUID(java.util.UUID) RevisionSearcher(com.b2international.index.revision.RevisionSearcher)

Example 10 with RevisionSearcher

use of com.b2international.index.revision.RevisionSearcher in project snow-owl by b2ihealthcare.

the class SnomedRepositoryPreCommitHook method getChangeSetProcessors.

@Override
protected Collection<ChangeSetProcessor> getChangeSetProcessors(StagingArea staging, RevisionSearcher index) throws IOException {
    final RepositoryContext context = ClassUtils.checkAndCast(staging.getContext(), RepositoryContext.class);
    // initialize OWL Expression converter on the current branch
    final SnomedOWLExpressionConverter expressionConverter = new BranchRequest<>(staging.getBranchPath(), branchContext -> {
        return new SnomedOWLExpressionConverter(branchContext.inject().bind(RevisionSearcher.class, index).build());
    }).execute(context);
    final Set<String> statedSourceIds = Sets.newHashSet();
    final Set<String> statedDestinationIds = Sets.newHashSet();
    final Set<String> inferredSourceIds = Sets.newHashSet();
    final Set<String> inferredDestinationIds = Sets.newHashSet();
    collectIds(statedSourceIds, statedDestinationIds, staging.getNewObjects(SnomedRelationshipIndexEntry.class), Concepts.STATED_RELATIONSHIP);
    collectIds(statedSourceIds, statedDestinationIds, staging.getChangedRevisions(SnomedRelationshipIndexEntry.class).map(diff -> (SnomedRelationshipIndexEntry) diff.newRevision), Concepts.STATED_RELATIONSHIP);
    collectIds(inferredSourceIds, inferredDestinationIds, staging.getNewObjects(SnomedRelationshipIndexEntry.class), Concepts.INFERRED_RELATIONSHIP);
    collectIds(inferredSourceIds, inferredDestinationIds, staging.getChangedRevisions(SnomedRelationshipIndexEntry.class).map(diff -> (SnomedRelationshipIndexEntry) diff.newRevision), Concepts.INFERRED_RELATIONSHIP);
    collectIds(statedSourceIds, statedDestinationIds, staging.getNewObjects(SnomedRefSetMemberIndexEntry.class), expressionConverter);
    collectIds(statedSourceIds, statedDestinationIds, staging.getChangedRevisions(SnomedRefSetMemberIndexEntry.class).map(diff -> (SnomedRefSetMemberIndexEntry) diff.newRevision), expressionConverter);
    staging.getRemovedObjects(SnomedRelationshipIndexEntry.class).filter(detachedRelationship -> Concepts.IS_A.equals(detachedRelationship.getTypeId())).forEach(detachedRelationship -> {
        // XXX: IS A relationships are expected to have a destination ID, not a value
        checkState(!detachedRelationship.hasValue(), "IS A relationship found with value: %s", detachedRelationship.getId());
        if (Concepts.STATED_RELATIONSHIP.equals(detachedRelationship.getCharacteristicTypeId())) {
            statedSourceIds.add(detachedRelationship.getSourceId());
            statedDestinationIds.add(detachedRelationship.getDestinationId());
        } else if (Concepts.INFERRED_RELATIONSHIP.equals(detachedRelationship.getCharacteristicTypeId())) {
            inferredSourceIds.add(detachedRelationship.getSourceId());
            inferredDestinationIds.add(detachedRelationship.getDestinationId());
        }
    });
    staging.getRemovedObjects(SnomedRefSetMemberIndexEntry.class).filter(detachedMember -> SnomedRefSetType.OWL_AXIOM == detachedMember.getReferenceSetType()).forEach(detachedOwlMember -> {
        collectIds(statedSourceIds, statedDestinationIds, detachedOwlMember, expressionConverter);
    });
    final LongSet statedConceptIds = PrimitiveSets.newLongOpenHashSet();
    final LongSet inferredConceptIds = PrimitiveSets.newLongOpenHashSet();
    if (!statedDestinationIds.isEmpty()) {
        for (SnomedConceptDocument statedDestinationConcept : index.get(SnomedConceptDocument.class, statedDestinationIds)) {
            statedConceptIds.add(Long.parseLong(statedDestinationConcept.getId()));
            if (statedDestinationConcept.getStatedParents() != null) {
                statedConceptIds.addAll(statedDestinationConcept.getStatedParents());
            }
            if (statedDestinationConcept.getStatedAncestors() != null) {
                statedConceptIds.addAll(statedDestinationConcept.getStatedAncestors());
            }
        }
    }
    if (!inferredDestinationIds.isEmpty()) {
        for (SnomedConceptDocument inferredDestinationConcept : index.get(SnomedConceptDocument.class, inferredDestinationIds)) {
            inferredConceptIds.add(Long.parseLong(inferredDestinationConcept.getId()));
            if (inferredDestinationConcept.getParents() != null) {
                inferredConceptIds.addAll(inferredDestinationConcept.getParents());
            }
            if (inferredDestinationConcept.getAncestors() != null) {
                inferredConceptIds.addAll(inferredDestinationConcept.getAncestors());
            }
        }
    }
    staging.getRemovedObjects(SnomedDescriptionIndexEntry.class).forEach(removedDescription -> {
        if (removedDescription.isFsn() && removedDescription.isActive()) {
            statedSourceIds.add(removedDescription.getConceptId());
            inferredSourceIds.add(removedDescription.getConceptId());
        }
    });
    staging.getChangedRevisions(SnomedDescriptionIndexEntry.class).filter(diff -> ((SnomedDescriptionIndexEntry) diff.newRevision).isFsn()).filter(diff -> diff.hasRevisionPropertyChanges(ACTIVE_AND_TERM_FIELDS)).forEach(diff -> {
        SnomedDescriptionIndexEntry newRevision = (SnomedDescriptionIndexEntry) diff.newRevision;
        statedSourceIds.add(newRevision.getConceptId());
        inferredSourceIds.add(newRevision.getConceptId());
    });
    staging.getNewObjects(SnomedDescriptionIndexEntry.class).filter(newDescription -> newDescription.isFsn() && newDescription.isActive()).forEach(newDescription -> {
        statedSourceIds.add(newDescription.getConceptId());
        inferredSourceIds.add(newDescription.getConceptId());
    });
    if (!statedSourceIds.isEmpty()) {
        final Query<SnomedConceptDocument> statedSourceConceptsQuery = Query.select(SnomedConceptDocument.class).where(Expressions.builder().should(SnomedConceptDocument.Expressions.ids(statedSourceIds)).should(SnomedConceptDocument.Expressions.statedParents(statedSourceIds)).should(SnomedConceptDocument.Expressions.statedAncestors(statedSourceIds)).build()).limit(Integer.MAX_VALUE).build();
        for (SnomedConceptDocument statedSourceConcept : index.search(statedSourceConceptsQuery)) {
            statedConceptIds.add(Long.parseLong(statedSourceConcept.getId()));
            if (statedSourceConcept.getStatedParents() != null) {
                statedConceptIds.addAll(statedSourceConcept.getStatedParents());
            }
            if (statedSourceConcept.getStatedAncestors() != null) {
                statedConceptIds.addAll(statedSourceConcept.getStatedAncestors());
            }
        }
    }
    if (!inferredSourceIds.isEmpty()) {
        final Query<SnomedConceptDocument> inferredSourceConceptsQuery = Query.select(SnomedConceptDocument.class).where(Expressions.builder().should(SnomedConceptDocument.Expressions.ids(inferredSourceIds)).should(SnomedConceptDocument.Expressions.parents(inferredSourceIds)).should(SnomedConceptDocument.Expressions.ancestors(inferredSourceIds)).build()).limit(Integer.MAX_VALUE).build();
        for (SnomedConceptDocument inferredSourceConcept : index.search(inferredSourceConceptsQuery)) {
            inferredConceptIds.add(Long.parseLong(inferredSourceConcept.getId()));
            if (inferredSourceConcept.getParents() != null) {
                inferredConceptIds.addAll(inferredSourceConcept.getParents());
            }
            if (inferredSourceConcept.getAncestors() != null) {
                inferredConceptIds.addAll(inferredSourceConcept.getAncestors());
            }
        }
    }
    staging.getNewObjects(SnomedConceptDocument.class).forEach(newConcept -> {
        long longId = Long.parseLong(newConcept.getId());
        statedConceptIds.add(longId);
        inferredConceptIds.add(longId);
    });
    // collect all reactivated concepts for the taxonomy to properly re-register them in the tree even if they don't carry stated/inferred information in this commit, but they have something in the index
    staging.getChangedRevisions(SnomedConceptDocument.class, Set.of(SnomedRf2Headers.FIELD_ACTIVE)).forEach(diff -> {
        RevisionPropertyDiff propertyDiff = diff.getRevisionPropertyDiff(SnomedRf2Headers.FIELD_ACTIVE);
        if ("false".equals(propertyDiff.getOldValue()) && "true".equals(propertyDiff.getNewValue())) {
            long longId = Long.parseLong(diff.newRevision.getId());
            statedConceptIds.add(longId);
            inferredConceptIds.add(longId);
        }
    });
    log.trace("Retrieving taxonomic information from store...");
    final boolean checkCycles = !(context instanceof Rf2TransactionContext);
    final Taxonomy inferredTaxonomy = Taxonomies.inferred(index, expressionConverter, staging, inferredConceptIds, checkCycles);
    final Taxonomy statedTaxonomy = Taxonomies.stated(index, expressionConverter, staging, statedConceptIds, checkCycles);
    // XXX change processor execution order is important!!!
    return List.of(// those values will be used in the ConceptChangeProcessor for example to properly compute the preferredDescriptions derived field
    new DescriptionChangeProcessor(), new ConceptChangeProcessor(DoiDataProvider.INSTANCE, SnomedIconProvider.INSTANCE.getAvailableIconIds(), statedTaxonomy, inferredTaxonomy), new RelationshipChangeProcessor());
}
Also used : BranchRequest(com.b2international.snowowl.core.request.BranchRequest) SnomedIconProvider(com.b2international.snowowl.snomed.icons.SnomedIconProvider) Query(com.b2international.index.query.Query) ClassUtils(com.b2international.commons.ClassUtils) RevisionBranch(com.b2international.index.revision.RevisionBranch) BaseRepositoryPreCommitHook(com.b2international.snowowl.core.repository.BaseRepositoryPreCommitHook) SnomedOWLExpressionConverterResult(com.b2international.snowowl.snomed.datastore.request.SnomedOWLExpressionConverterResult) Rf2ImportConfiguration(com.b2international.snowowl.snomed.datastore.request.rf2.importer.Rf2ImportConfiguration) Concepts(com.b2international.snowowl.snomed.common.SnomedConstants.Concepts) PrimitiveSets(com.b2international.collections.PrimitiveSets) LongSet(com.b2international.collections.longs.LongSet) ImmutableList(com.google.common.collect.ImmutableList) RevisionSearcher(com.b2international.index.revision.RevisionSearcher) com.b2international.snowowl.snomed.datastore.index.entry(com.b2international.snowowl.snomed.datastore.index.entry) CompareUtils(com.b2international.commons.CompareUtils) RevisionPropertyDiff(com.b2international.index.revision.StagingArea.RevisionPropertyDiff) Rf2ReleaseType(com.b2international.snowowl.snomed.core.domain.Rf2ReleaseType) Logger(org.slf4j.Logger) RepositoryContext(com.b2international.snowowl.core.domain.RepositoryContext) Collection(java.util.Collection) SnomedOWLExpressionConverter(com.b2international.snowowl.snomed.datastore.request.SnomedOWLExpressionConverter) Set(java.util.Set) IOException(java.io.IOException) Taxonomy(com.b2international.snowowl.snomed.datastore.taxonomy.Taxonomy) Sets(com.google.common.collect.Sets) Preconditions.checkState(com.google.common.base.Preconditions.checkState) List(java.util.List) Stream(java.util.stream.Stream) Expressions(com.b2international.index.query.Expressions) Taxonomies(com.b2international.snowowl.snomed.datastore.taxonomy.Taxonomies) Rf2TransactionContext(com.b2international.snowowl.snomed.datastore.request.rf2.importer.Rf2TransactionContext) StagingArea(com.b2international.index.revision.StagingArea) ChangeSetProcessor(com.b2international.snowowl.core.repository.ChangeSetProcessor) SnomedRf2Headers(com.b2international.snowowl.snomed.common.SnomedRf2Headers) Collections(java.util.Collections) SnomedRefSetType(com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType) RepositoryContext(com.b2international.snowowl.core.domain.RepositoryContext) Taxonomy(com.b2international.snowowl.snomed.datastore.taxonomy.Taxonomy) LongSet(com.b2international.collections.longs.LongSet) RevisionPropertyDiff(com.b2international.index.revision.StagingArea.RevisionPropertyDiff) Rf2TransactionContext(com.b2international.snowowl.snomed.datastore.request.rf2.importer.Rf2TransactionContext) SnomedOWLExpressionConverter(com.b2international.snowowl.snomed.datastore.request.SnomedOWLExpressionConverter) RevisionSearcher(com.b2international.index.revision.RevisionSearcher)

Aggregations

RevisionSearcher (com.b2international.index.revision.RevisionSearcher)20 IOException (java.io.IOException)15 StagingArea (com.b2international.index.revision.StagingArea)10 Sets.newHashSet (com.google.common.collect.Sets.newHashSet)9 Query (com.b2international.index.query.Query)8 Concepts (com.b2international.snowowl.snomed.common.SnomedConstants.Concepts)8 Set (java.util.Set)8 Hits (com.b2international.index.Hits)7 Expressions (com.b2international.index.query.Expressions)7 Collectors (java.util.stream.Collectors)7 SnomedRefSetType (com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType)6 Collection (java.util.Collection)6 RevisionPropertyDiff (com.b2international.index.revision.StagingArea.RevisionPropertyDiff)5 ChangeSetProcessorBase (com.b2international.snowowl.core.repository.ChangeSetProcessorBase)5 com.b2international.snowowl.snomed.datastore.index.entry (com.b2international.snowowl.snomed.datastore.index.entry)5 SnomedConceptDocument (com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument)5 SnomedRefSetMemberIndexEntry (com.b2international.snowowl.snomed.datastore.index.entry.SnomedRefSetMemberIndexEntry)5 RefSetMemberChange (com.b2international.snowowl.snomed.datastore.index.refset.RefSetMemberChange)5 Multimap (com.google.common.collect.Multimap)5 Options (com.b2international.commons.options.Options)4