Search in sources :

Example 6 with InferenceProvider

use of org.geneontology.minerva.json.InferenceProvider in project minerva by geneontology.

the class CachingInferenceProviderCreatorImpl method create.

@Override
public InferenceProvider create(final ModelContainer model) throws OWLOntologyCreationException, InterruptedException, IOException {
    synchronized (model.getAboxOntology()) {
        InferenceProvider inferenceProvider = inferenceCache.get(model);
        if (inferenceProvider == null) {
            addMiss();
            inferenceProvider = super.create(model);
            model.registerListener(new ModelChangeListenerImplementation(model));
            inferenceCache.put(model, inferenceProvider);
        } else {
            addHit();
        }
        return inferenceProvider;
    }
}
Also used : InferenceProvider(org.geneontology.minerva.json.InferenceProvider)

Aggregations

InferenceProvider (org.geneontology.minerva.json.InferenceProvider)6 Gson (com.google.gson.Gson)2 GsonBuilder (com.google.gson.GsonBuilder)2 URL (java.net.URL)2 ModelContainer (org.geneontology.minerva.ModelContainer)2 CurieHandler (org.geneontology.minerva.curie.CurieHandler)2 DefaultCurieHandler (org.geneontology.minerva.curie.DefaultCurieHandler)2 MappedCurieHandler (org.geneontology.minerva.curie.MappedCurieHandler)2 JsonModel (org.geneontology.minerva.json.JsonModel)2 MolecularModelJsonRenderer (org.geneontology.minerva.json.MolecularModelJsonRenderer)2 InferenceProviderCreator (org.geneontology.minerva.server.inferences.InferenceProviderCreator)2 ValidationResultSet (org.geneontology.minerva.validation.ValidationResultSet)2 RepositoryException (org.openrdf.repository.RepositoryException)2 RDFHandlerException (org.openrdf.rio.RDFHandlerException)2 RDFParseException (org.openrdf.rio.RDFParseException)2 File (java.io.File)1 IOException (java.io.IOException)1 MalformedURLException (java.net.MalformedURLException)1 UndoAwareMolecularModelManager (org.geneontology.minerva.UndoAwareMolecularModelManager)1 CurieMappings (org.geneontology.minerva.curie.CurieMappings)1