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

syndication/rdf

  • syndication
  • rdf
dublincorevocab.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 "dublincorevocab.h"
24#include "property.h"
25
26#include <QtCore/QCoreApplication>
27#include <QtCore/QString>
28
29namespace Syndication {
30namespace RDF {
31
32class DublinCoreVocab::DublinCoreVocabPrivate
33{
34 public:
35
36 QString namespaceURI;
37 PropertyPtr contributor;
38 PropertyPtr coverage;
39 PropertyPtr creator;
40 PropertyPtr date;
41 PropertyPtr description;
42 PropertyPtr format;
43 PropertyPtr identifier;
44 PropertyPtr language;
45 PropertyPtr publisher;
46 PropertyPtr relation;
47 PropertyPtr rights;
48 PropertyPtr source;
49 PropertyPtr subject;
50 PropertyPtr title;
51 PropertyPtr type;
52
53 static DublinCoreVocab *sSelf;
54 static void cleanupDublinCoreVocab()
55 {
56 delete sSelf;
57 sSelf = 0;
58 }
59};
60DublinCoreVocab *DublinCoreVocab::DublinCoreVocabPrivate::sSelf = 0;
61
62DublinCoreVocab::DublinCoreVocab() : d(new DublinCoreVocabPrivate)
63{
64 QString ns = QLatin1String("http://purl.org/dc/elements/1.1/");
65
66 d->namespaceURI = ns;
67
68 d->contributor = PropertyPtr( new Property(ns + QLatin1String("contributor")) );
69 d->coverage = PropertyPtr( new Property(ns + QLatin1String("coverage")) );
70 d->creator = PropertyPtr( new Property(ns + QLatin1String("creator")) );
71 d->date = PropertyPtr( new Property(ns + QLatin1String("date")) );
72 d->description = PropertyPtr( new Property(ns + QLatin1String("description")) );
73 d->format = PropertyPtr( new Property(ns + QLatin1String("format")) );
74 d->identifier = PropertyPtr( new Property(ns + QLatin1String("identifier")) );
75 d->language = PropertyPtr( new Property(ns + QLatin1String("language")) );
76 d->publisher = PropertyPtr( new Property(ns + QLatin1String("publisher")) );
77 d->relation = PropertyPtr( new Property(ns + QLatin1String("relation")) );
78 d->rights = PropertyPtr( new Property(ns + QLatin1String("rights")) );
79 d->source = PropertyPtr( new Property(ns + QLatin1String("source")) );
80 d->subject = PropertyPtr( new Property(ns + QLatin1String("subject")) );
81 d->title = PropertyPtr( new Property(ns + QLatin1String("title")) );
82 d->type = PropertyPtr( new Property(ns + QLatin1String("type")) );
83
84}
85
86DublinCoreVocab::~DublinCoreVocab()
87{
88 delete d;
89}
90
91DublinCoreVocab* DublinCoreVocab::self()
92{
93 static DublinCoreVocabPrivate p;
94 if(!p.sSelf) {
95 p.sSelf = new DublinCoreVocab;
96 qAddPostRoutine(DublinCoreVocabPrivate::cleanupDublinCoreVocab);
97 }
98 return p.sSelf;
99}
100
101const QString& DublinCoreVocab::namespaceURI() const
102{
103 return d->namespaceURI;
104}
105
106PropertyPtr DublinCoreVocab::contributor() const
107{
108 return d->contributor;
109}
110
111PropertyPtr DublinCoreVocab::creator() const
112{
113 return d->creator;
114}
115
116PropertyPtr DublinCoreVocab::coverage() const
117{
118 return d->coverage;
119}
120
121PropertyPtr DublinCoreVocab::date() const
122{
123 return d->date;
124}
125
126PropertyPtr DublinCoreVocab::description() const
127{
128 return d->description;
129}
130
131PropertyPtr DublinCoreVocab::format() const
132{
133 return d->format;
134}
135
136PropertyPtr DublinCoreVocab::identifier() const
137{
138 return d->identifier;
139}
140
141PropertyPtr DublinCoreVocab::language() const
142{
143 return d->language;
144}
145
146PropertyPtr DublinCoreVocab::publisher() const
147{
148 return d->publisher;
149}
150
151PropertyPtr DublinCoreVocab::relation() const
152{
153 return d->relation;
154}
155
156PropertyPtr DublinCoreVocab::rights() const
157{
158 return d->rights;
159}
160
161PropertyPtr DublinCoreVocab::source() const
162{
163 return d->source;
164}
165
166PropertyPtr DublinCoreVocab::subject() const
167{
168 return d->subject;
169}
170
171PropertyPtr DublinCoreVocab::title() const
172{
173 return d->title;
174}
175
176PropertyPtr DublinCoreVocab::type() const
177{
178 return d->type;
179}
180
181} // namespace RDF
182} // namespace Syndication
Syndication::RDF::DublinCoreVocab
Singleton holding RDF class and property constants of the Dublin Core vocabulary.
Definition: dublincorevocab.h:41
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