Package org.apache.stanbol.ontologymanager.servicesapi.session

Examples of org.apache.stanbol.ontologymanager.servicesapi.session.Session.listManagedOntologies()


        // ... and versioned ontologies too.
        session.addOntology(new GraphContentInputSource(getClass().getResourceAsStream(
            "/ontologies/versiontest_v1.owl")));
        session.addOntology(new GraphContentInputSource(getClass().getResourceAsStream(
            "/ontologies/versiontest_v2.owl")));
        Collection<OWLOntologyID> managed = session.listManagedOntologies();
        assertEquals(4, managed.size());

        // Simulate Stanbol going down.
        log.info("Stanbol going down...");
        resetOntologyProvider(); // but keep the TcProvider
View Full Code Here


        resetOntologyProvider(); // but keep the TcProvider
        resetManagers();

        Session ses = sessionManager.getSession(id);
        assertNotNull(ses);
        assertEquals(managed, ses.listManagedOntologies());
        assertEquals(session, ses); // XXX Remember that only weak equality is implemented.
    }

    /*
     * With this method, the ontology provider and all its internal indices are cleared. However, the Clerezza
View Full Code Here

             * The session needs to be destroyed anyhow.
             *
             * Clear contents before destroying (FIXME only do this until this is implemented in the
             * destroySession() method).
             */
            for (OWLOntologyID id : session.listManagedOntologies()) {
                try {
                    String key = ontologyProvider.getKey(id.getOntologyIRI());
                    ontologyProvider.getStore().deleteTripleCollection(new UriRef(key));
                } catch (Exception ex) {
                    log.error("Failed to delete triple collection " + id, ex);
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.