• 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
class.h
Go to the documentation of this file.
1 /* This file is part of the Nepomuk-KDE libraries
2  Copyright (c) 2007-2009 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_CLASS_H_
21 #define _NEPOMUK_CLASS_H_
22 
23 #include <QtCore/QList>
24 #include <QtCore/QUrl>
25 #include <QtCore/QString>
26 #include <QtCore/QSharedData>
27 
28 #include "entity.h"
29 #include "nepomuk_export.h"
30 
31 
32 namespace Nepomuk {
33  namespace Types {
34  class Property;
35 
49  class NEPOMUK_EXPORT Class : public Entity
50  {
51  friend class ClassPrivate;
52 
53  public:
57  Class();
58 
68  Class( const QUrl& uri );
69 
73  Class( const Class& );
74 
78  ~Class();
79 
83  Class& operator=( const Class& );
84 
90  QList<Property> rangeOf();
91 
101  QList<Property> rangeOf() const;
102 
108  QList<Property> domainOf();
109 
119  QList<Property> domainOf() const;
120 
126  Property findPropertyByName( const QString& name );
127 
137  Property findPropertyByName( const QString& name ) const;
138 
146  Property findPropertyByLabel( const QString& label, const QString& language = QString() );
147 
159  Property findPropertyByLabel( const QString& label, const QString& language = QString() ) const;
160 
169  QList<Class> parentClasses();
170 
183  QList<Class> parentClasses() const;
184 
191  QList<Class> subClasses();
192 
203  QList<Class> subClasses() const;
204 
211  QList<Class> allParentClasses();
212 
223  QList<Class> allParentClasses() const;
224 
231  QList<Class> allSubClasses();
232 
243  QList<Class> allSubClasses() const;
244 
251  bool isParentOf( const Class& other );
252 
263  bool isParentOf( const Class& other ) const;
264 
271  bool isSubClassOf( const Class& other );
272 
283  bool isSubClassOf( const Class& other ) const;
284  };
285  }
286 }
287 
288 
289 #ifndef DISABLE_NEPOMUK_LEGACY
290 
291 namespace Nepomuk {
292 
293  class Ontology;
294  class Property;
295 
301  class KDE_DEPRECATED NEPOMUK_EXPORT Class : public Entity
302  {
303  public:
307  Class();
308 
312  Class( const Class& );
313 
317  ~Class();
318 
319  Class& operator=( const Class& );
320 
321  // an alternative would be: QList<Property> rangeOf() and QList<Property> domainOf()
322  QList<const Property*> allProperties() const;
323 
329  const Property* findPropertyByName( const QString& name ) const;
330 
338  const Property* findPropertyByLabel( const QString& label, const QString& language = QString() ) const;
339 
345  const Property* findPropertyByUri( const QUrl& uri ) const;
346 
353  QList<const Class*> parentClasses() const;
354 
361  QList<const Class*> subClasses() const;
362 
369  bool isParentOf( const Class* other ) const;
370 
377  bool isSubClassOf( const Class* other ) const;
378 
389  static const Class* load( const QUrl& uri );
390 
391  private:
392  class Private;
393  QSharedDataPointer<Private> d;
394 
395  friend class OntologyManager;
396  };
397 }
398 
399 #endif
400 #endif
Nepomuk::Class
A Class is a resource of type rdf:Class.
Definition: class.h:301
entity.h
Nepomuk::Property
A property is a resource of type rdf:Property which relates a domain with a range.
Definition: property.h:316
Nepomuk::Types::Entity
Abstract base class for Class and Property;.
Definition: entity.h:54
Nepomuk::Types::Property
A property is a resource of type rdf:Property which relates a domain with a range.
Definition: property.h:52
Nepomuk::Types::Class
A Class is a resource of type rdf:Class.
Definition: class.h:49
Nepomuk::Entity
Definition: entity.h:269
Nepomuk::OntologyManager
The OntologyManager is the central ontology cache handler.
Definition: ontologymanager.h:44
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