• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Nepomuk

  • Nepomuk
  • OntologyManager
Public Member Functions | Static Public Member Functions | List of all members
Nepomuk::OntologyManager Class Reference

#include <ontologymanager.h>

Public Member Functions

 ~OntologyManager ()
 
const Ontology * getOntology (const QUrl &uri)
 
void setOntologyLoader (OntologyLoader *loader)
 

Static Public Member Functions

static OntologyManager * instance ()
 

Detailed Description

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.

Definition at line 44 of file ontologymanager.h.

Constructor & Destructor Documentation

Nepomuk::OntologyManager::~OntologyManager ( )

Member Function Documentation

const Ontology* Nepomuk::OntologyManager::getOntology ( const QUrl &  uri)

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.
static OntologyManager* Nepomuk::OntologyManager::instance ( )
static
void Nepomuk::OntologyManager::setOntologyLoader ( OntologyLoader *  loader)

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.


The documentation for this class was generated from the following file:
  • ontologymanager.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Nepomuk

Skip menu "Nepomuk"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal