soprano/filtermodel.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of Soprano Project.
00003  *
00004  * Copyright (C) 2007 Sebastian Trueg <trueg@kde.org>
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public License
00017  * along with this library; see the file COPYING.LIB.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
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 //    virtual QueryResultIterator executeQuery( const Query::Query& query ) const;
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

Generated on Fri Mar 7 19:00:11 2008 for Soprano by  doxygen 1.5.4