Search in sources :

Example 11 with CurieHandler

use of org.geneontology.minerva.curie.CurieHandler in project minerva by geneontology.

the class ShexValidatorTest method setUpBeforeClass.

@BeforeClass
public static void setUpBeforeClass() throws Exception {
    go_lego = new BlazegraphOntologyManager(go_lego_journal_file, true);
    CurieHandler curieHandler = DefaultCurieHandler.getDefaultHandler();
    shex = new ShexValidator(schemaFile, mainShapemapFile, go_lego, curieHandler);
    shexMeta = new ShexValidator(metadataSchemaFile, metadataShapemapFile, go_lego, curieHandler);
}
Also used : BlazegraphOntologyManager(org.geneontology.minerva.BlazegraphOntologyManager) CurieHandler(org.geneontology.minerva.curie.CurieHandler) DefaultCurieHandler(org.geneontology.minerva.curie.DefaultCurieHandler) BeforeClass(org.junit.BeforeClass)

Example 12 with CurieHandler

use of org.geneontology.minerva.curie.CurieHandler in project minerva by geneontology.

the class BlazegraphMolecularModelManagerTest method createBlazegraphMolecularModelManager.

/**
 * @return the instance of BlazegraphMolecularModelManager
 * @throws Exception
 */
private BlazegraphMolecularModelManager<Void> createBlazegraphMolecularModelManager() throws Exception {
    /* A path of the temporary journal file for Blazegraph storage system */
    String journalPath = folder.newFile().getAbsolutePath();
    /* A root path of the temporary directory */
    String tempRootPath = folder.getRoot().getAbsolutePath();
    /* Delete the journal file if exists */
    FileUtils.deleteQuietly(new File(journalPath));
    OWLOntology tbox = OWLManager.createOWLOntologyManager().loadOntology(IRI.create(new File("src/test/resources/mmg/basic-tbox.omn")));
    Map<String, String> prefixes = new HashMap<>();
    prefixes.put("gomodel", "http://model.geneontology.org/");
    prefixes.put("ex", "http://example.org/");
    prefixes.put("GO", "http://purl.obolibrary.org/obo/GO_");
    CurieHandler curieHandler = new MappedCurieHandler(prefixes);
    BlazegraphMolecularModelManager<Void> m3 = new BlazegraphMolecularModelManager<>(tbox, curieHandler, "http://model.geneontology.org/", journalPath, tempRootPath, go_lego_journal_file, true);
    return m3;
}
Also used : MappedCurieHandler(org.geneontology.minerva.curie.MappedCurieHandler) CurieHandler(org.geneontology.minerva.curie.CurieHandler) DefaultCurieHandler(org.geneontology.minerva.curie.DefaultCurieHandler) MappedCurieHandler(org.geneontology.minerva.curie.MappedCurieHandler) File(java.io.File)

Aggregations

CurieHandler (org.geneontology.minerva.curie.CurieHandler)12 DefaultCurieHandler (org.geneontology.minerva.curie.DefaultCurieHandler)9 MappedCurieHandler (org.geneontology.minerva.curie.MappedCurieHandler)9 File (java.io.File)3 Test (org.junit.Test)3 RepositoryException (org.openrdf.repository.RepositoryException)3 Gson (com.google.gson.Gson)2 GsonBuilder (com.google.gson.GsonBuilder)2 ModelContainer (org.geneontology.minerva.ModelContainer)2 UndoAwareMolecularModelManager (org.geneontology.minerva.UndoAwareMolecularModelManager)2 CurieMappings (org.geneontology.minerva.curie.CurieMappings)2 InferenceProvider (org.geneontology.minerva.json.InferenceProvider)2 GPADSPARQLExport (org.geneontology.minerva.legacy.sparql.GPADSPARQLExport)2 CatalogXmlIRIMapper (org.obolibrary.robot.CatalogXmlIRIMapper)2 RDFHandlerException (org.openrdf.rio.RDFHandlerException)2 RDFParseException (org.openrdf.rio.RDFParseException)2 IRI (org.semanticweb.owlapi.model.IRI)2 OWLOntology (org.semanticweb.owlapi.model.OWLOntology)2 OWLOntologyManager (org.semanticweb.owlapi.model.OWLOntologyManager)2 InconsistentOntologyException (org.semanticweb.owlapi.reasoner.InconsistentOntologyException)2