NepomukDaemons
ontologymanagermodel.cpp File Reference
#include "ontologymanagermodel.h"
#include <QtCore/QUrl>
#include <QtCore/QDateTime>
#include <Soprano/Backend>
#include <Soprano/StorageModel>
#include <Soprano/PluginManager>
#include <Soprano/Global>
#include <Soprano/NodeIterator>
#include <Soprano/StatementIterator>
#include <Soprano/QueryResultIterator>
#include <Soprano/Vocabulary/RDF>
#include <Soprano/Vocabulary/RDFS>
#include <Soprano/Vocabulary/NRL>
#include <Soprano/Vocabulary/NAO>
#include <Soprano/Vocabulary/XMLSchema>
#include <KDebug>
#include "ontologymanagermodel.moc"

Go to the source code of this file.
Functions | |
void | createMetadata (Soprano::Model *tmpModel, const QUrl &ns) |
QUrl | createMetadataGraphUri (const QUrl &uri) |
bool | ensureDataLayout (Soprano::Model *tmpModel, const QUrl &ns) |
bool | findGraphUris (Soprano::Model *model, const QUrl &ns, QUrl &dataGraphUri, QUrl &metaDataGraphUri) |
Function Documentation
void @26::createMetadata | ( | Soprano::Model * | tmpModel, | |
const QUrl & | ns | |||
) | [static] |
Create the necessary NRL graphs and metadata for an ontology to pass ensureDataLayout.
- Parameters:
-
tmpModel The model to store everything in ns The namespace of the ontology to modify in tmpModel
Definition at line 126 of file ontologymanagermodel.cpp.
Create a uri for an nrl:MetadataGraph.
- Parameters:
-
uri The uri of the data graph.
Definition at line 49 of file ontologymanagermodel.cpp.
bool @26::ensureDataLayout | ( | Soprano::Model * | tmpModel, | |
const QUrl & | ns | |||
) | [static] |
Check if the ontology with namespace ns
has a proper NRL layout in model model
.
An ontology that passes this test can be imported into a production model without any modifications.
- Returns:
true
if the necessary NRL graphs are defined,false
otherwise
Definition at line 99 of file ontologymanagermodel.cpp.
bool @26::findGraphUris | ( | Soprano::Model * | model, | |
const QUrl & | ns, | |||
QUrl & | dataGraphUri, | |||
QUrl & | metaDataGraphUri | |||
) | [static] |
Find the graphs an ontology is stored in.
- Parameters:
-
model The model to search in. ns The namespace of the ontology in question. dataGraphUri The graph which stores the ontology data (output variable) metaDataGraphUri The graph which stores the ontology metadata (output variable)
- Returns:
true
if the ontology was found and both dataGraphUri and metaDataGraphUri are filled with proper values.
Definition at line 69 of file ontologymanagermodel.cpp.
Variable Documentation
Definition at line 162 of file ontologymanagermodel.cpp.