Nepomuk-Core
#include <Nepomuk2/Types/Property>
Public Member Functions | |
Property () | |
Property (const QUrl &uri) | |
Property (const Property &) | |
~Property () | |
int | cardinality () |
int | cardinality () const |
Class | domain () |
Class | domain () const |
Property | inverseProperty () |
Property | inverseProperty () const |
bool | isParentOf (const Property &other) |
bool | isParentOf (const Property &other) const |
bool | isSubPropertyOf (const Property &other) |
bool | isSubPropertyOf (const Property &other) const |
Literal | literalRangeType () |
Literal | literalRangeType () const |
int | maxCardinality () |
int | maxCardinality () const |
int | minCardinality () |
int | minCardinality () const |
Property & | operator= (const Property &) |
QList< Property > | parentProperties () |
QList< Property > | parentProperties () const |
Class | range () |
Class | range () const |
QList< Property > | subProperties () |
QList< Property > | subProperties () const |
Public Member Functions inherited from Nepomuk2::Types::Entity | |
Entity (const Entity &) | |
virtual | ~Entity () |
QString | comment (const QString &language=KGlobal::locale() ->language()) |
QString | comment (const QString &language=KGlobal::locale() ->language()) const |
QIcon | icon () |
QIcon | icon () const |
bool | isAvailable () |
bool | isAvailable () const |
bool | isValid () const |
QString | label (const QString &language=KGlobal::locale() ->language()) |
QString | label (const QString &language=KGlobal::locale() ->language()) const |
QString | name () const |
operator QUrl () const | |
bool | operator!= (const Entity &other) const |
bool | operator!= (const QUrl &other) const |
Entity & | operator= (const Entity &) |
bool | operator== (const Entity &other) const |
bool | operator== (const QUrl &other) const |
void | reset (bool recursive=false) |
QUrl | uri () const |
bool | userVisible () const |
Additional Inherited Members | |
Protected Member Functions inherited from Nepomuk2::Types::Entity | |
Entity () | |
Protected Attributes inherited from Nepomuk2::Types::Entity | |
QExplicitlySharedDataPointer < EntityPrivate > | d |
Detailed Description
A property is a resource of type rdf:Property which relates a domain with a range.
The latter one can be a Literal or a Class.
Property instances are explicitly shared. Two instances created with the same uri reference the same data.
While Resource objects can be changed Property instances are considered to be static and never changed during their lifetime.
Definition at line 52 of file libnepomukcore/types/property.h.
Constructor & Destructor Documentation
Property::Property | ( | ) |
Default constructor.
Creates an empty Property.
Definition at line 146 of file libnepomukcore/types/property.cpp.
Property::Property | ( | const QUrl & | uri | ) |
Create the property referred to by uri
.
The result is either a valid property which could be loaded from the Nepomuk store or a simple property which only contains the uri.
Be aware that the data is only loaded once read.
Subsequent calls result in a simple hash lookup of cached data.
Definition at line 153 of file libnepomukcore/types/property.cpp.
Property::Property | ( | const Property & | other | ) |
Default copy constructor.
Definition at line 160 of file libnepomukcore/types/property.cpp.
Property::~Property | ( | ) |
Destructor.
Definition at line 166 of file libnepomukcore/types/property.cpp.
Member Function Documentation
int Property::cardinality | ( | ) |
The cardinality of this property as specified by nrl:cardinality.
- Returns
- the cardinality of the property or -1 if none was set.
Definition at line 340 of file libnepomukcore/types/property.cpp.
int Property::cardinality | ( | ) | const |
The cardinality of this property as specified by nrl:cardinality.
- Returns
- the cardinality of the property or -1 if none was set.
Const version
- Since
- 4.4
Definition at line 352 of file libnepomukcore/types/property.cpp.
Nepomuk2::Types::Class Property::domain | ( | ) |
The domain of the property.
Definition at line 307 of file libnepomukcore/types/property.cpp.
Nepomuk2::Types::Class Property::domain | ( | ) | const |
The domain of the property.
Const version
- Since
- 4.4
Definition at line 334 of file libnepomukcore/types/property.cpp.
Nepomuk2::Types::Property Property::inverseProperty | ( | ) |
The inverse property (nrl:inverseProperty).
- Returns
- A Property instance representing the inverse property of this one or 0 if none was specified in the ontology.
Definition at line 214 of file libnepomukcore/types/property.cpp.
Nepomuk2::Types::Property Property::inverseProperty | ( | ) | const |
The inverse property (nrl:inverseProperty).
- Returns
- A Property instance representing the inverse property of this one or 0 if none was specified in the ontology.
Const version
- Since
- 4.4
Definition at line 227 of file libnepomukcore/types/property.cpp.
bool Property::isParentOf | ( | const Property & | other | ) |
Check if a property inherits this property.
This is a recursive method which does not only check direct child propertyes.
- Returns
- true if other is derived from this property, false otherwise.
Definition at line 404 of file libnepomukcore/types/property.cpp.
bool Property::isParentOf | ( | const Property & | other | ) | const |
Check if a property inherits this property.
This is a recursive method which does not only check direct child propertyes.
- Returns
- true if other is derived from this property, false otherwise.
Const version
- Since
- 4.4
Definition at line 426 of file libnepomukcore/types/property.cpp.
bool Property::isSubPropertyOf | ( | const Property & | other | ) |
Check if this property is derived from another property.
This is a recursive method which does not only check direct child propertyes.
- Returns
- true if this property is derived from other, false otherwise.
Definition at line 432 of file libnepomukcore/types/property.cpp.
bool Property::isSubPropertyOf | ( | const Property & | other | ) | const |
Check if this property is derived from another property.
This is a recursive method which does not only check direct child propertyes.
- Returns
- true if this property is derived from other, false otherwise.
Const version
- Since
- 4.4
Definition at line 454 of file libnepomukcore/types/property.cpp.
Nepomuk2::Types::Literal Property::literalRangeType | ( | ) |
Nepomuk2::Types::Literal Property::literalRangeType | ( | ) | const |
If the rage of this property is a literal (i.e.
range returns an invalid Class) this method provides the literal type.
- See also
- range
Const version
- Since
- 4.4
Definition at line 301 of file libnepomukcore/types/property.cpp.
int Property::maxCardinality | ( | ) |
The maximum cardinality of this property as specified by nrl:maxCardinality.
- Returns
- the maximum cardinality of the property or -1 if none was set.
Definition at line 381 of file libnepomukcore/types/property.cpp.
int Property::maxCardinality | ( | ) | const |
The maximum cardinality of this property as specified by nrl:maxCardinality.
- Returns
- the maximum cardinality of the property or -1 if none was set.
Const version
- Since
- 4.4
Definition at line 398 of file libnepomukcore/types/property.cpp.
int Property::minCardinality | ( | ) |
The minimum cardinality of this property as specified by nrl:minCardinality.
- Returns
- the minimum cardinality of the property or -1 if none was set.
Definition at line 358 of file libnepomukcore/types/property.cpp.
int Property::minCardinality | ( | ) | const |
The minimum cardinality of this property as specified by nrl:minCardinality.
- Returns
- the minimum cardinality of the property or -1 if none was set.
Const version
- Since
- 4.4
Definition at line 375 of file libnepomukcore/types/property.cpp.
Nepomuk2::Types::Property & Property::operator= | ( | const Property & | other | ) |
Copy operator.
Definition at line 171 of file libnepomukcore/types/property.cpp.
QList< Nepomuk2::Types::Property > Property::parentProperties | ( | ) |
Each property can have multiple parent properties.
- Returns
- A list of all parent properties of this property. If the list is emppty it means that the property has no direct parents, i.e. it is derived from rdf:Resource.
Definition at line 178 of file libnepomukcore/types/property.cpp.
QList< Nepomuk2::Types::Property > Property::parentProperties | ( | ) | const |
Each property can have multiple parent properties.
- Returns
- A list of all parent properties of this property. If the list is emppty it means that the property has no direct parents, i.e. it is derived from rdf:Resource.
Const version
- Since
- 4.4
Definition at line 190 of file libnepomukcore/types/property.cpp.
Nepomuk2::Types::Class Property::range | ( | ) |
The range of the property.
- Returns
- The range of the property or an invalid Class in case the range of this poperty is a literal.
- See also
- literalRange
Definition at line 233 of file libnepomukcore/types/property.cpp.
Nepomuk2::Types::Class Property::range | ( | ) | const |
The range of the property.
- Returns
- The range of the property or an invalid Class in case the range of this poperty is a literal.
- See also
- literalRange
Const version
- Since
- 4.4
Definition at line 265 of file libnepomukcore/types/property.cpp.
QList< Nepomuk2::Types::Property > Property::subProperties | ( | ) |
- Returns
- A list of all properties that have this property as a parent. Be aware that this list can never be final since other ontologies that have not been loaded yet may contain properties that are derived from this property.
Definition at line 196 of file libnepomukcore/types/property.cpp.
QList< Nepomuk2::Types::Property > Property::subProperties | ( | ) | const |
- Returns
- A list of all properties that have this property as a parent. Be aware that this list can never be final since other ontologies that have not been loaded yet may contain properties that are derived from this property.
Const version
- Since
- 4.4
Definition at line 208 of file libnepomukcore/types/property.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.