Soprano  2.9.4
nrlmodel.h
Go to the documentation of this file.
1 /*
2  * This file is part of Soprano Project.
3  *
4  * Copyright (C) 2007-2011 Sebastian Trueg <trueg@kde.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public License
17  * along with this library; see the file COPYING.LIB. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef _SOPRANO_NRL_MODEL_H_
23 #define _SOPRANO_NRL_MODEL_H_
24 
25 #include "filtermodel.h"
26 #include "soprano_export.h"
27 
28 #ifndef USING_SOPRANO_NRLMODEL_UNSTABLE_API
29 #error The Soprano::NrlModel API is subject to change. This has to be acnowledged by defining USING_SOPRANO_NRLMODEL_UNSTABLE_API
30 #endif
31 
32 namespace Soprano {
57  {
58  Q_OBJECT
59 
60  public:
61  NRLModel();
62  NRLModel( Model* parent );
63  ~NRLModel();
64 
78  void setIgnoreContext( bool b );
79 
86  bool ignoreContext() const;
87 
96  void setEnableQueryPrefixExpansion( bool enable );
97 
103  bool queryPrefixExpansionEnabled() const;
104 
113  QHash<QString, QUrl> queryPrefixes() const;
114 
129  Error::ErrorCode addNrlStatement( const Statement& s );
130 
142  QUrl createGraph( const QUrl& type, QUrl* metadataGraph = 0 );
143 
151  Error::ErrorCode removeGraph( const QUrl& graph );
152 
159  virtual QueryResultIterator executeQuery( const QString& query, Query::QueryLanguage language, const QString& userQueryLanguage = QString() ) const;
160 
169  virtual Error::ErrorCode removeAllStatements( const Statement& statement );
170 
171  private:
172  class Private;
173  Private* const d;
174  };
175 }
176 
177 #endif