Examples of listManagedOntologies()


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

             * The session needs to be destroyed anyhow.
             *
             * Clear contents before destroying (FIXME only do this until this is implemented in the
             * destroySession() method).
             */
            for (IRI iri : session.listManagedOntologies()) {
                try {
                    String key = ontologyProvider.getKey(iri);
                    ontologyProvider.getStore().deleteTripleCollection(new UriRef(key));
                } catch (Exception ex) {
                    log.error("Failed to delete triple collection " + iri, ex);
View Full Code Here

Examples of org.apache.stanbol.ontologymanager.servicesapi.collector.OntologyCollector.listManagedOntologies()

            "{} only implements weak equality, i.e. managed ontologies are only checked by public key, not by content.",
            getClass());
        OntologyCollector coll = (OntologyCollector) arg0;
        return this.getID().equals(coll.getID())
               && this.getDefaultNamespace().equals(coll.getDefaultNamespace())
               && this.listManagedOntologies().equals(coll.listManagedOntologies())
               && this.getSupportedOntologyTypes().equals(coll.getSupportedOntologyTypes());
    }

    @Override
    public <O> O export(Class<O> returnType, boolean merge) {
View Full Code Here

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

                // The root ontology ID is in the form [namespace][scopeId]
                ont = mgr.createOntology(IRI.create(universalPrefix + getID()));
                List<OWLOntologyChange> additions = new LinkedList<OWLOntologyChange>();
                // Add the import statement for the custom space, if existing and not empty
                OntologySpace spc = getCustomSpace();
                if (spc != null && spc.listManagedOntologies().size() > 0) {
                    IRI spaceIri = IRI.create(universalPrefix + spc.getID());
                    additions.add(new AddImport(ont, df.getOWLImportsDeclaration(spaceIri)));
                }
                // Add the import statement for the core space, if existing and not empty
                spc = getCoreSpace();
View Full Code Here

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

                    IRI spaceIri = IRI.create(universalPrefix + spc.getID());
                    additions.add(new AddImport(ont, df.getOWLImportsDeclaration(spaceIri)));
                }
                // Add the import statement for the core space, if existing and not empty
                spc = getCoreSpace();
                if (spc != null && spc.listManagedOntologies().size() > 0) {
                    IRI spaceIri = IRI.create(universalPrefix + spc.getID());
                    additions.add(new AddImport(ont, df.getOWLImportsDeclaration(spaceIri)));
                }
                mgr.applyChanges(additions);
            }
View Full Code Here

Examples of org.apache.stanbol.ontologymanager.servicesapi.session.Session.listManagedOntologies()

        // ... and versioned ontologies too.
        session.addOntology(new GraphContentInputSource(getClass().getResourceAsStream(
            "/ontologies/versiontest_v1.owl")));
        session.addOntology(new GraphContentInputSource(getClass().getResourceAsStream(
            "/ontologies/versiontest_v2.owl")));
        Collection<OWLOntologyID> managed = session.listManagedOntologies();
        assertEquals(4, managed.size());

        // Simulate Stanbol going down.
        log.info("Stanbol going down...");
        resetOntologyProvider(); // but keep the TcProvider
View Full Code Here

Examples of org.apache.stanbol.ontologymanager.servicesapi.session.Session.listManagedOntologies()

        resetOntologyProvider(); // but keep the TcProvider
        resetManagers();

        Session ses = sessionManager.getSession(id);
        assertNotNull(ses);
        assertEquals(managed, ses.listManagedOntologies());
        assertEquals(session, ses); // XXX Remember that only weak equality is implemented.
    }

    /*
     * With this method, the ontology provider and all its internal indices are cleared. However, the Clerezza
View Full Code Here

Examples of org.apache.stanbol.ontologymanager.servicesapi.session.Session.listManagedOntologies()

             * The session needs to be destroyed anyhow.
             *
             * Clear contents before destroying (FIXME only do this until this is implemented in the
             * destroySession() method).
             */
            for (OWLOntologyID id : session.listManagedOntologies()) {
                try {
                    String key = ontologyProvider.getKey(id.getOntologyIRI());
                    ontologyProvider.getStore().deleteTripleCollection(new UriRef(key));
                } catch (Exception ex) {
                    log.error("Failed to delete triple collection " + id, ex);
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.