Soprano 2.9.4
queryresultiterator.h
Go to the documentation of this file.
1/*
2 * This file is part of Soprano Project.
3 *
4 * Copyright (C) 2006 Daniele Galdi <daniele.galdi@gmail.com>
5 * Copyright (C) 2007-2009 Sebastian Trueg <trueg@kde.org>
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public License
18 * along with this library; see the file COPYING.LIB. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21 */
22
23#ifndef SOPRANO_RESULT_SET_H
24#define SOPRANO_RESULT_SET_H
25
26#include "iterator.h"
27#include "bindingset.h"
28#include "statement.h"
29#include "soprano_export.h"
30
31#include <QtCore/QString>
32#include <QtCore/QStringList>
33
34
35namespace Soprano {
36
37 class Node;
38 class NodeIterator;
39 class QueryResultIteratorBackend;
40 class StatementIterator;
41 class BindingSet;
42
108 class SOPRANO_EXPORT QueryResultIterator : public Iterator<BindingSet>
109 {
110 public:
112
116
121
127
132
138
140
145
151
159 bool boolValue() const;
161
163
175 Node operator[]( int offset ) const;
176
189 Node operator[]( const QString name ) const;
190
201 Node binding( const QString &name ) const;
202
213 Node binding( int offset ) const;
214
222 int bindingCount() const;
223
231
233
239 bool isGraph() const;
240
247 bool isBinding() const;
248
257 bool isBool() const;
259
261
266
277
290 NodeIterator iterateBindings( const QString& variableName ) const;
291
304 NodeIterator iterateBindings( int offset ) const;
305
337 const QString& predicateBindingName,
338 const QString& objectBindingName,
339 const QString& contextBindingName = QString(),
340 const Statement& templateStatement = Statement() ) const;
342 };
343}
344
345#endif // SOPRANO_RESULT_SET_H
Represents one set of bindings in the result of a select query.
Definition: bindingset.h:49
The basic Soprano iterator class.
Definition: iterator.h:79
An iterator that provides a stream of Nodes.
Definition: nodeiterator.h:73
A Node represents one RDF resource.
Definition: node.h:54
QueryResultIteratorBackend is the actual working horse behind QueryResultIterator.
An iterator for query results.
QStringList bindingNames() const
QueryResultIterator(QueryResultIteratorBackend *qr)
Node operator[](int offset) const
QList< BindingSet > allBindings()
NodeIterator iterateBindings(const QString &variableName) const
NodeIterator iterateBindings(int offset) const
QueryResultIterator(const QueryResultIterator &)
Node binding(const QString &name) const
Node binding(int offset) const
BindingSet currentBindings() const
StatementIterator iterateStatements() const
QueryResultIterator & operator=(const QueryResultIterator &)
Statement currentStatement() const
StatementIterator iterateStatementsFromBindings(const QString &subjectBindingName, const QString &predicateBindingName, const QString &objectBindingName, const QString &contextBindingName=QString(), const Statement &templateStatement=Statement()) const
Node operator[](const QString name) const
An iterator that provides a stream of Statements.
A Statement instance represents one RDF quadruple.
Definition: statement.h:48
#define SOPRANO_EXPORT