Nepomuk-Core
#include <ontologymanagermodel.h>
Inherits FilterModel.
Public Member Functions | |
OntologyManagerModel (Soprano::Model *parentModel=0, QObject *parent=0) | |
~OntologyManagerModel () | |
QUrl | findOntologyContext (const QUrl &uri) |
QDateTime | ontoModificationDate (const QUrl &uri) |
bool | removeOntology (const QUrl &ns) |
bool | updateOntology (Soprano::StatementIterator data, const QUrl &ns=QUrl()) |
Detailed Description
Filter model to manage NRL ontologies.
Can be used to manage ontologies stored in a model. The ontologies are stored in NRL graphs.
Definition at line 35 of file ontologymanagermodel.h.
Constructor & Destructor Documentation
Nepomuk2::OntologyManagerModel::OntologyManagerModel | ( | Soprano::Model * | parentModel = 0 , |
QObject * | parent = 0 |
||
) |
Create a new model.
Definition at line 234 of file ontologymanagermodel.cpp.
Nepomuk2::OntologyManagerModel::~OntologyManagerModel | ( | ) |
Destructor.
Definition at line 242 of file ontologymanagermodel.cpp.
Member Function Documentation
QUrl Nepomuk2::OntologyManagerModel::findOntologyContext | ( | const QUrl & | uri | ) |
Tries to find the ontology uri
in the local Nepomuk store.
- Returns
- The context (named graph) storing the ontology's statements or an invalid URI if the ontology could not be found.
Definition at line 415 of file ontologymanagermodel.cpp.
QDateTime Nepomuk2::OntologyManagerModel::ontoModificationDate | ( | const QUrl & | uri | ) |
Determine the modification time of a stored ontology.
The modification time of an ontology is the time it was stored into the model.
- Parameters
-
uri The namespace of the ontology.
- Returns
- The modification time of the ontology identified by
uri
or an invalid QDateTime if the ontology was not found.
Definition at line 392 of file ontologymanagermodel.cpp.
bool Nepomuk2::OntologyManagerModel::removeOntology | ( | const QUrl & | ns | ) |
Remove an ontology from the model.
- Parameters
-
ns The namespace of the ontology.
- Returns
true
if the ontology was found and successfully removed.false
in case the ontology was not found or an error occurred.
Definition at line 371 of file ontologymanagermodel.cpp.
bool Nepomuk2::OntologyManagerModel::updateOntology | ( | Soprano::StatementIterator | data, |
const QUrl & | ns = QUrl() |
||
) |
Update an ontology.
- Parameters
-
data The actual statements defining the ontology. These statements have to either already define the proper NRL graphs or not define graphs at all. In the latter case the graphs will be created. ns The namespace of the ontology. If this is left invalid it will be determined from the data.
- Returns
true
if the data was valid and the ontology was successfully updated. otherwise.
Definition at line 248 of file ontologymanagermodel.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.