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

syndication/rdf

  • syndication
  • rdf
rdfvocab.cpp
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
23#include "rdfvocab.h"
24#include "model.h"
25#include "property.h"
26
27#include <QtCore/QCoreApplication>
28#include <QtCore/QString>
29
30namespace Syndication {
31namespace RDF {
32
33class RDFVocab::RDFVocabPrivate
34{
35 public:
36
37 QString namespaceURI;
38 ResourcePtr seq;
39 PropertyPtr type;
40 PropertyPtr li;
41
42 static RDFVocab *sSelf;
43 static void cleanupRDFVocab()
44 {
45 delete sSelf;
46 sSelf = 0;
47 }
48};
49RDFVocab *RDFVocab::RDFVocabPrivate::sSelf = 0;
50
51RDFVocab* RDFVocab::self()
52{
53 static RDFVocabPrivate p;
54 if(!p.sSelf) {
55 p.sSelf = new RDFVocab;
56 qAddPostRoutine(RDFVocabPrivate::cleanupRDFVocab);
57 }
58 return p.sSelf;
59}
60
61RDFVocab::RDFVocab() : d(new RDFVocabPrivate)
62{
63 QString ns = QLatin1String("http://www.w3.org/1999/02/22-rdf-syntax-ns#");
64
65 d->namespaceURI = ns;
66
67 d->seq = ResourcePtr(new Resource(ns + QLatin1String("Seq")));
68 d->type = PropertyPtr(new Property(ns + QLatin1String("type")));
69 d->li = PropertyPtr(new Property(ns + QLatin1String("li")));
70}
71
72RDFVocab::~RDFVocab()
73{
74 delete d;
75}
76
77ResourcePtr RDFVocab::seq()
78{
79 return d->seq;
80}
81
82PropertyPtr RDFVocab::type()
83{
84 return d->type;
85}
86
87PropertyPtr RDFVocab::li()
88{
89 return d->li;
90}
91
92QString RDFVocab::namespaceURI()
93{
94 return d->namespaceURI;
95}
96
97} // namespace RDF
98} // namespace Syndication
Syndication::RDF::Property
a property is node type that represents properties of things, like "name" is a property of a person,...
Definition: property.h:46
Syndication::RDF::RDFVocab
singleton holding RDF vocabulary, expressed as RDF.
Definition: rdfvocab.h:46
Syndication::RDF::RDFVocab::li
PropertyPtr li()
the rdf:li property, used for list items in RDF containers (like rdf:seq)
Definition: rdfvocab.cpp:87
Syndication::RDF::RDFVocab::type
PropertyPtr type()
the rdf:type property (A rdf:type B means A is instance of B)
Definition: rdfvocab.cpp:82
Syndication::RDF::RDFVocab::~RDFVocab
~RDFVocab()
destructor
Definition: rdfvocab.cpp:72
Syndication::RDF::RDFVocab::self
static RDFVocab * self()
returns the singleton instance
Definition: rdfvocab.cpp:51
Syndication::RDF::RDFVocab::namespaceURI
QString namespaceURI()
the RDF namespace, which is http://www.w3.org/1999/02/22-rdf-syntax-ns#
Definition: rdfvocab.cpp:92
Syndication::RDF::RDFVocab::seq
ResourcePtr seq()
the sequence type
Definition: rdfvocab.cpp:77
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