NepomukDaemons
ontologyloader.h
Go to the documentation of this file.00001 /* This file is part of the KDE Project 00002 Copyright (c) 2007 Sebastian Trueg <trueg@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License version 2 as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00016 Boston, MA 02110-1301, USA. 00017 */ 00018 00019 #ifndef _NEPOMUK_SERVER_ONTOLOGY_LOADER_H_ 00020 #define _NEPOMUK_SERVER_ONTOLOGY_LOADER_H_ 00021 00022 #include <Nepomuk/Service> 00023 #include <QtCore/QUrl> 00024 00025 namespace Soprano { 00026 class Model; 00027 } 00028 00029 class KJob; 00030 00031 00032 // Hint: Using QString instead of QUrl for URIs since this API will be exported via DBus and not used otherwise 00033 namespace Nepomuk { 00034 class OntologyLoader : public Nepomuk::Service 00035 { 00036 Q_OBJECT 00037 00038 public: 00039 OntologyLoader( QObject* parent = 0, const QList<QVariant>& args = QList<QVariant>() ); 00040 ~OntologyLoader(); 00041 00042 public Q_SLOTS: 00048 QString findOntologyContext( const QString& uri ); 00049 00053 void updateLocalOntologies(); 00054 00058 void updateAllLocalOntologies(); 00059 00066 void importOntology( const QString& url ); 00067 00068 Q_SIGNALS: 00074 void ontologyUpdated( const QString& uri ); 00075 00081 void ontologyUpdateFailed( const QString& uri, const QString& error ); 00082 00083 private Q_SLOTS: 00084 // a little async updating 00085 void updateNextOntology(); 00086 void slotGraphRetrieverResult( KJob* job ); 00087 00088 private: 00089 class Private; 00090 Private* const d; 00091 }; 00092 } 00093 00094 #endif