Soprano 2.9.4
sparqlmodel.h
Go to the documentation of this file.
1/*
2 * This file is part of Soprano Project.
3 *
4 * Copyright (C) 2007 Rajeev J Sebastian <rajeev.sebastian@gmail.com>
5 * Copyright (C) 2008-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_SPARQL_MODEL_H_
24#define _SOPRANO_SPARQL_MODEL_H_
25
26#include "model.h"
27#include "soprano_export.h"
28#include "asyncresult.h"
29
30
31namespace Soprano {
32 namespace Client {
51 {
52 Q_OBJECT
53
54 public:
66 SparqlModel( const QString& host = QString(),
67 quint16 port = 80,
68 const QString& user = QString(),
69 const QString& password = QString() );
70
75
77
84 void setHost( const QString& host, quint16 port = 80 );
85
93 void setUser( const QString& user, const QString& password = QString() );
94
102 void setPath( const QString& path );
104
106
118
131
147
149
153
165
178 Query::QueryLanguage language = Query::QueryLanguageSparql,
179 const QString& userQueryLanguage = QString() ) const;
180
181
182
197 Query::QueryLanguage language = Query::QueryLanguageSparql,
198 const QString& userQueryLanguage = QString() ) const;
199
204
216
220 bool containsStatement( const Statement& statement ) const;
221
225 bool containsAnyStatement( const Statement& statement ) const;
227
229
234 int statementCount() const;
235
241 bool isEmpty() const;
243
250
251 using Model::addStatement;
252 using Model::removeStatement;
253 using Model::removeAllStatements;
254 using Model::listStatements;
255 using Model::containsStatement;
256 using Model::containsAnyStatement;
257
258 private Q_SLOTS:
259 void slotRequestFinished( int id, bool error, const QByteArray& data );
260
261 private:
262 class Private;
263 Private* const d;
264 };
265 }
266}
267
268#endif
Remote client Model for Http SPARQL end points.
Definition: sparqlmodel.h:51
Error::ErrorCode addStatement(const Statement &statement)
Soprano::QueryResultIterator executeQuery(const QString &query, Query::QueryLanguage language=Query::QueryLanguageSparql, const QString &userQueryLanguage=QString()) const
Soprano::Util::AsyncResult * executeQueryAsync(const QString &query, Query::QueryLanguage language=Query::QueryLanguageSparql, const QString &userQueryLanguage=QString()) const
bool containsAnyStatement(const Statement &statement) const
Error::ErrorCode removeAllStatements(const Statement &statement)
void setHost(const QString &host, quint16 port=80)
void setUser(const QString &user, const QString &password=QString())
SparqlModel(const QString &host=QString(), quint16 port=80, const QString &user=QString(), const QString &password=QString())
Soprano::Util::AsyncResult * listStatementsAsync(const Statement &statement) const
bool containsStatement(const Statement &statement) const
Error::ErrorCode removeStatement(const Statement &statement)
Soprano::Util::AsyncResult * listContextsAsync() const
NodeIterator listContexts() const
void setPath(const QString &path)
Soprano::StatementIterator listStatements(const Statement &partial) const
A Model is the central class in Soprano. It is a queryable collection of RDF quadruples,...
Definition: model.h:95
An iterator that provides a stream of Nodes.
Definition: nodeiterator.h:73
A Node represents one RDF resource.
Definition: node.h:54
An iterator for query results.
An iterator that provides a stream of Statements.
A Statement instance represents one RDF quadruple.
Definition: statement.h:48
A delayed result as returned by AsyncModel.
Definition: asyncresult.h:53
#define SOPRANO_CLIENT_EXPORT