Nepomuk
#include <Nepomuk/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 Nepomuk::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 Nepomuk::Types::Entity | |
Entity () | |
Protected Attributes inherited from Nepomuk::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 property.h.
Constructor & Destructor Documentation
Nepomuk::Types::Property::Property | ( | ) |
Default constructor.
Creates an empty Property.
Nepomuk::Types::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.
Nepomuk::Types::Property::Property | ( | const Property & | ) |
Default copy constructor.
Nepomuk::Types::Property::~Property | ( | ) |
Destructor.
Member Function Documentation
int Nepomuk::Types::Property::cardinality | ( | ) |
The cardinality of this property as specified by nrl:cardinality.
- Returns
- the cardinality of the property or -1 if none was set.
int Nepomuk::Types::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
Class Nepomuk::Types::Property::domain | ( | ) |
The domain of the property.
Class Nepomuk::Types::Property::domain | ( | ) | const |
The domain of the property.
Const version
- Since
- 4.4
Property Nepomuk::Types::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.
Property Nepomuk::Types::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
bool Nepomuk::Types::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.
bool Nepomuk::Types::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
bool Nepomuk::Types::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.
bool Nepomuk::Types::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
Literal Nepomuk::Types::Property::literalRangeType | ( | ) |
Literal Nepomuk::Types::Property::literalRangeType | ( | ) | const |
int Nepomuk::Types::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.
int Nepomuk::Types::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
int Nepomuk::Types::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.
int Nepomuk::Types::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
QList<Property> Nepomuk::Types::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.
QList<Property> Nepomuk::Types::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
Class Nepomuk::Types::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
Class Nepomuk::Types::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
QList<Property> Nepomuk::Types::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.
QList<Property> Nepomuk::Types::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
The documentation for this class was generated from the following file:
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.