00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _SOPRANO_FILTER_MODEL_H_
00023 #define _SOPRANO_FILTER_MODEL_H_
00024
00025 #include "model.h"
00026 #include "soprano_export.h"
00027
00028
00029 namespace Soprano {
00048 class SOPRANO_EXPORT FilterModel : public Model
00049 {
00050 Q_OBJECT
00051
00052 public:
00056 virtual ~FilterModel();
00057
00059
00063 virtual void setParentModel( Model* model );
00064
00069 virtual Model* parentModel() const;
00071
00073
00076 virtual Error::ErrorCode addStatement( const Statement &statement );
00078
00080
00083 virtual Error::ErrorCode removeStatement( const Statement &statement );
00084
00088 virtual Error::ErrorCode removeAllStatements( const Statement &statement );
00090
00092
00095 virtual StatementIterator listStatements( const Statement &partial ) const;
00096
00100 virtual NodeIterator listContexts() const;
00101
00105
00106
00110 virtual QueryResultIterator executeQuery( const QString& query, Query::QueryLanguage language, const QString& userQueryLanguage = QString() ) const;
00112
00114
00117 virtual bool containsStatement( const Statement &statement ) const;
00118
00122 virtual bool containsAnyStatement( const Statement &statement ) const;
00124
00126
00129 virtual bool isEmpty() const;
00130
00134 virtual int statementCount() const;
00136
00138
00141 virtual Error::ErrorCode write( QTextStream &os ) const;
00143
00145
00148 virtual Node createBlankNode();
00150
00151 protected:
00155 FilterModel();
00156
00162 FilterModel( Model* parent );
00163
00169 virtual void parentStatementsAdded();
00170
00176 virtual void parentStatementsRemoved();
00177
00183 virtual void parentStatementAdded( const Statement& );
00184
00190 virtual void parentStatementRemoved( const Statement& );
00191
00192 private Q_SLOTS:
00197 void slotStatementsAdded();
00198
00203 void slotStatementsRemoved();
00204
00209 void slotStatementAdded( const Soprano::Statement& );
00210
00215 void slotStatementRemoved( const Soprano::Statement& );
00216
00217 private:
00218 class Private;
00219 Private* const d;
00220 };
00221 }
00222
00223 #endif