Package org.apache.stanbol.ontologymanager.ontonet.api.scope

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


        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

    @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

        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

        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

    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

        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

    @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

        CustomOntologySpace space = null;
        space = factory.createCustomOntologySpace(scopeId, dropSrc);
        IRI dropId = dropSrc.getRootOntology().getOntologyID().getOntologyIRI();
        IRI nonexId = nonexSrc.getRootOntology().getOntologyID().getOntologyIRI();

        space.addOntology(inMemorySrc);
        space.addOntology(nonexSrc);
        // The other remote ontologies may change base IRI...
        assertTrue(space.hasOntology(ont.getOntologyID().getOntologyIRI()) && space.hasOntology(dropId)
                   && space.hasOntology(nonexId));
        space.removeOntology(dropId);
View Full Code Here

        space = factory.createCustomOntologySpace(scopeId, dropSrc);
        IRI dropId = dropSrc.getRootOntology().getOntologyID().getOntologyIRI();
        IRI nonexId = nonexSrc.getRootOntology().getOntologyID().getOntologyIRI();

        space.addOntology(inMemorySrc);
        space.addOntology(nonexSrc);
        // The other remote ontologies may change base IRI...
        assertTrue(space.hasOntology(ont.getOntologyID().getOntologyIRI()) && space.hasOntology(dropId)
                   && space.hasOntology(nonexId));
        space.removeOntology(dropId);
        assertFalse(space.hasOntology(dropId));
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.