Package org.apache.stanbol.ontologymanager.servicesapi.scope

Examples of org.apache.stanbol.ontologymanager.servicesapi.scope.OntologySpace.removeOntology()


        // The other remote ontologies may change base IRI...
        // baseIri is maincharacters
        assertTrue(space.hasOntology(baseIri));
        assertTrue(space.hasOntology(dropId));
        assertTrue(space.hasOntology(nonexId));
        space.removeOntology(dropId);
        assertFalse(space.hasOntology(dropId));
        space.removeOntology(nonexId);
        assertFalse(space.hasOntology(nonexId));
        // OntologyUtils.printOntology(space.getTopOntology(), System.err);
View Full Code Here


        assertTrue(space.hasOntology(baseIri));
        assertTrue(space.hasOntology(dropId));
        assertTrue(space.hasOntology(nonexId));
        space.removeOntology(dropId);
        assertFalse(space.hasOntology(dropId));
        space.removeOntology(nonexId);
        assertFalse(space.hasOntology(nonexId));
        // OntologyUtils.printOntology(space.getTopOntology(), System.err);

    }
View Full Code Here

        assertTrue(space.hasOntology(dropId));
        assertTrue(space.hasOntology(nonexId));

        IRI bogus = IRI.create("http://www.example.org/ontology/bogus");
        try {
            space.removeOntology(bogus);
            fail("Removing nonexisting ontology succeeded without an exception. This should not happen.");
        } catch (MissingOntologyException mex) {
            log.info("Expected exception caught when removing missing ontology {}", bogus);
        }
View Full Code Here

            fail("Removing nonexisting ontology succeeded without an exception. This should not happen.");
        } catch (MissingOntologyException mex) {
            log.info("Expected exception caught when removing missing ontology {}", bogus);
        }

        space.removeOntology(dropId);
        assertFalse(space.hasOntology(dropId));
        space.removeOntology(nonexId);
        assertFalse(space.hasOntology(nonexId));
        // OntologyUtils.printOntology(space.getTopOntology(), System.err);
View Full Code Here

            log.info("Expected exception caught when removing missing ontology {}", bogus);
        }

        space.removeOntology(dropId);
        assertFalse(space.hasOntology(dropId));
        space.removeOntology(nonexId);
        assertFalse(space.hasOntology(nonexId));
        // OntologyUtils.printOntology(space.getTopOntology(), System.err);

    }
View Full Code Here

            OWLOntologyID id = OntologyUtils.decode(ontologyId);
            OntologySpace cs = scope.getCustomSpace();
            if (!cs.hasOntology(id)) rb = Response.notModified(); // ontology not managed
            else try {
                onm.setScopeActive(scopeId, false);
                cs.removeOntology(id);
                rb = Response.ok();
            } catch (IrremovableOntologyException e) {
                throw new WebApplicationException(e, FORBIDDEN);
            } catch (UnmodifiableOntologyCollectorException e) {
                throw new WebApplicationException(e, FORBIDDEN);
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.