Search in sources :

Example 16 with Session

use of org.apache.stanbol.ontologymanager.servicesapi.session.Session in project stanbol by apache.

the class TestSessions method zombieSessionClearsContents.

// @Test
public void zombieSessionClearsContents() throws Exception {
    Session ses = sessionManager.createSession();
    ses.addOntology(new RootOntologySource((IRI.create(getClass().getResource("/ontologies/mockfoaf.rdf")))));
    OWLOntologyID expectedKey = new OWLOntologyID(IRI.create("http://xmlns.com/foaf/0.1/"));
    assertTrue(ontologyProvider.hasOntology(expectedKey));
    sessionManager.destroySession(ses.getID());
}
Also used : RootOntologySource(org.apache.stanbol.ontologymanager.sources.owlapi.RootOntologySource) OWLOntologyID(org.semanticweb.owlapi.model.OWLOntologyID) Session(org.apache.stanbol.ontologymanager.servicesapi.session.Session)

Aggregations

Session (org.apache.stanbol.ontologymanager.servicesapi.session.Session)16 OWLOntologyID (org.semanticweb.owlapi.model.OWLOntologyID)5 Scope (org.apache.stanbol.ontologymanager.servicesapi.scope.Scope)4 Test (org.junit.Test)4 IOException (java.io.IOException)3 IRI (org.apache.clerezza.commons.rdf.IRI)3 Triple (org.apache.clerezza.commons.rdf.Triple)3 DuplicateSessionIDException (org.apache.stanbol.ontologymanager.servicesapi.session.DuplicateSessionIDException)3 NonReferenceableSessionException (org.apache.stanbol.ontologymanager.servicesapi.session.NonReferenceableSessionException)3 SessionLimitException (org.apache.stanbol.ontologymanager.servicesapi.session.SessionLimitException)3 HashSet (java.util.HashSet)2 BlankNodeOrIRI (org.apache.clerezza.commons.rdf.BlankNodeOrIRI)2 TripleImpl (org.apache.clerezza.commons.rdf.impl.utils.TripleImpl)2 SessionImpl (org.apache.stanbol.ontologymanager.multiplexer.clerezza.impl.SessionImpl)2 OntologySpace (org.apache.stanbol.ontologymanager.servicesapi.scope.OntologySpace)2 OWLOntology (org.semanticweb.owlapi.model.OWLOntology)2 OWLOntologyCreationException (org.semanticweb.owlapi.model.OWLOntologyCreationException)2 FileNotFoundException (java.io.FileNotFoundException)1 Set (java.util.Set)1 POST (javax.ws.rs.POST)1