class OntologyManager |
|
The OntologyManager is the central ontology cache handler.
It is modeled as a singleton and its instance can be accessed
through OntologyManager.instance.
Deprecated Ontologies should be handled via the classes in Nepomuk.Types. |
|
|
Attempt to load the ontology referenced by uri.
If the manager already has the ontology in the cache
it is simply returned. Otherwise the manager tries
to load the ontology from one of the configured
OntologyLoader instances.
Returns The requested ontology or 0 in case it could not be found, i.e. none of the OntologyLoader instances could provide the RDF statements making up the ontology. |
|
|
Set an OntologyLoader to be used to retrieve
the RDF statements that make up an ontology.
By default Nepomuk uses a combination of the NepomukOntologyLoader and DesktopOntologyLoader where the NepomukOntologyLoader is the preferred one, i.e. only if it is not able to load the ontology DesktopOntologyLoader is used as a fallback. If an OntologyLoader is set no fallback loader will be used. Thus, to force one of the default loaders (for example the DesktopOntologyLoader) just do:
OntologyManager.instance()->setOntologyLoader( new DesktopOntologyLoader() ); OntologyManager will take over ownership of loader. Overwriting the loader will delete any loader previously set via setOntologyLoader. |