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

Nepomuk

resourcemanager.h

Go to the documentation of this file.
00001 /* 
00002  * This file is part of the Nepomuk KDE project.
00003  * Copyright (C) 2006-2009 Sebastian Trueg <trueg@kde.org>
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  * 
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU Library General Public License
00016  * along with this library; see the file COPYING.LIB.  If not, write to
00017  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019  */
00020 
00021 #ifndef _NEPOMUK_RESOURCE_MANAGER_H_
00022 #define _NEPOMUK_RESOURCE_MANAGER_H_
00023 
00024 #include "nepomuk_export.h"
00025 
00026 #include <QtCore/QObject>
00027 #include <QtCore/QUrl>
00028 
00029 
00030 namespace Soprano {
00031     class Model;
00032 }
00033 
00034 namespace Nepomuk {
00035     namespace Middleware {
00036     class Registry;
00037     }
00038 
00039     class Resource;
00040     class Variant;
00041     class ResourceManagerHelper;
00042     class ResourceManagerPrivate;
00043 
00051     class NEPOMUK_EXPORT ResourceManager : public QObject
00052     {
00053         Q_OBJECT
00054 
00055     public:
00056         static ResourceManager* instance();
00057 
00067         void deleteInstance();
00068 
00080         int init();
00081 
00086         bool initialized() const;
00087 
00091         Soprano::Model* mainModel();
00092 
00101         void setOverrideMainModel( Soprano::Model* model );
00102 
00113         KDE_DEPRECATED Resource createResourceFromUri( const QString& uri );
00114 
00121         void removeResource( const QString& uri );
00122 
00128         QList<Resource> allResources();
00129 
00136         QList<Resource> allResourcesOfType( const QUrl& type );
00137 
00141         KDE_DEPRECATED QList<Resource> allResourcesOfType( const QString& type );
00142 
00154         QList<Resource> allResourcesWithProperty( const QUrl& uri, const Variant& v );
00155 
00159         KDE_DEPRECATED QList<Resource> allResourcesWithProperty( const QString& uri, const Variant& v );
00160 
00167         KDE_DEPRECATED QString generateUniqueUri();
00168 
00179         QUrl generateUniqueUri( const QString& label );
00180 
00184         void notifyError( const QString& uri, int errorCode );
00185 
00196         static ResourceManager* createManagerForModel( Soprano::Model* model );
00197 
00198     Q_SIGNALS:
00208         void resourceModified( const QString& uri );
00209 
00217         void error( const QString& uri, int errorCode );
00218 
00219     private Q_SLOTS:
00220         void slotStoreChanged();
00221 
00222     private:
00223         friend class Nepomuk::ResourceManagerHelper;
00224         friend class Nepomuk::Resource;
00225         ResourceManager();
00226         ~ResourceManager();
00227 
00228         ResourceManagerPrivate* const d;
00229     };
00230 }
00231 
00232 #endif

Nepomuk

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal