• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

syndication/rdf

model.h

00001 /*
00002  * This file is part of the syndication library
00003  *
00004  * Copyright (C) 2006 Frank Osterfeld <osterfeld@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 SYNDICATION_RDF_MODEL_H
00023 #define SYNDICATION_RDF_MODEL_H
00024 
00025 #include <syndication/rdf/document.h>
00026 #include <syndication/rdf/resource.h>
00027 #include <syndication/rdf/statement.h>
00028 
00029 #include <syndication/rdf/literal.h>
00030 #include <syndication/rdf/node.h>
00031 #include <syndication/rdf/property.h>
00032 #include <syndication/rdf/sequence.h>
00033 #include <syndication/rdf/statement.h>
00034 #include <boost/shared_ptr.hpp>
00035 #include <syndication/ksyndication_export.h>
00036 
00037 #include <QtCore/QString>
00038 
00039 template <class T> class QList;
00040 
00041 namespace Syndication {
00042 namespace RDF {
00043 
00050 class SYNDICATION_EXPORT Model
00051 {
00052     friend class ::Syndication::RDF::Document;
00053     friend class ::Syndication::RDF::Document::Private;
00054     friend class ::Syndication::RDF::Resource;
00055     friend class ::Syndication::RDF::Resource::ResourcePrivate;
00056     friend class ::Syndication::RDF::Statement;
00057     friend class ::Syndication::RDF::Statement::StatementPrivate;
00058 
00059     public:
00060 
00065         Model();
00066 
00075         Model(const Model& other);
00076 
00080         virtual ~Model();
00081 
00089         Model& operator=(const Model& other);
00090 
00100         bool operator==(const Model& other) const;
00101 
00111         virtual ResourcePtr createResource(const QString& uri=QString());
00112 
00122         virtual PropertyPtr createProperty(const QString& uri);
00123 
00133         virtual SequencePtr createSequence(const QString& uri=QString());
00134 
00141         virtual LiteralPtr createLiteral(const QString& text);
00142 
00152         virtual StatementPtr addStatement(ResourcePtr subject,
00153                                           PropertyPtr predicate,
00154                                           NodePtr object);
00155 
00163         virtual void removeStatement(ResourcePtr subject,
00164                                      PropertyPtr predicate,
00165                                      NodePtr object);
00166 
00172         virtual void removeStatement(StatementPtr statement);
00173 
00177         virtual bool isEmpty() const;
00178 
00185         virtual QList<ResourcePtr> resourcesWithType(ResourcePtr type) const;
00186 
00191         virtual QList<StatementPtr> statements() const;
00192 
00200         virtual NodePtr nodeByID(uint id) const;
00201 
00209         virtual ResourcePtr resourceByID(uint id) const;
00210 
00218         virtual PropertyPtr propertyByID(uint id) const;
00219 
00227         virtual LiteralPtr literalByID(uint id) const;
00228 //@cond PRIVATE
00233         virtual bool resourceHasProperty(const Resource* resource,
00234                                          PropertyPtr property) const;
00235 
00240         virtual StatementPtr resourceProperty(const Resource* resource,
00241                                               PropertyPtr property) const;
00242 
00247         virtual QList<StatementPtr> resourceProperties(const Resource* resource,
00248                                               PropertyPtr property) const;
00249 
00250 //@endcond
00257         virtual QString debugInfo() const;
00258 
00259     private:
00260         class ModelPrivate;
00261         boost::shared_ptr<ModelPrivate> d;
00262 };
00263 
00264 
00265 } // namespace RDF
00266 } // namespace Syndication
00267 
00268 #endif // SYNDICATION_RDF_MODEL_H

syndication/rdf

Skip menu "syndication/rdf"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.8
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal