delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / runtime / nepomuk / services / ontologyloader / ontologyupdatejob.h
blob01966c9725dd14097753b044748948e1f5b1ce09
1 /* This file is part of the KDE Project
2 Copyright (c) 2008 Sebastian Trueg <trueg@kde.org>
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
19 #ifndef _NEPOMUK_ONTOLOGY_UPDATE_JOB_H_
20 #define _NEPOMUK_ONTOLOGY_UPDATE_JOB_H_
22 #include <KJob>
24 class QUrl;
25 namespace Soprano {
26 class Model;
27 class StatementIterator;
30 class QDateTime;
32 namespace Nepomuk {
33 class OntologyUpdateJob : public KJob
35 Q_OBJECT
37 public:
38 OntologyUpdateJob( Soprano::Model* mainModel, QObject* parent );
39 ~OntologyUpdateJob();
41 /**
42 * Start the job.
43 * Connect to result() to see if updating
44 * the ontology was successful.
46 void start();
48 /**
49 * Set the ontology's base URI, aka the namespace.
50 * If not set it will be determined from the input
51 * data.
53 void setBaseUri( const QUrl& uri );
55 Soprano::Model* model() const;
57 static QDateTime ontoModificationDate( Soprano::Model* model, const QUrl& uri );
59 protected:
60 /**
61 * Provides the actual ontology data as statements.
63 virtual Soprano::StatementIterator data() = 0;
65 private:
66 class Private;
67 Private* const d;
69 Q_PRIVATE_SLOT( d, void _k_slotFinished() )
73 #endif