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

Nepomuk

  • sources
  • kde-4.12
  • kdelibs
  • nepomuk
  • core
resourcemanager.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Nepomuk KDE project.
3  * Copyright (C) 2006-2009 Sebastian Trueg <trueg@kde.org>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef _NEPOMUK_RESOURCE_MANAGER_H_
22 #define _NEPOMUK_RESOURCE_MANAGER_H_
23 
24 #include "nepomuk_export.h"
25 
26 #include <QtCore/QObject>
27 #include <QtCore/QUrl>
28 
29 
30 namespace Soprano {
31  class Model;
32 }
33 
34 namespace Nepomuk {
35  class Resource;
36  class Variant;
37  class ResourceManagerHelper;
38  class ResourceManagerPrivate;
39  namespace Types {
40  class Class;
41  class Property;
42  }
43 
55  class NEPOMUK_EXPORT ResourceManager : public QObject
56  {
57  Q_OBJECT
58 
59  public:
60  static ResourceManager* instance();
61 
71  void deleteInstance();
72 
84  int init();
85 
90  bool initialized() const;
91 
95  Soprano::Model* mainModel();
96 
105  void setOverrideMainModel( Soprano::Model* model );
106 
117 #ifndef KDE_NO_DEPRECATED
118  KDE_DEPRECATED Resource createResourceFromUri( const QString& uri );
119 #endif
120 
127  void removeResource( const QString& uri );
128 
138  QList<Resource> allResources();
139 
150  QList<Resource> allResourcesOfType( const QUrl& type );
151 
155 #ifndef KDE_NO_DEPRECATED
156  KDE_DEPRECATED QList<Resource> allResourcesOfType( const QString& type );
157 #endif
158 
174  QList<Resource> allResourcesWithProperty( const QUrl& uri, const Variant& v );
175 
179 #ifndef KDE_NO_DEPRECATED
180  KDE_DEPRECATED QList<Resource> allResourcesWithProperty( const QString& uri, const Variant& v );
181 #endif
182 
189  void clearCache();
190 
197 #ifndef KDE_NO_DEPRECATED
198  KDE_DEPRECATED QString generateUniqueUri();
199 #endif
200 
211  QUrl generateUniqueUri( const QString& label );
212 
216  void notifyError( const QString& uri, int errorCode );
217 
228  static ResourceManager* createManagerForModel( Soprano::Model* model );
229 
230  Q_SIGNALS:
240  void resourceModified( const QString& uri );
241 
249  void error( const QString& uri, int errorCode );
250 
260  void nepomukSystemStarted();
261 
267  void nepomukSystemStopped();
268 
269  private Q_SLOTS:
270  void slotPropertyAdded(const Nepomuk::Resource &res, const Nepomuk::Types::Property &prop, const QVariant &value);
271  void slotPropertyRemoved(const Nepomuk::Resource &res, const Nepomuk::Types::Property &prop, const QVariant &value);
272 
273  private:
274  friend class Nepomuk::Resource;
275  friend class Nepomuk::ResourceManagerPrivate;
276 
277  ResourceManager();
278  ~ResourceManager();
279 
280  static ResourceManager* s_instance;
281 
282  ResourceManagerPrivate* const d;
283 
284  Q_PRIVATE_SLOT( d, void _k_storageServiceInitialized(bool) )
285  Q_PRIVATE_SLOT( d, void _k_dbusServiceUnregistered(QString) )
286  };
287 }
288 
289 #endif
Nepomuk::Resource
Resource is the central object type in Nepomuk.
Definition: resource.h:94
Nepomuk::ResourceManager
The ResourceManager is the central Nepomuk configuration point.
Definition: resourcemanager.h:55
QObject
Nepomuk::Types::Property
A property is a resource of type rdf:Property which relates a domain with a range.
Definition: property.h:52
Nepomuk::Variant
The Nepomuk Variant extends over QVariant by introducing direct support for Resource embedding...
Definition: variant.h:65
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