# class Ontology

###

Module | nepomuk
Namespace | Nepomuk
Class | Ontology
Inherits |

Ontology represents one ontology specified using NRL.

Deprecated in favor of Nepomuk.Types.Ontology

### methods

- Ontology ( )

  returns ctor

  Default constructor. Creates an empty Ontology.

- Ontology (a0)

  returns ctor

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

  Default copy constructor

- allClasses ( )

  returns QList<const Class

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

- allProperties ( )

  returns QList<const 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.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 0 if the class could not be found.

- findClassByName (name)

  returns Nepomuk.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 0 if the class could not be found.

- findClassByUri (uri)

  returns Nepomuk.Class

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

  Search for a class in the ontology by its name.

  uri - the URI of the class Returns the Class object identified by uri or 0 if the class could not be found.

- findPropertyByLabel (label, language)

  returns Nepomuk.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 0 if the property could not be found.

- findPropertyByName (name)

  returns Nepomuk.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 0 if the property could not be found.

- findPropertyByUri (uri)

  returns Nepomuk.Property

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

  Search for a property in the ontology by its name.

  uri - the URI of the property Returns the Property object identified by uri or 0 if the property could not be found.

- load (uri)

  returns Nepomuk.Ontology
  static

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

  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.

- uri ( )

  returns QUrl

  The URI of the ontology, i.e. its namespace