Soprano 2.9.4
asyncquery.h
Go to the documentation of this file.
1/*
2 * This file is part of Soprano Project.
3 *
4 * Copyright (C) 2009 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 Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 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 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser 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_UTIL_ASYNC_QUERY_H_
23#define _SOPRANO_UTIL_ASYNC_QUERY_H_
24
25#include <QtCore/QObject>
26#include "error.h"
27#include "sopranotypes.h"
28#include "soprano_export.h"
29
30namespace Soprano {
31
32 class Statement;
33 class BindingSet;
34 class Node;
35 class Model;
36
37 namespace Util {
77 {
78 Q_OBJECT
79
80 public:
89
91
96
102
110 bool boolValue() const;
112
114
124 Node binding( const QString &name ) const;
125
136 Node binding( int offset ) const;
137
145 int bindingCount() const;
146
154
156
162 bool isGraph() const;
163
170 bool isBinding() const;
171
181 bool isBool() const;
183
184 public Q_SLOTS:
193 bool next();
194
202 void close();
203
204 Q_SIGNALS:
214
227
228 public:
245 const QString& query,
246 Query::QueryLanguage language,
247 const QString& userQueryLanguage = QString() );
248
249 private:
250 AsyncQuery();
251
252 class Private;
253 Private* const d;
254
255 Q_PRIVATE_SLOT( d, void _s_finished() )
256 Q_PRIVATE_SLOT( d, void _s_emitNextReady() )
257 };
258 }
259}
260
261#endif
Represents one set of bindings in the result of a select query.
Definition: bindingset.h:49
Core class of Soprano's exception system.
Definition: error.h:235
A Model is the central class in Soprano. It is a queryable collection of RDF quadruples,...
Definition: model.h:95
A Node represents one RDF resource.
Definition: node.h:54
A Statement instance represents one RDF quadruple.
Definition: statement.h:48
A wrapper around Soprano::Model which executes a query in a separate thread and allows to iterate the...
Definition: asyncquery.h:77
Node binding(int offset) const
Node binding(const QString &name) const
void finished(Soprano::Util::AsyncQuery *query)
QStringList bindingNames() const
Statement currentStatement() const
BindingSet currentBindings() const
static AsyncQuery * executeQuery(Soprano::Model *model, const QString &query, Query::QueryLanguage language, const QString &userQueryLanguage=QString())
void nextReady(Soprano::Util::AsyncQuery *query)
SOPRANO_EXPORT QUrl Statement()
#define SOPRANO_EXPORT