Nepomuk
#include <Nepomuk/Types/Ontology>
Public Member Functions | |
Ontology () | |
Ontology (const QUrl &uri) | |
Ontology (const Ontology &) | |
~Ontology () | |
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 & | operator= (const Ontology &) |
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
Represents one ontology.
Definition at line 45 of file ontology.h.
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
QList<Class> Nepomuk::Types::Ontology::allClasses | ( | ) |
All classes defined in this ontology, i.e.
its namespace.
QList<Property> Nepomuk::Types::Ontology::allProperties | ( | ) |
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.
Class Nepomuk::Types::Ontology::findClassByName | ( | const QString & | name | ) |
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.
Property Nepomuk::Types::Ontology::findPropertyByName | ( | const QString & | name | ) |
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:
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.