Examples of addOntology()


Examples of org.apache.stanbol.ontologymanager.ontonet.api.scope.SessionOntologySpace.addOntology()

        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));
View Full Code Here

Examples of org.apache.stanbol.ontologymanager.ontonet.api.scope.SessionOntologySpace.addOntology()

    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.
View Full Code Here

Examples of org.apache.stanbol.ontologymanager.ontonet.api.scope.SessionOntologySpace.addOntology()

        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));
View Full Code Here

Examples of org.apache.stanbol.ontologymanager.ontonet.api.session.Session.addOntology()

             *
             * There is no chance that (2) could be null, as it was previously controlled by the JobManager
             * through the canEnhance() method and the computeEnhancement is always called iff the former
             * returns true.
             */
            session.addOntology(new GraphSource(signaturesGraph));
            session.addOntology(new GraphSource(metadataGraph));
        } catch (UnmodifiableOntologyCollectorException e1) {
            throw new EngineException("Cannot add enhancement graph to OntoNet session for refactoring", e1);
        }

View Full Code Here

Examples of org.apache.stanbol.ontologymanager.ontonet.api.session.Session.addOntology()

             * There is no chance that (2) could be null, as it was previously controlled by the JobManager
             * through the canEnhance() method and the computeEnhancement is always called iff the former
             * returns true.
             */
            session.addOntology(new GraphSource(signaturesGraph));
            session.addOntology(new GraphSource(metadataGraph));
        } catch (UnmodifiableOntologyCollectorException e1) {
            throw new EngineException("Cannot add enhancement graph to OntoNet session for refactoring", e1);
        }

        try {
View Full Code Here

Examples of org.apache.stanbol.ontologymanager.ontonet.impl.clerezza.CoreOntologySpaceImpl.addOntology()

        for (UriRef name : tcManager.listTripleCollections())
            log.info("-- {} (a {})", name, tcManager.getTriples(name).getClass().getSimpleName());
        assertEquals(1, tcManager.listTripleCollections().size());
        OntologySpace spc = new CoreOntologySpaceImpl(TestClerezzaInputSources.class.getSimpleName(),
                IRI.create("http://stanbol.apache.org/ontologies/"), provider);
        spc.addOntology(src);
        log.info("After addition to space, TcManager has {} graphs. ", tcManager.listTripleCollections()
                .size());

        for (UriRef name : tcManager.listTripleCollections())
            log.info("-- {} (a {})", name, tcManager.getTriples(name).getClass().getSimpleName());
View Full Code Here

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

        if (rootSrc instanceof OntologySpaceSource) {
            OntologySpace spc = ((OntologySpaceSource) rootSrc).asOntologySpace();
            for (OWLOntology o : subtrees)
                try {
                    spc.addOntology(new RootOntologySource(o));
                } catch (UnmodifiableOntologyCollectorException e) {
                    logger.error("Cannot add ontology {} to unmodifiable space {}", o, spc);
                    continue;
                }
        }
View Full Code Here

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

        OWLOntologyID logicalId = OWLUtils.extractOntologyID(nonexSrc.getRootOntology());
        assertNotNull(logicalId);

        space = factory.createCustomOntologySpace(scopeId, dropSrc, minorSrc);
        space.addOntology(minorSrc);
        space.addOntology(nonexSrc);
        assertTrue(space.hasOntology(logicalId));

        logicalId = OWLUtils.extractOntologyID(dropSrc.getRootOntology());
        assertNotNull(logicalId);
View Full Code Here

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

        OWLOntologyID logicalId = OWLUtils.extractOntologyID(nonexSrc.getRootOntology());
        assertNotNull(logicalId);

        space = factory.createCustomOntologySpace(scopeId, dropSrc, minorSrc);
        space.addOntology(minorSrc);
        space.addOntology(nonexSrc);
        assertTrue(space.hasOntology(logicalId));

        logicalId = OWLUtils.extractOntologyID(dropSrc.getRootOntology());
        assertNotNull(logicalId);
        assertTrue(space.hasOntology(logicalId));
View Full Code Here

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

    @Test
    public void testCoreLock() throws Exception {
        OntologySpace space = factory.createCoreOntologySpace(scopeId, inMemorySrc);
        space.setUp();
        try {
            space.addOntology(minorSrc);
            fail("Modification was permitted on locked ontology space.");
        } catch (UnmodifiableOntologyCollectorException e) {
            assertSame(space, e.getOntologyCollector());
        }
    }
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.