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

Nepomuk-Core

  • Nepomuk2
  • ResourceManager
Signals | Public Member Functions | Static Public Member Functions | List of all members
Nepomuk2::ResourceManager Class Reference

#include <Nepomuk2/ResourceManager>

Inheritance diagram for Nepomuk2::ResourceManager:
Inheritance graph
[legend]

Signals

void error (const QString &uri, int errorCode)
 
void nepomukSystemStarted ()
 
void nepomukSystemStopped ()
 
void resourceModified (const QString &uri)
 

Public Member Functions

QUrl generateUniqueUri (const QString &label)
 
int init ()
 
bool initialized () const
 
Soprano::Model * mainModel ()
 
void notifyError (const QString &uri, int errorCode)
 
void removeResource (const QString &uri)
 
void setOverrideMainModel (Soprano::Model *model)
 

Static Public Member Functions

static ResourceManager * instance ()
 

Detailed Description

The ResourceManager is the central Nepomuk configuration point.

Use the initialized() method to check the availabity of the Nepomuk system. Signals nepomukSystemStarted() and nepomukSystemStopped() can be used to enable or disable Nepomuk-specific GUI elements.

Author
Sebastian Trueg trueg.nosp@m.@kde.nosp@m..org

Definition at line 55 of file resourcemanager.h.

Member Function Documentation

void Nepomuk2::ResourceManager::error ( const QString &  uri,
int  errorCode 
)
signal

Whenever a problem occurs (like for example failed resource syncing) this signal is emitted.

Parameters
uriThe resource related to the error.
errorCodeThe type of the error (Resource::ErrorCode)
QUrl Nepomuk2::ResourceManager::generateUniqueUri ( const QString &  label)

Generates a unique URI that is not used in the store yet.

This method can be used to generate URIs for virtual types such as Tag.

Parameters
labelA label that the algorithm should use to try to create a more readable URI.
Returns
A new unique URI which can be used to define a new resource.
Since
4.2

Definition at line 329 of file resourcemanager.cpp.

int Nepomuk2::ResourceManager::init ( )

Initialize the Nepomuk framework.

This method will initialize the communication with the local Nepomuk-KDE services, ie. the data repository. It will trigger a reconnect to the Nepomuk database.

There is normally no reason to call this method manually except when using multiple threads. In that case it is highly recommended to call this method in the main thread before doing anything else.

Returns
0 if all necessary components could be found and -1 otherwise.

Definition at line 288 of file resourcemanager.cpp.

bool Nepomuk2::ResourceManager::initialized ( ) const
Returns
true if init() has been called successfully, ie. the KMetaData system is connected to the local RDF repository service and ready to work.

Definition at line 306 of file resourcemanager.cpp.

Nepomuk2::ResourceManager * Nepomuk2::ResourceManager::instance ( )
static

Definition at line 270 of file resourcemanager.cpp.

Soprano::Model * Nepomuk2::ResourceManager::mainModel ( )

Retrieve the main data storage model.

Definition at line 363 of file resourcemanager.cpp.

void Nepomuk2::ResourceManager::nepomukSystemStarted ( )
signal

Emitted once the Nepomuk system is up and can be used.

Warning
This signal will not be emitted if the Nepomuk system is running when the ResourceManager is created. Use initialized() to check the status.
Since
4.4
void Nepomuk2::ResourceManager::nepomukSystemStopped ( )
signal

Emitted once the Nepomuk system goes down.

Since
4.4
void Nepomuk2::ResourceManager::notifyError ( const QString &  uri,
int  errorCode 
)

Non-public API. Used by Resource to signalize errors.

Definition at line 322 of file resourcemanager.cpp.

void Nepomuk2::ResourceManager::removeResource ( const QString &  uri)

Remove the resource denoted by uri completely.

This method is just a wrapper around Resource::remove. The result is the same.

Definition at line 316 of file resourcemanager.cpp.

void Nepomuk2::ResourceManager::resourceModified ( const QString &  uri)
signal

This signal gets emitted whenever a Resource changes due to a sync procedure.

Be aware that modifying resources locally via the Resource::setProperty method does not result in a resourceModified signal being emitted.

Parameters
uriThe URI of the modified resource.

NOT IMPLEMENTED YET

void Nepomuk2::ResourceManager::setOverrideMainModel ( Soprano::Model *  model)

Override the main model used for all storage.

By default the main model used is the Nepomuk server main model.

Parameters
modelThe model to use instead of the Nepomuk server or 0 to reset.
Since
4.1

Definition at line 409 of file resourcemanager.cpp.


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

KDE's Doxygen guidelines are available online.

Nepomuk-Core

Skip menu "Nepomuk-Core"
  • 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