Nepomuk
Nepomuk::Class Class Reference
#include <class.h>
Inheritance diagram for Nepomuk::Class:

Detailed Description
A Class is a resource of type rdf:Class.
- Deprecated:
- in favor of Nepomuk::Types::Class
Definition at line 179 of file class.h.
Public Member Functions | |
QList< const Property * > | allProperties () const |
Class (const Class &) | |
Class () | |
const Property * | findPropertyByLabel (const QString &label, const QString &language=QString()) const |
const Property * | findPropertyByName (const QString &name) const |
const Property * | findPropertyByUri (const QUrl &uri) const |
bool | isParentOf (const Class *other) const |
bool | isSubClassOf (const Class *other) const |
Class & | operator= (const Class &) |
QList< const Class * > | parentClasses () const |
QList< const Class * > | subClasses () const |
~Class () | |
Static Public Member Functions | |
static const Class * | load (const QUrl &uri) |
Constructor & Destructor Documentation
Nepomuk::Class::Class | ( | ) |
Default constructor.
Creates an empty Class.
Nepomuk::Class::Class | ( | const Class & | ) |
Default copy constructor.
Nepomuk::Class::~Class | ( | ) |
Destructor.
Member Function Documentation
const Property* Nepomuk::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 0 if the property could not be found.
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 0 if the property could not be found.
Search for a property in the class by its name.
- Parameters:
-
uri the URI of the property
- Returns:
- the Property object identified by uri or 0 if the property could not be found.
bool Nepomuk::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.
bool Nepomuk::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.
Each class can have multiple parent classes.
- 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.
- 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.
The documentation for this class was generated from the following file: