• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

NepomukDaemons

repository.h

Go to the documentation of this file.
00001 /*
00002  *
00003  * $Id: sourceheader 511311 2006-02-19 14:51:05Z trueg $
00004  *
00005  * This file is part of the Nepomuk KDE project.
00006  * Copyright (C) 2006-2007 Sebastian Trueg <trueg@kde.org>
00007  *
00008  * This program is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  * See the file "COPYING" for the exact licensing terms.
00013  */
00014 
00015 #ifndef _REPOSITORY_H_
00016 #define _REPOSITORY_H_
00017 
00018 #include <QtCore/QString>
00019 #include <QtCore/QMap>
00020 
00021 #include <soprano/version.h>
00022 
00023 #ifndef SOPRANO_IS_VERSION
00024 #define SOPRANO_IS_VERSION(a,b,c) false
00025 #endif
00026 
00027 #if SOPRANO_IS_VERSION(2,0,90)
00028 #include <Soprano/Util/SignalCacheModel>
00029 #else
00030 #include <Soprano/FilterModel>
00031 #endif
00032 
00033 
00034 namespace Soprano {
00035     class Model;
00036     class Backend;
00037     namespace Index {
00038         class IndexFilterModel;
00039         class CLuceneIndex;
00040     }
00041 }
00042 
00043 class KJob;
00044 
00045 namespace Nepomuk {
00046 
00047     class CLuceneAnalyzer;
00048 
00049     class Repository : public
00050 #if SOPRANO_IS_VERSION(2,0,90)
00051         Soprano::Util::SignalCacheModel
00052 #else
00053         Soprano::FilterModel
00054 #endif
00055     {
00056         Q_OBJECT
00057 
00058     public:
00059         Repository( const QString& name );
00060         ~Repository();
00061 
00062         QString name() const { return m_name; }
00063 
00064         enum State {
00065             CLOSED,
00066             OPENING,
00067             OPEN
00068         };
00069 
00070         State state() const;
00071 
00072         static const Soprano::Backend* activeSopranoBackend();
00073 
00074     public Q_SLOTS:
00078         void open();
00079 
00080         void close();
00081 
00082     Q_SIGNALS:
00083         void opened( Repository*, bool success );
00084 
00085     private Q_SLOTS:
00086         void copyFinished( KJob* job );
00087 
00088     private:
00089         QString m_name;
00090         State m_state;
00091 
00092         // the base path for the data. Will contain subfolders:
00093         // "index" for the fulltext index
00094         // "data" for the data
00095         QString m_basePath;
00096 
00097         const Soprano::Backend* m_oldStorageBackend;
00098         QString m_oldStoragePath;
00099 
00100         Soprano::Model* m_model;
00101         Nepomuk::CLuceneAnalyzer* m_analyzer;
00102         Soprano::Index::CLuceneIndex* m_index;
00103         Soprano::Index::IndexFilterModel* m_indexModel;
00104     };
00105 
00106     typedef QMap<QString, Repository*> RepositoryMap;
00107 }
00108 
00109 #endif

NepomukDaemons

Skip menu "NepomukDaemons"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KCMShell
  • KNotify
  • KStyles
  • Nepomuk Daemons
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal