• 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
  • types
entity.h
Go to the documentation of this file.
1 /* This file is part of the Nepomuk-KDE libraries
2  Copyright (c) 2007-2010 Sebastian Trueg <trueg@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef _NEPOMUK_ENTITY_H_
21 #define _NEPOMUK_ENTITY_H_
22 
23 #include <QtCore/QUrl>
24 #include <QtCore/QString>
25 #include <QtCore/QSharedData>
26 #include <QtCore/QHash>
27 
28 #include <Soprano/Node>
29 
30 #include <kglobal.h>
31 #include <klocale.h>
32 
33 #include "nepomuk_export.h"
34 
35 class QIcon;
36 
37 
38 namespace Nepomuk {
39  namespace Types {
40  class EntityPrivate;
41 
54  class NEPOMUK_EXPORT Entity
55  {
56  public:
60  Entity( const Entity& );
61 
65  virtual ~Entity();
66 
70  Entity& operator=( const Entity& );
71 
76  QString name() const;
77 
81  QUrl uri() const;
82 
94  QString label( const QString& language = KGlobal::locale()->language() );
95 
111  QString label( const QString& language = KGlobal::locale()->language() ) const;
112 
124  QString comment( const QString& language = KGlobal::locale()->language() );
125 
141  QString comment( const QString& language = KGlobal::locale()->language() ) const;
142 
150  QIcon icon();
151 
161  QIcon icon() const;
162 
170  bool isValid() const;
171 
176  bool isAvailable();
177 
186  bool isAvailable() const;
187 
201  void reset( bool recursive = false );
202 
211  bool userVisible() const;
212 
216  operator QUrl() const { return uri(); }
217 
222  bool operator==( const Entity& other ) const;
223 
229  bool operator==( const QUrl& other ) const;
230 
235  bool operator!=( const Entity& other ) const;
236 
242  bool operator!=( const QUrl& other ) const;
243 
244  protected:
248  Entity();
249 
250  QExplicitlySharedDataPointer<EntityPrivate> d;
251  };
252 
253  inline uint qHash( const Entity& c )
254  {
255  return qHash( c.uri() );
256  }
257  }
258 }
259 
260 #ifndef DISABLE_NEPOMUK_LEGACY
261 
262 namespace Nepomuk {
263 
264  class Ontology;
265 
269  class KDE_DEPRECATED NEPOMUK_EXPORT Entity
270  {
271  public:
272  Entity( const Entity& );
273  ~Entity();
274 
275  Entity& operator=( const Entity& );
276 
280  const Ontology* definingOntology() const;
281 
286  QString name() const;
287 
291  QUrl uri() const;
292 
293  QString label( const QString& language = QString() ) const;
294  QString comment( const QString& language = QString() ) const;
295 
296  protected:
297  Entity();
298 
299  private:
300  class Private;
301  QSharedDataPointer<Private> d;
302 
303  friend class OntologyManager;
304  };
305 }
306 
307 #endif // DISABLE_NEPOMUK_LEGACY
308 
309 #endif // _NEPOMUK_ENTITY_H_
Nepomuk::Types::qHash
uint qHash(const Entity &c)
Definition: entity.h:253
Nepomuk::Types::Entity
Abstract base class for Class and Property;.
Definition: entity.h:54
Nepomuk::Types::Entity::uri
QUrl uri() const
The URI of the resource.
Nepomuk::Ontology
Ontology represents one ontology specified using NRL.
Definition: ontology.h:135
Nepomuk::Entity
Definition: entity.h:269
Nepomuk::OntologyManager
The OntologyManager is the central ontology cache handler.
Definition: ontologymanager.h:44
Nepomuk::Types::Entity::d
QExplicitlySharedDataPointer< EntityPrivate > d
Definition: entity.h:250
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