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
32namespace Soprano {
57 {
58 Q_OBJECT
59
60 public:
62 NRLModel( Model* parent );
64
78 void setIgnoreContext( bool b );
79
86 bool ignoreContext() const;
87
96 void setEnableQueryPrefixExpansion( bool enable );
97
104
114
130
142 QUrl createGraph( const QUrl& type, QUrl* metadataGraph = 0 );
143
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
A FilterModel is a virtual model that wraps another Model.
Definition filtermodel.h:49
A Model is the central class in Soprano. It is a queryable collection of RDF quadruples,...
Definition model.h:95
Model filter that makes working with NRL data simpler.
Definition nrlmodel.h:57
Error::ErrorCode addNrlStatement(const Statement &s)
void setIgnoreContext(bool b)
bool queryPrefixExpansionEnabled() const
QHash< QString, QUrl > queryPrefixes() const
virtual QueryResultIterator executeQuery(const QString &query, Query::QueryLanguage language, const QString &userQueryLanguage=QString()) const
bool ignoreContext() const
QUrl createGraph(const QUrl &type, QUrl *metadataGraph=0)
Error::ErrorCode removeGraph(const QUrl &graph)
NRLModel(Model *parent)
void setEnableQueryPrefixExpansion(bool enable)
virtual Error::ErrorCode removeAllStatements(const Statement &statement)
An iterator for query results.
A Statement instance represents one RDF quadruple.
Definition statement.h:48
#define SOPRANO_EXPORT