• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Nepomuk-Core

  • sources
  • kde-4.12
  • kdelibs
  • nepomuk-core
  • services
  • storage
repository.h
Go to the documentation of this file.
1 /*
2  *
3  * $Id: sourceheader 511311 2006-02-19 14:51:05Z trueg $
4  *
5  * This file is part of the Nepomuk KDE project.
6  * Copyright (C) 2006-2009 Sebastian Trueg <trueg@kde.org>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  * See the file "COPYING" for the exact licensing terms.
13  */
14 
15 #ifndef _REPOSITORY_H_
16 #define _REPOSITORY_H_
17 
18 #include <QtCore/QString>
19 #include <QtCore/QMap>
20 #include <QtCore/QPointer>
21 
22 #include <Soprano/BackendSettings>
23 #include <Soprano/FilterModel>
24 #include <Soprano/Util/DummyModel>
25 
26 
27 namespace Soprano {
28  class Model;
29  class Backend;
30 }
31 
32 class KJob;
33 
34 namespace Nepomuk2 {
35  class DataManagementModel;
36  class DataManagementAdaptor;
37  class ClassAndPropertyTree;
38  class VirtuosoInferenceModel;
39  class OntologyLoader;
40 
53  class Repository : public Soprano::FilterModel
54  {
55  Q_OBJECT
56 
57  public:
58  Repository( const QString& name );
59  ~Repository();
60 
61  QString name() const { return m_name; }
62 
63  QString usedSopranoBackend() const;
64  QString storagePath() const { return m_storagePath; }
65 
66  public Q_SLOTS:
70  void open();
71  void close();
72 
77  void closePublicInterface();
78 
83  void openPublicInterface();
84 
85  Q_SIGNALS:
87  void opened( Repository*, bool success );
88 
90  void loaded( Repository*, bool success );
91  void closed( Repository* );
92 
93  private Q_SLOTS:
94  void slotVirtuosoInitParameters(int port, const QString& version);
95  void slotVirtuosoStopped( bool normalExit );
96  void slotOpened( Repository*, bool success );
97  void slotOntologiesLoaded( bool somethingChanged );
98 
99  private:
100  Soprano::BackendSettings readVirtuosoSettings() const;
101 
102  enum State {
103  CLOSED,
104  OPENING,
105  OPEN,
106  LOADED
107  };
108 
109  QString m_name;
110  State m_state;
111 
112  Soprano::Model* m_model;
113  Nepomuk2::ClassAndPropertyTree* m_classAndPropertyTree;
114  VirtuosoInferenceModel* m_inferenceModel;
115  DataManagementModel* m_dataManagementModel;
116  Nepomuk2::DataManagementAdaptor* m_dataManagementAdaptor;
117  const Soprano::Backend* m_backend;
118 
119  Soprano::Util::DummyModel* m_dummyModel;
120 
121  // the base path for the data. Will contain subfolder:
122  // "data" for the data
123  QString m_basePath;
124  QString m_storagePath;
125  // ------------------------------------------
126 
127  OntologyLoader* m_ontologyLoader;
128  void updateInference(bool ontologiesChanged);
129 
130  int m_port;
131  QString m_virtuosoVersion;
132  };
133 
134  typedef QMap<QString, Repository*> RepositoryMap;
135 }
136 
137 #endif
Nepomuk2::Repository::closed
void closed(Repository *)
Nepomuk2::RepositoryMap
QMap< QString, Repository * > RepositoryMap
Definition: repository.h:134
Nepomuk2::ClassAndPropertyTree
Definition: classandpropertytree.h:45
Nepomuk2::Repository::~Repository
~Repository()
Definition: repository.cpp:78
Nepomuk2::Repository::openPublicInterface
void openPublicInterface()
Registers the datamangement interface this is used to communicate with the rest of world...
Definition: repository.cpp:366
Nepomuk2::Repository::name
QString name() const
Definition: repository.h:61
Nepomuk2::Repository::storagePath
QString storagePath() const
Definition: repository.h:64
Nepomuk2::Repository
Represents the main Nepomuk model.
Definition: repository.h:53
Nepomuk2::DataManagementAdaptor
Definition: datamanagementadaptor.h:47
Nepomuk2::Repository::loaded
void loaded(Repository *, bool success)
Emitted when the ontologies have been loaded, and the repo may be used.
Nepomuk2::Repository::opened
void opened(Repository *, bool success)
Emitted when the Repository successfully opened.
Nepomuk2::Repository::usedSopranoBackend
QString usedSopranoBackend() const
Definition: repository.cpp:231
Nepomuk2::Repository::close
void close()
Definition: repository.cpp:86
Nepomuk2::Repository::closePublicInterface
void closePublicInterface()
Switches off the datamanagement interface that is used to communicate with the rest of the world...
Definition: repository.cpp:354
Nepomuk2::Repository::open
void open()
Will emit the opened signal.
Definition: repository.cpp:118
KJob
Nepomuk2::Repository::Repository
Repository(const QString &name)
Definition: repository.cpp:60
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Nepomuk-Core

Skip menu "Nepomuk-Core"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal