soprano/serializer.h

Go to the documentation of this file.
00001 /* This file is part of Soprano
00002  *
00003  * Copyright (C) 2007 Sebastian Trueg <trueg@kde.org>
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Library General Public License
00016  * along with this library; see the file COPYING.LIB.  If not, write to
00017  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019  */
00020 
00021 #ifndef SOPRANO_SERIALIZER_H
00022 #define SOPRANO_SERIALIZER_H
00023 
00024 #include "plugin.h"
00025 #include "soprano_export.h"
00026 #include "sopranotypes.h"
00027 #include "error.h"
00028 
00029 #include <QtCore/QObject>
00030 
00031 class QTextStream;
00032 
00033 
00034 namespace Soprano
00035 {
00036     class StatementIterator;
00037 
00049     class SOPRANO_EXPORT Serializer : public Plugin, public Error::ErrorCache
00050     {
00051     public:
00052         virtual ~Serializer();
00053 
00061         virtual RdfSerializations supportedSerializations() const = 0;
00062 
00071         virtual QStringList supportedUserSerializations() const;
00072 
00084         bool supportsSerialization( RdfSerialization s, const QString& userSerialization = QString() ) const;
00085 
00098         virtual bool serialize( StatementIterator it, QTextStream& stream, RdfSerialization serialization, const QString& userSerialization = QString() ) const = 0;
00099 
00100     protected:
00101         Serializer( const QString& name );
00102 
00103     private:
00104         class Private;
00105         Private* const d;
00106     };
00107 }
00108 
00109 Q_DECLARE_INTERFACE(Soprano::Serializer, "org.soprano.plugins.Serializer/1.0")
00110 
00111 #endif
00112 

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