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

Nepomuk

  • nepomuk
  • types
property.h
Go to the documentation of this file.
1/* This file is part of the Nepomuk-KDE libraries
2 Copyright (c) 2007 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_PROPERTY_H_
21#define _NEPOMUK_PROPERTY_H_
22
23#include <QtCore/QList>
24#include <QtCore/QUrl>
25#include <QtCore/QString>
26#include <QtCore/QVariant>
27#include <QtCore/QSharedData>
28
29#include "entity.h"
30#include "nepomuk_export.h"
31
32namespace Nepomuk {
33 namespace Types {
34
35 class Class;
36 class Literal;
37
52 class NEPOMUK_EXPORT Property : public Entity
53 {
54 public:
58 Property();
59
69 Property( const QUrl& uri );
70
74 Property( const Property& );
75
79 ~Property();
80
84 Property& operator=( const Property& );
85
92 QList<Property> parentProperties();
93
104 QList<Property> parentProperties() const;
105
112 QList<Property> subProperties();
113
124 QList<Property> subProperties() const;
125
131 Property inverseProperty();
132
142 Property inverseProperty() const;
143
150 Class range();
151
162 Class range() const;
163
173 Literal literalRangeType();
174
188 Literal literalRangeType() const;
189
193 Class domain();
194
202 Class domain() const;
203
209 int cardinality();
210
220 int cardinality() const;
221
227 int minCardinality();
228
238 int minCardinality() const;
239
245 int maxCardinality();
246
256 int maxCardinality() const;
257
264 bool isParentOf( const Property& other );
265
276 bool isParentOf( const Property& other ) const;
277
284 bool isSubPropertyOf( const Property& other );
285
296 bool isSubPropertyOf( const Property& other ) const;
297 };
298 }
299}
300
301
302#ifndef DISABLE_NEPOMUK_LEGACY
303
304namespace Nepomuk {
305
306 class Ontology;
307 class Class;
308 class Literal;
309
316 class KDE_DEPRECATED NEPOMUK_EXPORT Property : public Entity
317 {
318 public:
322 Property();
323
327 Property( const Property& );
328
332 ~Property();
333
334 Property& operator=( const Property& );
335
342 QList<const Property*> parentProperties() const;
343
350 QList<const Property*> parentOf() const;
351
357 const Property* inverseProperty() const;
358
365 const Class* range() const;
366
376 Literal literalRangeType() const;
377
381 const Class* domain() const;
382
388 int cardinality() const;
389
395 int minCardinality() const;
396
402 int maxCardinality() const;
403
404 // QString unit() const;
405
416 static const Property* load( const QUrl& uri );
417
418 private:
419 class Private;
420 QSharedDataPointer<Private> d;
421
422 friend class OntologyManager;
423 };
424}
425
426#endif // DISABLE_NEPOMUK_LEGACY
427
428#endif // _NEPOMUK_PROPERTY_H_
Nepomuk::Class
A Class is a resource of type rdf:Class.
Definition: class.h:302
Nepomuk::Entity
Definition: entity.h:270
Nepomuk::Literal
Defines a literal type based on XML Schema.
Definition: literal.h:92
Nepomuk::OntologyManager
The OntologyManager is the central ontology cache handler.
Definition: ontologymanager.h:45
Nepomuk::Property
A property is a resource of type rdf:Property which relates a domain with a range.
Definition: property.h:317
Nepomuk::Property::range
const Class * range() const
The range of the property.
Nepomuk::Property::domain
const Class * domain() const
The domain of the property.
Nepomuk::Property::minCardinality
int minCardinality() const
The minimum cardinality of this property as specified by nrl:minCardinality.
Nepomuk::Property::parentProperties
QList< const Property * > parentProperties() const
Each property can have multiple parent properties.
Nepomuk::Property::parentOf
QList< const Property * > parentOf() const
Nepomuk::Property::~Property
~Property()
Destructor.
Nepomuk::Property::maxCardinality
int maxCardinality() const
The maximum cardinality of this property as specified by nrl:maxCardinality.
Nepomuk::Property::inverseProperty
const Property * inverseProperty() const
The inverse property (nrl:inverseProperty).
Nepomuk::Property::load
static const Property * load(const QUrl &uri)
Loads a property actually including the whole ontology it is declared in.
Nepomuk::Property::cardinality
int cardinality() const
The cardinality of this property as specified by nrl:cardinality.
Nepomuk::Property::literalRangeType
Literal literalRangeType() const
If the rage of this property is a literal (i.e.
Nepomuk::Property::operator=
Property & operator=(const Property &)
Nepomuk::Property::Property
Property(const Property &)
Default copy constructor.
Nepomuk::Property::Property
Property()
Default constructor.
Nepomuk::Types::Class
A Class is a resource of type rdf:Class.
Definition: class.h:50
Nepomuk::Types::Entity
Abstract base class for Class and Property;.
Definition: entity.h:55
Nepomuk::Types::Literal
Defines a literal type based on XML Schema.
Definition: literal.h:42
Nepomuk::Types::Property
A property is a resource of type rdf:Property which relates a domain with a range.
Definition: property.h:53
Nepomuk::Types::Property::isParentOf
bool isParentOf(const Property &other)
Check if a property inherits this property.
Nepomuk::Types::Property::inverseProperty
Property inverseProperty()
The inverse property (nrl:inverseProperty).
Nepomuk::Types::Property::literalRangeType
Literal literalRangeType()
If the rage of this property is a literal (i.e.
Nepomuk::Types::Property::inverseProperty
Property inverseProperty() const
The inverse property (nrl:inverseProperty).
Nepomuk::Types::Property::isSubPropertyOf
bool isSubPropertyOf(const Property &other) const
Check if this property is derived from another property.
Nepomuk::Types::Property::minCardinality
int minCardinality()
The minimum cardinality of this property as specified by nrl:minCardinality.
Nepomuk::Types::Property::maxCardinality
int maxCardinality()
The maximum cardinality of this property as specified by nrl:maxCardinality.
Nepomuk::Types::Property::maxCardinality
int maxCardinality() const
The maximum cardinality of this property as specified by nrl:maxCardinality.
Nepomuk::Types::Property::minCardinality
int minCardinality() const
The minimum cardinality of this property as specified by nrl:minCardinality.
Nepomuk::Types::Property::~Property
~Property()
Destructor.
Nepomuk::Types::Property::parentProperties
QList< Property > parentProperties()
Each property can have multiple parent properties.
Nepomuk::Types::Property::domain
Class domain()
The domain of the property.
Nepomuk::Types::Property::parentProperties
QList< Property > parentProperties() const
Each property can have multiple parent properties.
Nepomuk::Types::Property::literalRangeType
Literal literalRangeType() const
If the rage of this property is a literal (i.e.
Nepomuk::Types::Property::range
Class range()
The range of the property.
Nepomuk::Types::Property::range
Class range() const
The range of the property.
Nepomuk::Types::Property::cardinality
int cardinality()
The cardinality of this property as specified by nrl:cardinality.
Nepomuk::Types::Property::operator=
Property & operator=(const Property &)
Copy operator.
Nepomuk::Types::Property::Property
Property(const Property &)
Default copy constructor.
Nepomuk::Types::Property::domain
Class domain() const
The domain of the property.
Nepomuk::Types::Property::cardinality
int cardinality() const
The cardinality of this property as specified by nrl:cardinality.
Nepomuk::Types::Property::Property
Property()
Default constructor.
Nepomuk::Types::Property::subProperties
QList< Property > subProperties() const
Nepomuk::Types::Property::Property
Property(const QUrl &uri)
Create the property referred to by uri.
Nepomuk::Types::Property::subProperties
QList< Property > subProperties()
Nepomuk::Types::Property::isParentOf
bool isParentOf(const Property &other) const
Check if a property inherits this property.
Nepomuk::Types::Property::isSubPropertyOf
bool isSubPropertyOf(const Property &other)
Check if this property is derived from another property.
entity.h
Nepomuk
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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