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 
31 namespace 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 
179  const QString& userQueryLanguage = QString() ) const;
180 
181 
182 
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;
254  using Model::listStatements;
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
soprano_export.h
Soprano::Client::SparqlModel::removeAllStatements
Error::ErrorCode removeAllStatements(const Statement &statement)
Soprano::Client::SparqlModel::setHost
void setHost(const QString &host, quint16 port=80)
Soprano::Model::listStatements
StatementIterator listStatements() const
Soprano::Util::AsyncResult
A delayed result as returned by AsyncModel.
Definition: asyncresult.h:53
Soprano::Client::SparqlModel::addStatement
Error::ErrorCode addStatement(const Statement &statement)
model.h
Soprano::Client::SparqlModel::executeQuery
Soprano::QueryResultIterator executeQuery(const QString &query, Query::QueryLanguage language=Query::QueryLanguageSparql, const QString &userQueryLanguage=QString()) const
Soprano::Model::addStatement
virtual Error::ErrorCode addStatement(const Statement &statement)=0
Soprano::Query::QueryLanguage
QueryLanguage
Definition: sopranotypes.h:129
asyncresult.h
Soprano::Client::SparqlModel::~SparqlModel
~SparqlModel()
Soprano::Client::SparqlModel::listContextsAsync
Soprano::Util::AsyncResult * listContextsAsync() const
Soprano::Statement
A Statement instance represents one RDF quadruple.
Definition: statement.h:48
Soprano::Client::SparqlModel::SparqlModel
SparqlModel(const QString &host=QString(), quint16 port=80, const QString &user=QString(), const QString &password=QString())
Soprano::Client::SparqlModel::executeQueryAsync
Soprano::Util::AsyncResult * executeQueryAsync(const QString &query, Query::QueryLanguage language=Query::QueryLanguageSparql, const QString &userQueryLanguage=QString()) const
SOPRANO_CLIENT_EXPORT
#define SOPRANO_CLIENT_EXPORT
Definition: soprano_export.h:63
Soprano::Query::QueryLanguageSparql
@ QueryLanguageSparql
Definition: sopranotypes.h:131
Soprano::Model::removeStatement
virtual Error::ErrorCode removeStatement(const Statement &statement)=0
Soprano::QueryResultIterator
An iterator for query results.
Definition: queryresultiterator.h:109
Soprano::Client::SparqlModel::setUser
void setUser(const QString &user, const QString &password=QString())
Soprano::Client::SparqlModel::setPath
void setPath(const QString &path)
Soprano::Client::SparqlModel::statementCount
int statementCount() const
Soprano::Client::SparqlModel::removeStatement
Error::ErrorCode removeStatement(const Statement &statement)
Soprano::Model::removeAllStatements
Error::ErrorCode removeAllStatements()
Soprano::Client::SparqlModel::containsStatement
bool containsStatement(const Statement &statement) const
Soprano::Model
A Model is the central class in Soprano. It is a queryable collection of RDF quadruples,...
Definition: model.h:95
Soprano::Client::SparqlModel::isEmpty
bool isEmpty() const
Soprano::Client::SparqlModel::listContexts
NodeIterator listContexts() const
Soprano::StatementIterator
An iterator that provides a stream of Statements.
Definition: statementiterator.h:76
Soprano
Definition: backend.h:36
Soprano::Model::containsStatement
virtual bool containsStatement(const Statement &statement) const =0
Soprano::Client::SparqlModel
Remote client Model for Http SPARQL end points.
Definition: sparqlmodel.h:51
Soprano::Model::containsAnyStatement
virtual bool containsAnyStatement(const Statement &statement) const =0
Soprano::Client::SparqlModel::createBlankNode
Node createBlankNode()
Soprano::NodeIterator
An iterator that provides a stream of Nodes.
Definition: nodeiterator.h:73
Soprano::Node
A Node represents one RDF resource.
Definition: node.h:54
Soprano::Error::ErrorCode
ErrorCode
Definition: error.h:40
QString
Soprano::Vocabulary::Xesam::language
SOPRANO_EXPORT QUrl language()
Soprano::Client::SparqlModel::containsAnyStatement
bool containsAnyStatement(const Statement &statement) const
Soprano::Client::SparqlModel::listStatements
Soprano::StatementIterator listStatements(const Statement &partial) const
QByteArray
Soprano::Client::SparqlModel::listStatementsAsync
Soprano::Util::AsyncResult * listStatementsAsync(const Statement &statement) const