• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

syndication/rdf

  • syndication
  • rdf
model.h
1/*
2 * This file is part of the syndication library
3 *
4 * Copyright (C) 2006 Frank Osterfeld <osterfeld@kde.org>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 *
21 */
22#ifndef SYNDICATION_RDF_MODEL_H
23#define SYNDICATION_RDF_MODEL_H
24
25#include <syndication/rdf/document.h>
26#include <syndication/rdf/resource.h>
27#include <syndication/rdf/statement.h>
28
29#include <syndication/rdf/literal.h>
30#include <syndication/rdf/node.h>
31#include <syndication/rdf/property.h>
32#include <syndication/rdf/sequence.h>
33#include <boost/shared_ptr.hpp>
34#include <syndication/ksyndication_export.h>
35
36#include <QtCore/QString>
37
38template <class T> class QList;
39
40namespace Syndication {
41namespace RDF {
42
49class SYNDICATION_EXPORT Model
50{
51 friend class ::Syndication::RDF::Document;
52 friend class ::Syndication::RDF::Document::Private;
53 friend class ::Syndication::RDF::Resource;
54 friend class ::Syndication::RDF::Resource::ResourcePrivate;
55 friend class ::Syndication::RDF::Statement;
56 friend class ::Syndication::RDF::Statement::StatementPrivate;
57
58 public:
59
64 Model();
65
74 Model(const Model& other);
75
79 virtual ~Model();
80
88 Model& operator=(const Model& other);
89
99 bool operator==(const Model& other) const;
100
110 virtual ResourcePtr createResource(const QString& uri=QString());
111
121 virtual PropertyPtr createProperty(const QString& uri);
122
132 virtual SequencePtr createSequence(const QString& uri=QString());
133
140 virtual LiteralPtr createLiteral(const QString& text);
141
151 virtual StatementPtr addStatement(ResourcePtr subject,
152 PropertyPtr predicate,
153 NodePtr object);
154
162 virtual void removeStatement(ResourcePtr subject,
163 PropertyPtr predicate,
164 NodePtr object);
165
171 virtual void removeStatement(StatementPtr statement);
172
176 virtual bool isEmpty() const;
177
184 virtual QList<ResourcePtr> resourcesWithType(ResourcePtr type) const;
185
190 virtual QList<StatementPtr> statements() const;
191
199 virtual NodePtr nodeByID(uint id) const;
200
208 virtual ResourcePtr resourceByID(uint id) const;
209
217 virtual PropertyPtr propertyByID(uint id) const;
218
226 virtual LiteralPtr literalByID(uint id) const;
227//@cond PRIVATE
232 virtual bool resourceHasProperty(const Resource* resource,
233 PropertyPtr property) const;
234
239 virtual StatementPtr resourceProperty(const Resource* resource,
240 PropertyPtr property) const;
241
246 virtual QList<StatementPtr> resourceProperties(const Resource* resource,
247 PropertyPtr property) const;
248
249//@endcond
256 virtual QString debugInfo() const;
257
258 private:
259 class ModelPrivate;
260 boost::shared_ptr<ModelPrivate> d;
261};
262
263
264} // namespace RDF
265} // namespace Syndication
266
267#endif // SYNDICATION_RDF_MODEL_H
Syndication::RDF::Model
An RDF model, a set of RDF statements.
Definition: model.h:50
Syndication::RDF::Resource
Resources are the entities in the RDF graph.
Definition: resource.h:52
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

syndication/rdf

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

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal