Package org.apache.stanbol.ontologymanager.registry.api.model

Examples of org.apache.stanbol.ontologymanager.registry.api.model.Library


        assertFalse(registries.isEmpty());
        assertEquals(1, registries.size());

        Registry reg = registries.iterator().next();
        assertTrue(reg.hasChildren());
        Library lib = null;
        // Look for test #Library2
        for (RegistryItem item : reg.getChildren()) {
            if (Locations.LIBRARY_TEST2.equals(item.getIRI())) {
                lib = (Library) item;
                break;
View Full Code Here


        // The ontology that imports the whole network is created in-memory, therefore it has no physical IRI
        // unless it is borrowed from the supplied parent.
        bindPhysicalIri(parentSrc != null ? parentSrc.getPhysicalIRI() : null);

        Library lib = registryManager.getLibrary(libraryID);
        log.debug("Got library {}, expected {}", lib, libraryID);
        // If the manager is set to
        if (lib != null) {
            Set<OWLOntology> subtrees = lib.getOntologies(OWLOntology.class);
            this.ontologies = subtrees;

            for (OWLOntology o : subtrees)
                log.debug("\tGot ontology {}", o);
View Full Code Here

            if (item instanceof Library && !((Library) item).isLoaded()) {
                // TODO: implement ontology request targets.
                if (CachingPolicy.CENTRALISED.equals(getCachingPolicy()) && this.cache != null) {
                    ((Library) item).loadOntologies(this.cache);
                } else if (CachingPolicy.DISTRIBUTED.equals(getCachingPolicy())) {
                    Library lib = (Library) item;
                    lib.loadOntologies(lib.getCache());
                } else {
                    log.error("Tried to load ontology resource {} using a null cache.", item);
                }
            }
        }
View Full Code Here

        if (CachingPolicy.CENTRALISED.equals(getCachingPolicy()) && this.cache != null) {
            if (requestTarget instanceof Library && !((Library) requestTarget).isLoaded()) ((Library) requestTarget)
                    .loadOntologies(this.cache);
        } else if (CachingPolicy.DISTRIBUTED.equals(getCachingPolicy())) {
            if (requestTarget instanceof Library && !((Library) requestTarget).isLoaded()) {
                Library lib = (Library) requestTarget;
                lib.loadOntologies(lib.getCache());
            }
        } else {
            log.error("Tried to load ontology resource {} using a null cache.", requestTarget);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.stanbol.ontologymanager.registry.api.model.Library

Copyright © 2018 www.massapicom. 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.