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

Nepomuk

class.h

Go to the documentation of this file.
00001 /* This file is part of the Nepomuk-KDE libraries
00002    Copyright (c) 2007-2009 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_CLASS_H_
00021 #define _NEPOMUK_CLASS_H_
00022 
00023 #include <QtCore/QList>
00024 #include <QtCore/QUrl>
00025 #include <QtCore/QString>
00026 #include <QtCore/QSharedData>
00027 
00028 #include "entity.h"
00029 #include "nepomuk_export.h"
00030 
00031 
00032 namespace Nepomuk {
00033     namespace Types {
00034         class Property;
00035 
00049         class NEPOMUK_EXPORT Class : public Entity
00050         {
00051             friend class ClassPrivate;
00052 
00053         public:
00057             Class();
00058 
00068             Class( const QUrl& uri );
00069 
00073             Class( const Class& );
00074 
00078             ~Class();
00079 
00083             Class& operator=( const Class& );
00084 
00090             QList<Property> rangeOf();
00091 
00101             QList<Property> rangeOf() const;
00102 
00108             QList<Property> domainOf();
00109 
00119             QList<Property> domainOf() const;
00120 
00126             Property findPropertyByName( const QString& name );
00127 
00137             Property findPropertyByName( const QString& name ) const;
00138 
00146             Property findPropertyByLabel( const QString& label, const QString& language = QString() );
00147 
00159             Property findPropertyByLabel( const QString& label, const QString& language = QString() ) const;
00160 
00169             QList<Class> parentClasses();
00170 
00183             QList<Class> parentClasses() const;
00184 
00191             QList<Class> subClasses();
00192 
00203             QList<Class> subClasses() const;
00204 
00211             QList<Class> allParentClasses();
00212 
00223             QList<Class> allParentClasses() const;
00224 
00231             QList<Class> allSubClasses();
00232 
00243             QList<Class> allSubClasses() const;
00244 
00251             bool isParentOf( const Class& other );
00252 
00263             bool isParentOf( const Class& other ) const;
00264 
00271             bool isSubClassOf( const Class& other );
00272 
00283             bool isSubClassOf( const Class& other ) const;
00284         };
00285     }
00286 }
00287 
00288 
00289 #ifndef DISABLE_NEPOMUK_LEGACY
00290 
00291 namespace Nepomuk {
00292 
00293     class Ontology;
00294     class Property;
00295 
00301     class KDE_DEPRECATED NEPOMUK_EXPORT Class : public Entity
00302     {
00303     public:
00307     Class();
00308 
00312     Class( const Class& );
00313 
00317     ~Class();
00318 
00319     Class& operator=( const Class& );
00320 
00321     // an alternative would be: QList<Property> rangeOf() and QList<Property> domainOf()
00322     QList<const Property*> allProperties() const;
00323 
00329     const Property* findPropertyByName( const QString& name ) const;
00330 
00338     const Property* findPropertyByLabel( const QString& label, const QString& language = QString() ) const;
00339 
00345     const Property* findPropertyByUri( const QUrl& uri ) const;
00346 
00353     QList<const Class*> parentClasses() const;
00354 
00361     QList<const Class*> subClasses() const;
00362 
00369     bool isParentOf( const Class* other ) const;
00370 
00377     bool isSubClassOf( const Class* other ) const;
00378 
00389     static const Class* load( const QUrl& uri );
00390 
00391     private:
00392     class Private;
00393     QSharedDataPointer<Private> d;
00394 
00395     friend class OntologyManager;
00396     };
00397 }
00398 
00399 #endif
00400 #endif

Nepomuk

Skip menu "Nepomuk"
  • Main Page
  • Modules
  • 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
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
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