Examples of loadOntologyFromOntologyDocument()


Examples of org.semanticweb.owlapi.model.OWLOntologyManager.loadOntologyFromOntologyDocument()

        ont2.getOWLOntologyManager().saveOntology(ont2, format, writer2);
        OWLOntologyManager man = OWLManager.createOWLOntologyManager();
        @SuppressWarnings("unused")
        OWLOntology ont1L = man
                .loadOntologyFromOntologyDocument(savedLocation1);
        OWLOntology ont2L = man
                .loadOntologyFromOntologyDocument(savedLocation2);
        for (OWLOntology importedOntology : ont2L.getImports()) {
            for (OWLAxiom importedAxiom : importedOntology.getAxioms()) {
                assert importedAxiom != null;
                assertTrue(containsConsiderEx(importedOntology, importedAxiom));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.loadOntologyFromOntologyDocument()

    public static void main(String[] args) {
        try {
            // Load an example ontology. In this case, we'll just load the pizza
            // ontology.
            OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
            OWLOntology ontology = manager
                    .loadOntologyFromOntologyDocument(new StringDocumentSource(
                            KOALA));
            System.out.println("Loaded ontology: " + ontology.getOntologyID());
            // We need a reasoner to do our query answering
            OWLReasoner reasoner = createReasoner(ontology);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.loadOntologyFromOntologyDocument()

    protected OWLOntology loadOntologyWithConfig(
            @Nonnull StringDocumentTarget o,
            @Nonnull OWLOntologyLoaderConfiguration c)
            throws OWLOntologyCreationException {
        OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
        return manager.loadOntologyFromOntologyDocument(
                new StringDocumentSource(o), c);
    }

    @Nonnull
    protected StringDocumentTarget saveOntology(@Nonnull OWLOntology o)
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.loadOntologyFromOntologyDocument()

    @Test
    public void shouldNotLoadWrong() throws OWLOntologyCreationException {
        OWLOntologyManager m = OWLManager.createOWLOntologyManager();
        m.createOntology(IRI.create("urn:test"));
        StringDocumentSource documentSource = new StringDocumentSource(input);
        OWLOntology o = m.loadOntologyFromOntologyDocument(documentSource);
        assertTrue(o.getOntologyID().toString(), o.isAnonymous());
        assertFalse(o.getOntologyID().getDefaultDocumentIRI().isPresent());
    }
}
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.loadOntologyFromOntologyDocument()

        // Now ask the manager to load the ontology
        // OWLOntology ontology = manager
        // .loadOntologyFromOntologyDocument(documentIRI);
        // but in this test we don't rely on a remote ontology and load it from
        // a string
        OWLOntology ontology = manager
                .loadOntologyFromOntologyDocument(new StringDocumentSource(
                        KOALA));
        // Print out all of the classes which are contained in the signature of
        // the ontology. These are the classes that are referenced by axioms in
        // the ontology.
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.loadOntologyFromOntologyDocument()

        @SuppressWarnings("null")
        OWLOntologyDocumentSource source = new StreamDocumentSource(getClass()
                .getResourceAsStream("/celltype.obo"),
                OWLOntologyDocumentSourceBase.getNextDocumentIRI("obo"),
                new OBO12DocumentFormat(), null);
        m.loadOntologyFromOntologyDocument(source);
    }

    @Test
    public void shouldParseOBO12() throws OWLOntologyCreationException {
        OWLOntologyManager m = OWLManager.createOWLOntologyManager();
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.loadOntologyFromOntologyDocument()

        @SuppressWarnings("null")
        OWLOntologyDocumentSource source = new StreamDocumentSource(getClass()
                .getResourceAsStream("/behavior.obo"),
                OWLOntologyDocumentSourceBase.getNextDocumentIRI("obo"),
                new OBO12DocumentFormat(), null);
        m.loadOntologyFromOntologyDocument(source);
    }

    @SuppressWarnings("null")
    @Test
    public void shouldParseGenericOBO() throws OWLOntologyCreationException {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.loadOntologyFromOntologyDocument()

    public void shouldParseGenericOBO() throws OWLOntologyCreationException {
        OWLOntologyManager m = OWLManager.createOWLOntologyManager();
        assertEquals(19, m.getOntologyParsers().size());
        OWLOntologyDocumentSource source = new StreamDocumentSource(getClass()
                .getResourceAsStream("/behavior.obo"));
        m.loadOntologyFromOntologyDocument(source);
    }
}
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.loadOntologyFromOntologyDocument()

                + "created_by: george gkoutos";
        StringDocumentSource streamDocumentSource = new StringDocumentSource(
                input);
        OWLOntologyLoaderConfiguration loaderConfig = new OWLOntologyLoaderConfiguration()
                .setMissingImportHandlingStrategy(MissingImportHandlingStrategy.SILENT);
        OWLOntology ontology = rootOntologyManager
                .loadOntologyFromOntologyDocument(streamDocumentSource,
                        loaderConfig);
        OWLAnnotationProperty date = AnnotationProperty(IRI("http://www.geneontology.org/formats/oboInOwl#date"));
        OWLAnnotationProperty mpathSlim = AnnotationProperty(IRI("http://purl.obolibrary.org/obo/uo#mpath_slim"));
        OWLAnnotationProperty subsetProperty = AnnotationProperty(IRI("http://www.geneontology.org/formats/oboInOwl#SubsetProperty"));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.loadOntologyFromOntologyDocument()

        // storerRegistry, parserRegistry);
        OWLOntologyManager testManager = OWLManager.createOWLOntologyManager();
        testManager.getOntologyStorers().set(new RioNTriplesStorerFactory(),
                new RioRDFXMLStorerFactory(), new RioTurtleStorerFactory());
        testOntologyEmpty = testManager.createOntology(testOntologyUri1);
        testOntologyKoala = testManager
                .loadOntologyFromOntologyDocument(getClass()
                        .getResourceAsStream("/koala.owl"));
        assertEquals(70, testOntologyKoala.getAxiomCount());
        testHandlerStatementCollector = new StatementCollector();
        testOntologyEmptyStatement = vf
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.