Examples of addOntology()


Examples of org.apache.stanbol.ontologymanager.multiplexer.clerezza.impl.CustomSpaceImpl.addOntology()

        // OntologyInputSource<OWLOntology> src = new OntologyContentInputSource(content,mgr);

        OWLOntology original = src.getRootOntology();
        Assert.assertNotNull(original);
        OntologySpace spc = new CustomSpaceImpl("Test", scopeNs, ontologyProvider);
        spc.addOntology(src);

    }

}
View Full Code Here

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

    @Test
    public void testCoreLock() throws Exception {
        CoreOntologySpace 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

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

    @Test
    public void testCoreLock() throws Exception {
        CoreOntologySpace 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

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

        CustomOntologySpace space = null;
        IRI logicalId = IRI.create(OWLUtils.guessOntologyIdentifier(nonexSrc.getRootOntology())
                .getUnicodeString());

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

        assertTrue(space.hasOntology(logicalId));
        logicalId = IRI
                .create(OWLUtils.guessOntologyIdentifier(dropSrc.getRootOntology()).getUnicodeString());
View Full Code Here

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

        IRI logicalId = IRI.create(OWLUtils.guessOntologyIdentifier(nonexSrc.getRootOntology())
                .getUnicodeString());

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

        assertTrue(space.hasOntology(logicalId));
        logicalId = IRI
                .create(OWLUtils.guessOntologyIdentifier(dropSrc.getRootOntology()).getUnicodeString());
        assertTrue(space.hasOntology(logicalId));
View Full Code Here

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

    @Test
    public void testCustomLock() throws Exception {
        CustomOntologySpace space = factory.createCustomOntologySpace(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

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

        CustomOntologySpace space = null;
        space = factory.createCustomOntologySpace(scopeId, dropSrc);
        IRI dropId = URIUtils.createIRI(OWLUtils.guessOntologyIdentifier(dropSrc.getRootOntology()));
        IRI nonexId = URIUtils.createIRI(OWLUtils.guessOntologyIdentifier(nonexSrc.getRootOntology()));

        space.addOntology(inMemorySrc);
        space.addOntology(nonexSrc);
        // The other remote ontologies may change base IRI...
        // baseIri is maincharacters
        assertTrue(space.hasOntology(baseIri));
        assertTrue(space.hasOntology(dropId));
View Full Code Here

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

        space = factory.createCustomOntologySpace(scopeId, dropSrc);
        IRI dropId = URIUtils.createIRI(OWLUtils.guessOntologyIdentifier(dropSrc.getRootOntology()));
        IRI nonexId = URIUtils.createIRI(OWLUtils.guessOntologyIdentifier(nonexSrc.getRootOntology()));

        space.addOntology(inMemorySrc);
        space.addOntology(nonexSrc);
        // The other remote ontologies may change base IRI...
        // baseIri is maincharacters
        assertTrue(space.hasOntology(baseIri));
        assertTrue(space.hasOntology(dropId));
        assertTrue(space.hasOntology(nonexId));
View Full Code Here

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

    public void testAddOntology() throws Exception {
        CustomOntologySpace space = null;
        IRI logicalId = nonexSrc.getRootOntology().getOntologyID().getOntologyIRI();

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

        assertTrue(space.hasOntology(logicalId));
        logicalId = dropSrc.getRootOntology().getOntologyID().getOntologyIRI();
        assertTrue(space.hasOntology(logicalId));
View Full Code Here

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

        CustomOntologySpace space = null;
        IRI logicalId = nonexSrc.getRootOntology().getOntologyID().getOntologyIRI();

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

        assertTrue(space.hasOntology(logicalId));
        logicalId = dropSrc.getRootOntology().getOntologyID().getOntologyIRI();
        assertTrue(space.hasOntology(logicalId));
    }
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.