00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef SOPRANO_DUMMY_MODEL_H
00023 #define SOPRANO_DUMMY_MODEL_H
00024
00025 #include "soprano_export.h"
00026 #include "model.h"
00027
00028
00029 namespace Soprano {
00030 namespace Util {
00042 class SOPRANO_EXPORT DummyModel : public Model
00043 {
00044 Q_OBJECT
00045
00046 public:
00050 DummyModel();
00051
00055 ~DummyModel();
00056
00058 Error::ErrorCode addStatement( const Statement &statement );
00059 Error::ErrorCode addStatement( const Node& subject, const Node& predicate, const Node& object, const Node& context = Node() );
00060 Error::ErrorCode addStatements( const QList<Statement> &statements );
00062
00064 Error::ErrorCode removeStatement( const Statement &statement );
00065 Error::ErrorCode removeStatement( const Node& subject, const Node& predicate, const Node& object, const Node& context = Node() );
00066 Error::ErrorCode removeAllStatements( const Statement &statement );
00067 Error::ErrorCode removeStatements( const QList<Statement> &statements );
00068 Error::ErrorCode removeContext( const Node& );
00069 Error::ErrorCode removeAllStatements();
00071
00073 StatementIterator listStatements( const Statement &partial ) const;
00074 StatementIterator listStatements( const Node& subject, const Node& predicate, const Node& object, const Node& context = Node() ) const;
00075 StatementIterator listStatements() const;
00076 StatementIterator listStatementsInContext( const Node &context ) const;
00077 NodeIterator listContexts() const;
00078
00079 QueryResultIterator executeQuery( const QString& query, Query::QueryLanguage language, const QString& userQueryLanguage = QString() ) const;
00081
00083 bool containsAnyStatement( const Statement &statement ) const;
00084 bool containsAnyStatement( const Node& subject, const Node& predicate, const Node& object, const Node& context = Node() ) const;
00085 bool containsStatement( const Statement &statement ) const;
00086 bool containsStatement( const Node& subject, const Node& predicate, const Node& object, const Node& context = Node() ) const;
00087 bool containsContext( const Node &context ) const;
00088 bool isEmpty() const;
00089 int statementCount() const;
00091
00093 Error::ErrorCode write( QTextStream &os ) const;
00095
00097 Node createBlankNode();
00099
00100 private:
00101 class Private;
00102 Private* const d;
00103 };
00104 }
00105 }
00106
00107 #endif