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 <Soprano/Vocabulary/OWL>
#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) |
QUrl | guessOntologyType (Soprano::Model *tmpModel) |
Function Documentation
void @50::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 192 of file ontologymanagermodel.cpp.
Create a uri for an nrl:MetadataGraph.
- Parameters:
-
uri The uri of the data graph.
Definition at line 50 of file ontologymanagermodel.cpp.
bool @50::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 100 of file ontologymanagermodel.cpp.
bool @50::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 70 of file ontologymanagermodel.cpp.
QUrl @50::guessOntologyType | ( | Soprano::Model * | tmpModel | ) | [static] |
Try to guess the ontoloy type from the contents of the model: a nrl:Ontology or a nrl:KnowledgeBase or a pure nrl:InstanceBase.
Definition at line 126 of file ontologymanagermodel.cpp.
Variable Documentation
Definition at line 237 of file ontologymanagermodel.cpp.