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 
35 namespace 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
soprano_export.h
Soprano::QueryResultIterator::QueryResultIterator
QueryResultIterator(QueryResultIteratorBackend *qr)
Soprano::QueryResultIterator::boolValue
bool boolValue() const
Soprano::QueryResultIterator::isGraph
bool isGraph() const
Soprano::QueryResultIterator::bindingCount
int bindingCount() const
Soprano::QueryResultIterator::currentStatement
Statement currentStatement() const
Soprano::QueryResultIterator::operator[]
Node operator[](const QString name) const
Soprano::Vocabulary::RDF::Statement
SOPRANO_EXPORT QUrl Statement()
Soprano::QueryResultIterator::bindingNames
QStringList bindingNames() const
Soprano::QueryResultIterator::QueryResultIterator
QueryResultIterator(const QueryResultIterator &)
SOPRANO_EXPORT
#define SOPRANO_EXPORT
Definition: soprano_export.h:37
QList
Soprano::QueryResultIterator::isBool
bool isBool() const
Soprano::Statement
A Statement instance represents one RDF quadruple.
Definition: statement.h:48
Soprano::QueryResultIterator::operator=
QueryResultIterator & operator=(const QueryResultIterator &)
Soprano::QueryResultIterator::iterateBindings
NodeIterator iterateBindings(int offset) const
Soprano::QueryResultIterator::iterateStatements
StatementIterator iterateStatements() const
Soprano::QueryResultIterator
An iterator for query results.
Definition: queryresultiterator.h:109
Soprano::QueryResultIterator::iterateStatementsFromBindings
StatementIterator iterateStatementsFromBindings(const QString &subjectBindingName, const QString &predicateBindingName, const QString &objectBindingName, const QString &contextBindingName=QString(), const Statement &templateStatement=Statement()) const
iterator.h
Soprano::QueryResultIterator::allBindings
QList< BindingSet > allBindings()
statement.h
Soprano::QueryResultIterator::currentBindings
BindingSet currentBindings() const
Soprano::QueryResultIterator::QueryResultIterator
QueryResultIterator()
bindingset.h
Soprano::QueryResultIterator::~QueryResultIterator
virtual ~QueryResultIterator()
Soprano::Vocabulary::Xesam::name
SOPRANO_EXPORT QUrl name()
Soprano::StatementIterator
An iterator that provides a stream of Statements.
Definition: statementiterator.h:76
Soprano
Definition: backend.h:36
Soprano::BindingSet
Represents one set of bindings in the result of a select query.
Definition: bindingset.h:49
Soprano::QueryResultIterator::iterateBindings
NodeIterator iterateBindings(const QString &variableName) const
Soprano::QueryResultIterator::operator[]
Node operator[](int offset) const
Soprano::Iterator
The basic Soprano iterator class.
Definition: iterator.h:79
Soprano::QueryResultIterator::binding
Node binding(const QString &name) const
Soprano::NodeIterator
An iterator that provides a stream of Nodes.
Definition: nodeiterator.h:73
Soprano::QueryResultIterator::isBinding
bool isBinding() const
Soprano::QueryResultIterator::binding
Node binding(int offset) const
Soprano::Node
A Node represents one RDF resource.
Definition: node.h:54
QString
Soprano::QueryResultIteratorBackend
QueryResultIteratorBackend is the actual working horse behind QueryResultIterator.
Definition: queryresultiteratorbackend.h:47
QStringList