Ontology Class Reference
from PyKDE4.nepomuk import *
Namespace: Nepomuk
Detailed Description
Ontology represents one ontology specified using NRL.
- Deprecated:
- in favor of Nepomuk.Types.Ontology
Methods | |
__init__ (self) | |
__init__ (self, Nepomuk.Ontology a0) | |
[const Clas] | allClasses (self) |
[const Propert] | allProperties (self) |
Nepomuk.Class | findClassByLabel (self, QString label, QString language=QString()) |
Nepomuk.Class | findClassByName (self, QString name) |
Nepomuk.Class | findClassByUri (self, QUrl uri) |
Property | findPropertyByLabel (self, QString label, QString language=QString()) |
Property | findPropertyByName (self, QString name) |
Property | findPropertyByUri (self, QUrl uri) |
QUrl | uri (self) |
Static Methods | |
Nepomuk.Ontology | load (QUrl uri) |
Method Documentation
__init__ | ( | self ) |
Default constructor. Creates an empty Ontology.
__init__ | ( | self, | ||
Nepomuk.Ontology | a0 | |||
) |
Default copy constructor
[const Clas] allClasses | ( | self ) |
All classes defined in this ontology, i.e. its namespace.
[const Propert] allProperties | ( | self ) |
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.
Nepomuk.Class findClassByLabel | ( | self, | ||
QString | label, | |||
QString | language=QString() | |||
) |
Search for a class in the ontology by its label.
- Parameters:
-
label The label of the class (i.e. rdfs:label)
- Parameters:
-
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 0 if the class could not be found.
Nepomuk.Class findClassByName | ( | self, | ||
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 0 if the class could not be found.
Nepomuk.Class findClassByUri | ( | self, | ||
QUrl | uri | |||
) |
Search for a class in the ontology by its name.
- Parameters:
-
uri the URI of the class
- Returns:
- the Class object identified by uri or 0 if the class could not be found.
Search for a property in the ontology by its label.
- Parameters:
-
label The label of the property (i.e. rdfs:label)
- Parameters:
-
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 ontology 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 ontology 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.
Nepomuk.Ontology load | ( | QUrl | uri | |
) |
Loads an ontology.
Dependancies are resolved automatically if possible.
- Returns:
- An Ontology object representing the ontology identified by uri or an invalid Ontology object if the resource identified by uri is either not an ontology or does not exist.
QUrl uri | ( | self ) |
The URI of the ontology, i.e. its namespace