# class Ontology

###

Module | nepomuk
Namespace | Nepomuk::Types
Class | Ontology
Inherits | Nepomuk::Types::Entity

\class Ontology ontology.h Nepomuk/Types/Ontology

Represents one ontology.

Author Sebastian Trueg <trueg@kde.org>

### methods

- Ontology ( )

  returns ctor

  Default constructor. Creates an empty Ontology.

- Ontology (uri)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  uri | QUrl |

  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.

- Ontology (a0)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  a0 | Nepomuk.Types.Ontology |

  Default copy constructor

- allClasses ( )

  returns QList<Nepomuk::Types::Class>

  All classes defined in this ontology, i.e. its namespace.

- allProperties ( )

  returns QList<Nepomuk::Types::Property>

  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.

- findClassByLabel (label, language)

  returns Nepomuk.Types.Class

  Argument | Type | Default
  --- | --- | ---
  label | QString |
  language | QString | QString()

  Search for a class in the ontology by its label.

  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.

- findClassByName (name)

  returns Nepomuk.Types.Class

  Argument | Type | Default
  --- | --- | ---
  name | QString |

  Search for a class in the ontology by its name.

  name - The name of the class. Returns the Class object identified by name or an invalid one if the class could not be found.

- findPropertyByLabel (label, language)

  returns Nepomuk.Types.Property

  Argument | Type | Default
  --- | --- | ---
  label | QString |
  language | QString | QString()

  Search for a property in the ontology by its label.

  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.

- findPropertyByName (name)

  returns Nepomuk.Types.Property

  Argument | Type | Default
  --- | --- | ---
  name | QString |

  Search for a property in the ontology by its name.

  name - The name of the property. Returns the Property object identified by name or an invalid one if the property could not be found.