Class OntologyCacheOwlApi
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_owlapi.OntologyCacheOwlApi
Cache for ontologies for the OWL Api.
-
Field Summary
Modifier and TypeFieldDescriptionprivate static boolean
This flag indicates whether the cache is to be used (i.e., ontologies are held in memory).private static final org.slf4j.Logger
The internal cache for ontologies that is dependent on the OntModelSpec. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static org.semanticweb.owlapi.model.OWLOntologyManager
static void
Empties the cache.static org.semanticweb.owlapi.model.OWLOntology
static org.semanticweb.owlapi.model.OWLOntology
static org.semanticweb.owlapi.model.OWLOntology
Returns the OntModel for the given uri using a cache if indicated to do so.static org.semanticweb.owlapi.model.OWLOntology
static org.semanticweb.owlapi.model.OWLOntology
boolean
private static org.semanticweb.owlapi.model.OWLOntology
readOWLOntology
(String uri) void
setDeactivatedCache
(boolean deactivatedCache) Deactivating the cache will also clear the cache.
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
ontologyCache
The internal cache for ontologies that is dependent on the OntModelSpec. -
isDeactivatedCache
private static boolean isDeactivatedCacheThis flag indicates whether the cache is to be used (i.e., ontologies are held in memory).
-
-
Constructor Details
-
OntologyCacheOwlApi
public OntologyCacheOwlApi()
-
-
Method Details
-
get
Returns the OntModel for the given uri using a cache if indicated to do so.- Parameters:
uri
- The URI of the ontology that shall be cached.useCache
- Indicates whether the cache shall be used. If set to false, ontologies will not be held in memory but re-read every time time.- Returns:
- OntModel reference.
-
readOWLOntology
-
createManager
private static org.semanticweb.owlapi.model.OWLOntologyManager createManager() -
get
-
get
-
get
-
get
-
isDeactivatedCache
public boolean isDeactivatedCache() -
emptyCache
public static void emptyCache()Empties the cache. -
setDeactivatedCache
public void setDeactivatedCache(boolean deactivatedCache) Deactivating the cache will also clear the cache. If an ontology is requested twice it is ready every time from disk.- Parameters:
deactivatedCache
- true if cache is to be deactivated, else false.
-