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

Nepomuk

entity.h

Go to the documentation of this file.
00001 /* This file is part of the Nepomuk-KDE libraries
00002    Copyright (c) 2007 Sebastian Trueg <trueg@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017    Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef _NEPOMUK_ENTITY_H_
00021 #define _NEPOMUK_ENTITY_H_
00022 
00023 #include <QtCore/QUrl>
00024 #include <QtCore/QString>
00025 #include <QtCore/QSharedData>
00026 #include <QtCore/QHash>
00027 
00028 #include <Soprano/Node>
00029 
00030 #include <kglobal.h>
00031 #include <klocale.h>
00032 
00033 #include "nepomuk_export.h"
00034 
00035 class QIcon;
00036 
00037 
00038 namespace Nepomuk {
00039     namespace Types {
00040         class EntityPrivate;
00041 
00052         class NEPOMUK_EXPORT Entity
00053         {
00054         public:
00058             Entity( const Entity& );
00059 
00063             virtual ~Entity();
00064 
00068             Entity& operator=( const Entity& );
00069 
00074             QString name() const;
00075 
00079             QUrl uri() const;
00080 
00091             QString label( const QString& language = KGlobal::locale()->language() );
00092 
00103             QString comment( const QString& language = KGlobal::locale()->language() );
00104 
00112             QIcon icon();
00113 
00121             bool isValid() const;
00122 
00127             bool isAvailable();
00128 
00142             void reset( bool recursive = false );
00143 
00147             operator QUrl() const { return uri(); }
00148 
00152             bool operator==( const Entity& other ) const;
00153 
00157             bool operator!=( const Entity& other ) const;
00158 
00159         protected:
00163             Entity();
00164 
00165             QExplicitlySharedDataPointer<EntityPrivate> d;
00166         };
00167 
00168         inline uint qHash( const Entity& c )
00169         {
00170             return qHash( c.uri().toString() );
00171         }
00172     }
00173 }
00174 
00175 
00176 namespace Nepomuk {
00177 
00178     class Ontology;
00179 
00183     class KDE_DEPRECATED NEPOMUK_EXPORT Entity
00184     {
00185     public:
00186         Entity( const Entity& );
00187         ~Entity();
00188 
00189         Entity& operator=( const Entity& );
00190 
00194         const Ontology* definingOntology() const;
00195 
00200         QString name() const;
00201 
00205         QUrl uri() const;
00206         
00207         QString label( const QString& language = QString() ) const;
00208         QString comment( const QString& language = QString() ) const;
00209 
00210     protected:
00211         Entity();
00212 
00213     private:
00214         class Private;
00215         QSharedDataPointer<Private> d;
00216 
00217         friend class OntologyManager;
00218     };
00219 }
00220 
00221 #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
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
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