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

Examples of org.apache.stanbol.ontologymanager.ontonet.api.scope.OntologySpace.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


                } catch (Exception e) {
                    failed.add(url);
                }
                try {
                    // TODO replace with a Clerezza equivalent
                    ontologySpace.addOntology(new RootOntologyIRISource(physicalIRI, sharedManager));
                    success.add(url);
                } catch (OWLOntologyCreationException e) {
                    log.error("Failed to load ontology from physical location " + physicalIRI
                              + " Continuing with next...", e);
                    failed.add(url);
View Full Code Here

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

        OWLOntology original = src.getRootOntology();

        OntologySpace spc = new CustomOntologySpaceImpl("Test", scopeNs, ontologyProvider);
        spc.addOntology(src);

    }

}
View Full Code Here

        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

                if (cores.length > 0) {
                    OntologySpace corespc = sc.getCoreSpace();
                    corespc.tearDown();
                    for (int i = 0; i < cores.length; i++)
                        try {
                            corespc.addOntology(new RootOntologyIRISource(IRI.create(cores[i])));
                        } catch (Exception ex) {
                            log.warn("Failed to import ontology " + cores[i], ex);
                            continue;
                        }
                }
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.