Nepomuk
Nepomuk::Types::Ontology Class Reference
#include <Nepomuk/Types/Ontology>

Detailed Description
Represents one ontology.
Definition at line 45 of file ontology.h.
Public Member Functions | |
QList< Class > | allClasses () |
QList< Property > | allProperties () |
Class | findClassByLabel (const QString &label, const QString &language=QString()) |
Class | findClassByName (const QString &name) |
Property | findPropertyByLabel (const QString &label, const QString &language=QString()) |
Property | findPropertyByName (const QString &name) |
Ontology (const Ontology &) | |
Ontology (const QUrl &uri) | |
Ontology () | |
Ontology & | operator= (const Ontology &) |
~Ontology () |
Constructor & Destructor Documentation
Nepomuk::Types::Ontology::Ontology | ( | ) |
Default constructor.
Creates an empty Ontology.
Nepomuk::Types::Ontology::Ontology | ( | const QUrl & | uri | ) |
Create the ontology referred to by uri
.
The result is either a valid ontology 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::Ontology::Ontology | ( | const Ontology & | ) |
Default copy constructor.
Nepomuk::Types::Ontology::~Ontology | ( | ) |
Destructor.
Member Function Documentation
All classes defined in this ontology, i.e.
its namespace.
A list of all properties defined in this ontology.
This does not include properties that use classes of this ontology but are defined in a different one.
Class Nepomuk::Types::Ontology::findClassByLabel | ( | const QString & | label, | |
const QString & | language = QString() | |||
) |
Search for a class in the ontology by its label.
- Parameters:
-
label The label of the class (i.e. rdfs:label) language The language in which the label was specified. If empty the default rdfs:label is returned.
- Returns:
- the Class object identified by label or an invalid one if the class could not be found.
Search for a class in the ontology by its name.
- Parameters:
-
name The name of the class.
- Returns:
- the Class object identified by name or an invalid one if the class could not be found.
Property Nepomuk::Types::Ontology::findPropertyByLabel | ( | const QString & | label, | |
const QString & | language = QString() | |||
) |
Search for a property in the ontology 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 one if the property could not be found.
Search for a property in the ontology by its name.
- Parameters:
-
name The name of the property.
- Returns:
- the Property object identified by name or an invalid one if the property could not be found.
The documentation for this class was generated from the following file: