Nepomuk
#include <Nepomuk/Types/Class>
Public Member Functions | |
Class () | |
Class (const QUrl &uri) | |
Class (const Class &) | |
~Class () | |
QList< Class > | allParentClasses () |
QList< Class > | allParentClasses () const |
QList< Class > | allSubClasses () |
QList< Class > | allSubClasses () const |
QList< Property > | domainOf () |
QList< Property > | domainOf () const |
Property | findPropertyByLabel (const QString &label, const QString &language=QString()) |
Property | findPropertyByLabel (const QString &label, const QString &language=QString()) const |
Property | findPropertyByName (const QString &name) |
Property | findPropertyByName (const QString &name) const |
bool | isParentOf (const Class &other) |
bool | isParentOf (const Class &other) const |
bool | isSubClassOf (const Class &other) |
bool | isSubClassOf (const Class &other) const |
Class & | operator= (const Class &) |
QList< Class > | parentClasses () |
QList< Class > | parentClasses () const |
QList< Property > | rangeOf () |
QList< Property > | rangeOf () const |
QList< Class > | subClasses () |
QList< Class > | subClasses () 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 Class is a resource of type rdf:Class.
Class instances are explicitly shared. Two instances created with the same uri reference the same data.
While Resource objects can be changed Class instances are considered to be static and never changed during their lifetime.
Constructor & Destructor Documentation
Nepomuk::Types::Class::Class | ( | ) |
Default constructor.
Creates an empty Class.
Nepomuk::Types::Class::Class | ( | const QUrl & | uri | ) |
Create the class referred to by uri
.
The result is either a valid class which could be loaded from the Nepomuk store or a simple class 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::Class::Class | ( | const Class & | ) |
Default copy constructor.
Nepomuk::Types::Class::~Class | ( | ) |
Destructor.
Member Function Documentation
QList<Class> Nepomuk::Types::Class::allParentClasses | ( | ) |
Recursively determines all parent classes of this class, not only the direct ones.
- Returns
- A list of parent classes of this class.
- See also
- parentClasses()
QList<Class> Nepomuk::Types::Class::allParentClasses | ( | ) | const |
Recursively determines all parent classes of this class, not only the direct ones.
- Returns
- A list of parent classes of this class.
- See also
- parentClasses()
Const version.
- Since
- 4.4
QList<Class> Nepomuk::Types::Class::allSubClasses | ( | ) |
Recursively determines all sub classes of this class, not only the direct ones.
- Returns
- A list of sub classes of this class.
- See also
- subClasses()
QList<Class> Nepomuk::Types::Class::allSubClasses | ( | ) | const |
Recursively determines all sub classes of this class, not only the direct ones.
- Returns
- A list of sub classes of this class.
- See also
- subClasses()
Const version.
- Since
- 4.4
QList<Property> Nepomuk::Types::Class::domainOf | ( | ) |
A Property has a certain domain which is a Class.
- Returns
- A list of all properties that have this Class as a domain.
- See also
- Property::domain()
QList<Property> Nepomuk::Types::Class::domainOf | ( | ) | const |
A Property has a certain domain which is a Class.
- Returns
- A list of all properties that have this Class as a domain.
- See also
- Property::domain()
Const version.
- Since
- 4.4
Property Nepomuk::Types::Class::findPropertyByLabel | ( | const QString & | label, |
const QString & | language = QString() |
||
) |
Search for a property in the class by its label.
- Parameters
-
label The label of the property (i.e. rdfs:label) language The language in which the label was specified. If empty the default rdfs:label is returned.
- Returns
- the Property object identified by label or an invalid property if it could not be found.
Property Nepomuk::Types::Class::findPropertyByLabel | ( | const QString & | label, |
const QString & | language = QString() |
||
) | const |
Search for a property in the class by its label.
- Parameters
-
label The label of the property (i.e. rdfs:label) language The language in which the label was specified. If empty the default rdfs:label is returned.
- Returns
- the Property object identified by label or an invalid property if it could not be found.
Const version.
- Since
- 4.4
Property Nepomuk::Types::Class::findPropertyByName | ( | const QString & | name | ) |
Search for a property in the class by its name.
- Parameters
-
name The name of the property.
- Returns
- the Property object identified by name or an invalid property if it could not be found.
Property Nepomuk::Types::Class::findPropertyByName | ( | const QString & | name | ) | const |
Search for a property in the class by its name.
- Parameters
-
name The name of the property.
- Returns
- the Property object identified by name or an invalid property if it could not be found.
Const version.
- Since
- 4.4
bool Nepomuk::Types::Class::isParentOf | ( | const Class & | other | ) |
Check if a class inherits this class.
This is a recursive method which does not only check direct child classes.
- Returns
- true if other is derived from this class, false otherwise.
bool Nepomuk::Types::Class::isParentOf | ( | const Class & | other | ) | const |
Check if a class inherits this class.
This is a recursive method which does not only check direct child classes.
- Returns
- true if other is derived from this class, false otherwise.
Const version.
- Since
- 4.4
bool Nepomuk::Types::Class::isSubClassOf | ( | const Class & | other | ) |
Check if this class is derived from another class.
This is a recursive method which does not only check direct child classes.
- Returns
- true if this class is derived from other, false otherwise.
bool Nepomuk::Types::Class::isSubClassOf | ( | const Class & | other | ) | const |
Check if this class is derived from another class.
This is a recursive method which does not only check direct child classes.
- Returns
- true if this class is derived from other, false otherwise.
Const version.
- Since
- 4.4
QList<Class> Nepomuk::Types::Class::parentClasses | ( | ) |
Each class can have multiple parent classes.
This method provides a list of all direct parents.
- Returns
- A list of all parent classes of this class. If the list is emppty it means that the class has no direct parents, i.e. it is derived from rdf:Resource.
- See also
- allParentClasses()
QList<Class> Nepomuk::Types::Class::parentClasses | ( | ) | const |
Each class can have multiple parent classes.
This method provides a list of all direct parents.
- Returns
- A list of all parent classes of this class. If the list is emppty it means that the class has no direct parents, i.e. it is derived from rdf:Resource.
- See also
- allParentClasses()
Const version.
- Since
- 4.4
QList<Property> Nepomuk::Types::Class::rangeOf | ( | ) |
A Property has a certain range which is a Class or a Literal.
- Returns
- A list of all properties that have this Class as a range.
- See also
- Property::range()
QList<Property> Nepomuk::Types::Class::rangeOf | ( | ) | const |
A Property has a certain range which is a Class or a Literal.
- Returns
- A list of all properties that have this Class as a range.
- See also
- Property::range()
Const version.
- Since
- 4.4
QList<Class> Nepomuk::Types::Class::subClasses | ( | ) |
- Returns
- A list of all classes that have this class as a parent. Be aware that this list can never be final since other ontologies that have not been loaded yet may contain classes that are derived from this class.
QList<Class> Nepomuk::Types::Class::subClasses | ( | ) | const |
- Returns
- A list of all classes that have this class as a parent. Be aware that this list can never be final since other ontologies that have not been loaded yet may contain classes that are derived from this class.
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.