Soprano  2.9.4
dummymodel.h
Go to the documentation of this file.
1 /*
2  * This file is part of Soprano Project.
3  *
4  * Copyright (C) 2007 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 Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 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  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library 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_DUMMY_MODEL_H
23 #define SOPRANO_DUMMY_MODEL_H
24 
25 #include "soprano_export.h"
26 #include "model.h"
27 
28 
29 namespace Soprano {
30  namespace Util {
43  {
44  Q_OBJECT
45 
46  public:
51 
56 
59  Error::ErrorCode addStatement( const Node& subject, const Node& predicate, const Node& object, const Node& context = Node() );
62 
65  Error::ErrorCode removeStatement( const Node& subject, const Node& predicate, const Node& object, const Node& context = Node() );
71 
73  StatementIterator listStatements( const Statement &partial ) const;
74  StatementIterator listStatements( const Node& subject, const Node& predicate, const Node& object, const Node& context = Node() ) const;
78 // QueryResultIterator executeQuery( const Query::Query& query ) const;
79  QueryResultIterator executeQuery( const QString& query, Query::QueryLanguage language, const QString& userQueryLanguage = QString() ) const;
81 
83  bool containsAnyStatement( const Statement &statement ) const;
84  bool containsAnyStatement( const Node& subject, const Node& predicate, const Node& object, const Node& context = Node() ) const;
85  bool containsStatement( const Statement &statement ) const;
86  bool containsStatement( const Node& subject, const Node& predicate, const Node& object, const Node& context = Node() ) const;
87  bool containsContext( const Node &context ) const;
88  bool isEmpty() const;
89  int statementCount() const;
91 
95 
99 
100  private:
101  class Private;
102  Private* const d;
103  };
104  }
105 }
106 
107 #endif
Soprano::Util::DummyModel::addStatement
Error::ErrorCode addStatement(const Statement &statement)
soprano_export.h
Soprano::Vocabulary::RDF::subject
SOPRANO_EXPORT QUrl subject()
Soprano::Util::DummyModel::listStatementsInContext
StatementIterator listStatementsInContext(const Node &context) const
model.h
Soprano::Util::DummyModel::write
Error::ErrorCode write(QTextStream &os) const
Soprano::Util::DummyModel
A dummy model. All its methods do nothing and always fail with a default error.
Definition: dummymodel.h:43
Soprano::Util::DummyModel::removeAllStatements
Error::ErrorCode removeAllStatements(const Statement &statement)
Soprano::Util::DummyModel::removeContext
Error::ErrorCode removeContext(const Node &)
Soprano::Query::QueryLanguage
QueryLanguage
Definition: sopranotypes.h:129
Soprano::Vocabulary::RDF::predicate
SOPRANO_EXPORT QUrl predicate()
Soprano::Util::DummyModel::listStatements
StatementIterator listStatements() const
Soprano::Util::DummyModel::addStatement
Error::ErrorCode addStatement(const Node &subject, const Node &predicate, const Node &object, const Node &context=Node())
SOPRANO_EXPORT
#define SOPRANO_EXPORT
Definition: soprano_export.h:37
QList
Soprano::Util::DummyModel::statementCount
int statementCount() const
Soprano::Util::DummyModel::removeStatements
Error::ErrorCode removeStatements(const QList< Statement > &statements)
Soprano::Statement
A Statement instance represents one RDF quadruple.
Definition: statement.h:48
Soprano::Util::DummyModel::containsAnyStatement
bool containsAnyStatement(const Statement &statement) const
Soprano::Util::DummyModel::removeStatement
Error::ErrorCode removeStatement(const Statement &statement)
Soprano::Util::DummyModel::listStatements
StatementIterator listStatements(const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const
Soprano::Util::DummyModel::listStatements
StatementIterator listStatements(const Statement &partial) const
QTextStream
Soprano::Util::DummyModel::isEmpty
bool isEmpty() const
Soprano::Util::DummyModel::containsStatement
bool containsStatement(const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const
Soprano::Util::DummyModel::containsAnyStatement
bool containsAnyStatement(const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const
Soprano::Util::DummyModel::createBlankNode
Node createBlankNode()
Soprano::QueryResultIterator
An iterator for query results.
Definition: queryresultiterator.h:109
Soprano::Model
A Model is the central class in Soprano. It is a queryable collection of RDF quadruples,...
Definition: model.h:95
Soprano::Util::DummyModel::~DummyModel
~DummyModel()
Soprano::Util::DummyModel::containsStatement
bool containsStatement(const Statement &statement) const
Soprano::StatementIterator
An iterator that provides a stream of Statements.
Definition: statementiterator.h:76
Soprano::Util::DummyModel::DummyModel
DummyModel()
Soprano
Definition: backend.h:36
Soprano::Util::DummyModel::executeQuery
QueryResultIterator executeQuery(const QString &query, Query::QueryLanguage language, const QString &userQueryLanguage=QString()) const
Soprano::Util::DummyModel::listContexts
NodeIterator listContexts() const
Soprano::NodeIterator
An iterator that provides a stream of Nodes.
Definition: nodeiterator.h:73
Soprano::Util::DummyModel::addStatements
Error::ErrorCode addStatements(const QList< Statement > &statements)
Soprano::Node
A Node represents one RDF resource.
Definition: node.h:54
Soprano::Error::ErrorCode
ErrorCode
Definition: error.h:40
Soprano::Util::DummyModel::containsContext
bool containsContext(const Node &context) const
QString
Soprano::Vocabulary::Xesam::language
SOPRANO_EXPORT QUrl language()
Soprano::Vocabulary::SIL::context
SOPRANO_EXPORT QUrl context()
Soprano::Util::DummyModel::removeStatement
Error::ErrorCode removeStatement(const Node &subject, const Node &predicate, const Node &object, const Node &context=Node())
Soprano::Util::DummyModel::removeAllStatements
Error::ErrorCode removeAllStatements()