Syndication

dublincorevocab.cpp
1 /*
2  This file is part of the syndication library
3  SPDX-FileCopyrightText: 2006 Frank Osterfeld <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #include "dublincorevocab.h"
9 #include "property.h"
10 
11 #include <QCoreApplication>
12 #include <QString>
13 
14 namespace Syndication
15 {
16 namespace RDF
17 {
18 class SYNDICATION_NO_EXPORT DublinCoreVocab::DublinCoreVocabPrivate
19 {
20 public:
21  QString namespaceURI;
22  PropertyPtr contributor;
23  PropertyPtr coverage;
24  PropertyPtr creator;
25  PropertyPtr date;
26  PropertyPtr description;
27  PropertyPtr format;
28  PropertyPtr identifier;
29  PropertyPtr language;
30  PropertyPtr publisher;
31  PropertyPtr relation;
32  PropertyPtr rights;
33  PropertyPtr source;
34  PropertyPtr subject;
35  PropertyPtr title;
36  PropertyPtr type;
37 
38  static DublinCoreVocab *sSelf;
39  static void cleanupDublinCoreVocab()
40  {
41  delete sSelf;
42  sSelf = nullptr;
43  }
44 };
45 DublinCoreVocab *DublinCoreVocab::DublinCoreVocabPrivate::sSelf = nullptr;
46 
47 DublinCoreVocab::DublinCoreVocab()
48  : d(new DublinCoreVocabPrivate)
49 {
50  QString ns = QStringLiteral("http://purl.org/dc/elements/1.1/");
51 
52  d->namespaceURI = ns;
53 
54  d->contributor = PropertyPtr(new Property(ns + QLatin1String("contributor")));
55  d->coverage = PropertyPtr(new Property(ns + QLatin1String("coverage")));
56  d->creator = PropertyPtr(new Property(ns + QLatin1String("creator")));
57  d->date = PropertyPtr(new Property(ns + QLatin1String("date")));
58  d->description = PropertyPtr(new Property(ns + QLatin1String("description")));
59  d->format = PropertyPtr(new Property(ns + QLatin1String("format")));
60  d->identifier = PropertyPtr(new Property(ns + QLatin1String("identifier")));
61  d->language = PropertyPtr(new Property(ns + QLatin1String("language")));
62  d->publisher = PropertyPtr(new Property(ns + QLatin1String("publisher")));
63  d->relation = PropertyPtr(new Property(ns + QLatin1String("relation")));
64  d->rights = PropertyPtr(new Property(ns + QLatin1String("rights")));
65  d->source = PropertyPtr(new Property(ns + QLatin1String("source")));
66  d->subject = PropertyPtr(new Property(ns + QLatin1String("subject")));
67  d->title = PropertyPtr(new Property(ns + QLatin1String("title")));
68  d->type = PropertyPtr(new Property(ns + QLatin1String("type")));
69 }
70 
71 DublinCoreVocab::~DublinCoreVocab()
72 {
73  delete d;
74 }
75 
76 DublinCoreVocab *DublinCoreVocab::self()
77 {
78  static DublinCoreVocabPrivate p;
79  if (!p.sSelf) {
80  p.sSelf = new DublinCoreVocab;
81  qAddPostRoutine(DublinCoreVocabPrivate::cleanupDublinCoreVocab);
82  }
83  return p.sSelf;
84 }
85 
86 const QString &DublinCoreVocab::namespaceURI() const
87 {
88  return d->namespaceURI;
89 }
90 
91 PropertyPtr DublinCoreVocab::contributor() const
92 {
93  return d->contributor;
94 }
95 
96 PropertyPtr DublinCoreVocab::creator() const
97 {
98  return d->creator;
99 }
100 
101 PropertyPtr DublinCoreVocab::coverage() const
102 {
103  return d->coverage;
104 }
105 
106 PropertyPtr DublinCoreVocab::date() const
107 {
108  return d->date;
109 }
110 
111 PropertyPtr DublinCoreVocab::description() const
112 {
113  return d->description;
114 }
115 
116 PropertyPtr DublinCoreVocab::format() const
117 {
118  return d->format;
119 }
120 
121 PropertyPtr DublinCoreVocab::identifier() const
122 {
123  return d->identifier;
124 }
125 
126 PropertyPtr DublinCoreVocab::language() const
127 {
128  return d->language;
129 }
130 
131 PropertyPtr DublinCoreVocab::publisher() const
132 {
133  return d->publisher;
134 }
135 
136 PropertyPtr DublinCoreVocab::relation() const
137 {
138  return d->relation;
139 }
140 
141 PropertyPtr DublinCoreVocab::rights() const
142 {
143  return d->rights;
144 }
145 
146 PropertyPtr DublinCoreVocab::source() const
147 {
148  return d->source;
149 }
150 
151 PropertyPtr DublinCoreVocab::subject() const
152 {
153  return d->subject;
154 }
155 
156 PropertyPtr DublinCoreVocab::title() const
157 {
158  return d->title;
159 }
160 
161 PropertyPtr DublinCoreVocab::type() const
162 {
163  return d->type;
164 }
165 
166 } // namespace RDF
167 } // namespace Syndication
Type type(const QSqlDatabase &db)
Property
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Nov 30 2023 03:51:25 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.