• 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
  • libnepomukcore
  • resource
nepomukmainmodel.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Nepomuk KDE project.
3  * Copyright (C) 2008-2010 Sebastian Trueg <trueg@kde.org>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef _NEPOMUK2_MAIN_MODEL_H_
22 #define _NEPOMUK2_MAIN_MODEL_H_
23 
24 #include <Soprano/Model>
25 #include <Soprano/Vocabulary/RDFS>
26 
27 #include <QtCore/QDateTime>
28 
29 namespace Nepomuk2 {
62  class MainModel : public Soprano::Model
63  {
64  Q_OBJECT
65 
66  public:
70  MainModel( QObject* parent = 0 );
71 
75  ~MainModel();
76 
82  bool isValid() const;
83 
90  bool init();
91 
100  void disconnect();
101 
102  Soprano::StatementIterator listStatements( const Soprano::Statement &partial ) const;
103  Soprano::NodeIterator listContexts() const;
104  Soprano::QueryResultIterator executeQuery( const QString& query,
105  Soprano::Query::QueryLanguage language,
106  const QString& userQueryLanguage = QString() ) const;
107  bool containsStatement( const Soprano::Statement &statement ) const;
108  bool containsAnyStatement( const Soprano::Statement &statement ) const;
109  bool isEmpty() const;
110  int statementCount() const;
111  Soprano::Error::ErrorCode addStatement( const Soprano::Statement& statement );
112  Soprano::Error::ErrorCode removeStatement( const Soprano::Statement& statement );
113  Soprano::Error::ErrorCode removeAllStatements( const Soprano::Statement& statement );
114  Soprano::Node createBlankNode();
115 
116  using Model::addStatement;
117  using Model::removeStatement;
118  using Model::removeAllStatements;
119 
120  private:
121  class Private;
122  Private* const d;
123  };
124 }
125 
126 #endif
Nepomuk2::ErrorCode
ErrorCode
Definition: resource.h:44
Nepomuk2::MainModel
The main Nepomuk data storage model.
Definition: nepomukmainmodel.h:62
Nepomuk2::MainModel::createBlankNode
Soprano::Node createBlankNode()
Definition: nepomukmainmodel.cpp:258
Nepomuk2::MainModel::isValid
bool isValid() const
Check the connection to the Nepomuk server.
Definition: nepomukmainmodel.cpp:139
Nepomuk2::MainModel::MainModel
MainModel(QObject *parent=0)
Create a new main model.
Definition: nepomukmainmodel.cpp:125
Nepomuk2::MainModel::containsAnyStatement
bool containsAnyStatement(const Soprano::Statement &statement) const
Definition: nepomukmainmodel.cpp:210
QObject
Nepomuk2::MainModel::init
bool init()
Try connecting to the Nepomuk storage service.
Definition: nepomukmainmodel.cpp:146
Nepomuk2::MainModel::containsStatement
bool containsStatement(const Soprano::Statement &statement) const
Definition: nepomukmainmodel.cpp:202
Nepomuk2::MainModel::addStatement
Soprano::Error::ErrorCode addStatement(const Soprano::Statement &statement)
Definition: nepomukmainmodel.cpp:234
Nepomuk2::MainModel::statementCount
int statementCount() const
Definition: nepomukmainmodel.cpp:226
Nepomuk2::MainModel::listContexts
Soprano::NodeIterator listContexts() const
Definition: nepomukmainmodel.cpp:168
Nepomuk2::MainModel::listStatements
Soprano::StatementIterator listStatements(const Soprano::Statement &partial) const
Definition: nepomukmainmodel.cpp:160
Nepomuk2::MainModel::disconnect
void disconnect()
This function explicitly marks the connection to soprano as disconnected.
Definition: nepomukmainmodel.cpp:152
Nepomuk2::MainModel::~MainModel
~MainModel()
Destructor.
Definition: nepomukmainmodel.cpp:133
Nepomuk2::MainModel::removeStatement
Soprano::Error::ErrorCode removeStatement(const Soprano::Statement &statement)
Definition: nepomukmainmodel.cpp:242
Nepomuk2::MainModel::isEmpty
bool isEmpty() const
Definition: nepomukmainmodel.cpp:218
Nepomuk2::MainModel::executeQuery
Soprano::QueryResultIterator executeQuery(const QString &query, Soprano::Query::QueryLanguage language, const QString &userQueryLanguage=QString()) const
Definition: nepomukmainmodel.cpp:182
Nepomuk2::MainModel::removeAllStatements
Soprano::Error::ErrorCode removeAllStatements(const Soprano::Statement &statement)
Definition: nepomukmainmodel.cpp:250
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