Nepomuk
property.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _NEPOMUK_PROPERTY_H_
00021 #define _NEPOMUK_PROPERTY_H_
00022
00023 #include <QtCore/QList>
00024 #include <QtCore/QUrl>
00025 #include <QtCore/QString>
00026 #include <QtCore/QVariant>
00027 #include <QtCore/QSharedData>
00028
00029 #include "entity.h"
00030 #include "nepomuk_export.h"
00031
00032 namespace Nepomuk {
00033 namespace Types {
00034
00035 class Class;
00036 class Literal;
00037
00052 class NEPOMUK_EXPORT Property : public Entity
00053 {
00054 public:
00058 Property();
00059
00069 Property( const QUrl& uri );
00070
00074 Property( const Property& );
00075
00079 ~Property();
00080
00084 Property& operator=( const Property& );
00085
00092 QList<Property> parentProperties();
00093
00100 QList<Property> subProperties();
00101
00107 Property inverseProperty();
00108
00115 Class range();
00116
00126 Literal literalRangeType();
00127
00131 Class domain();
00132
00138 int cardinality();
00139
00145 int minCardinality();
00146
00152 int maxCardinality();
00153
00160 bool isParentOf( const Property& other );
00161
00168 bool isSubPropertyOf( const Property& other );
00169 };
00170 }
00171 }
00172
00173
00174 #ifndef DISABLE_NEPOMUK_LEGACY
00175
00176 namespace Nepomuk {
00177
00178 class Ontology;
00179 class Class;
00180 class Literal;
00181
00188 class KDE_DEPRECATED NEPOMUK_EXPORT Property : public Entity
00189 {
00190 public:
00194 Property();
00195
00199 Property( const Property& );
00200
00204 ~Property();
00205
00206 Property& operator=( const Property& );
00207
00214 QList<const Property*> parentProperties() const;
00215
00222 QList<const Property*> parentOf() const;
00223
00229 const Property* inverseProperty() const;
00230
00237 const Class* range() const;
00238
00248 Literal literalRangeType() const;
00249
00253 const Class* domain() const;
00254
00260 int cardinality() const;
00261
00267 int minCardinality() const;
00268
00274 int maxCardinality() const;
00275
00276
00277
00288 static const Property* load( const QUrl& uri );
00289
00290 private:
00291 class Private;
00292 QSharedDataPointer<Private> d;
00293
00294 friend class OntologyManager;
00295 };
00296 }
00297
00298 #endif // DISABLE_NEPOMUK_LEGACY
00299
00300 #endif // _NEPOMUK_PROPERTY_H_