Package org.apache.stanbol.ontologymanager.ontonet.api.scope

Examples of org.apache.stanbol.ontologymanager.ontonet.api.scope.SessionOntologySpace


    }

    @Override
    public SessionOntologySpace createSessionOntologySpace(String scopeId,
                                                           OntologyInputSource<?,?>... sessionSources) {
        SessionOntologySpace s = new SessionOntologySpaceImpl(scopeId, namespace, /* storage, */
        OWLOntologyManagerFactory.createOWLOntologyManager(offline.getOntologySourceLocations().toArray(
            new IRI[0])));
        for (OntologyInputSource<?,?> src : sessionSources)
            try {
                s.addOntology(src);
            } catch (UnmodifiableOntologyCollectorException e) {
                // Should never happen anyway...
                continue;
            }
        // s.setUp();
View Full Code Here


    }

    // @Test
    public void testSessionModification() throws Exception {
        SessionOntologySpace space = factory.createSessionOntologySpace(scopeId);
        space.setUp();
        try {
            // First add an in-memory ontology with a few axioms.
            space.addOntology(inMemorySrc);
            // Now add a real online ontology
            space.addOntology(dropSrc);
            // The in-memory ontology must be in the space.
            assertTrue(space.hasOntology(baseIri));
            // The in-memory ontology must still have its axioms.
            assertTrue(space.getOntology(baseIri).containsAxiom(linusIsHuman));

            // // The top ontology must still have axioms from in-memory
            // // ontologies. NO LONGER
            // assertTrue(space.getTopOntology().containsAxiom(linusIsHuman));
        } catch (UnmodifiableOntologyCollectorException e) {
View Full Code Here

    }

    // @Test
    public void testSessionModification() throws Exception {
        SessionOntologySpace space = factory.createSessionOntologySpace(scopeId);
        space.setUp();
        try {
            // First add an in-memory ontology with a few axioms.
            space.addOntology(inMemorySrc);
            // Now add a real online ontology
            space.addOntology(dropSrc);
            // The in-memory ontology must be in the space.
            assertTrue(space.getOntologies(true).contains(ont));
            // The in-memory ontology must still have its axioms.
            assertTrue(space.getOntology(ont.getOntologyID().getOntologyIRI()).containsAxiom(linusIsHuman));

            // // The top ontology must still have axioms from in-memory
            // // ontologies. NO LONGER
            // assertTrue(space.getTopOntology().containsAxiom(linusIsHuman));
        } catch (UnmodifiableOntologyCollectorException e) {
View Full Code Here

TOP

Related Classes of org.apache.stanbol.ontologymanager.ontonet.api.scope.SessionOntologySpace

Copyright © 2018 www.massapicom. 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.