Syndication

rssvocab.h
1/*
2 This file is part of the syndication library
3 SPDX-FileCopyrightText: 2006 Frank Osterfeld <osterfeld@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef SYNDICATION_RDF_RSSVOCAB_H
9#define SYNDICATION_RDF_RSSVOCAB_H
10
11#include <QSharedPointer>
12#include <QStringList>
13
14#include "../syndication_export.h"
15
16#include <memory>
17
18class QString;
19
20namespace Syndication
21{
22namespace RDF
23{
24//@cond PRIVATE
25class Property;
26typedef QSharedPointer<Property> PropertyPtr;
27class Resource;
28typedef QSharedPointer<Resource> ResourcePtr;
29//@endcond
30
31/**
32 * Singleton holding RDF class and property constants of the RSS 1.0
33 * vocabulary. See http://web.resource.org/rss/1.0/ for a specification.
34 *
35 * @author Frank Osterfeld
36 */
37class RSSVocab
38{
39public:
40 /**
41 * destructor
42 */
43 ~RSSVocab();
44
45 /**
46 * returns the singleton instance
47 */
48 static RSSVocab *self();
49
50 /**
51 * namespace URI of the RSS 1.0 vocabulary,
52 * @c "http://web.resource.org/rss/1.0/"
53 */
54 const QString &namespaceURI() const;
55
56 /**
57 * RSS 1.0 title property, see Document::title() for
58 * more details
59 */
60 PropertyPtr title() const;
61
62 /**
63 * RSS 1.0 description property, see Document::description() for
64 * more details
65 */
66 PropertyPtr description() const;
67
68 /**
69 * RSS 1.0 link property, see Document::link() for
70 * more details
71 */
72 PropertyPtr link() const;
73
74 /**
75 * RSS 1.0 name property, see Document::name() for
76 * more details
77 */
78 PropertyPtr name() const;
79
80 /**
81 * RSS 1.0 url property, see Document::url() for
82 * more details
83 */
84 PropertyPtr url() const;
85
86 /**
87 * RSS 1.0 channel class, the instance is represented by
88 * Syndication::RDF::Document
89 */
90 ResourcePtr channel() const;
91
92 /**
93 * RSS 1.0 item class, the instance is represented by
94 * Syndication::RDF::Item
95 */
96 ResourcePtr item() const;
97
98 /**
99 * RSS 1.0 items property, see Document::items() for
100 * more details
101 */
102 PropertyPtr items() const;
103
104 /**
105 * RSS 1.0 image property, see Document::image() for
106 * more details
107 */
108 PropertyPtr image() const;
109
110 /**
111 * RSS 1.0 textinput property, see Document::textinput() for
112 * more details
113 */
114 PropertyPtr textinput() const;
115
116private:
117 SYNDICATION_NO_EXPORT RSSVocab();
118 Q_DISABLE_COPY(RSSVocab)
119 class RSSVocabPrivate;
120 std::unique_ptr<RSSVocabPrivate> const d;
121};
122
123/**
124 * Singleton holding RDF class and property constants of the RSS 0.9
125 * vocabulary. Only used to map RSS 0.9 to 1.0.
126 *
127 * @author Frank Osterfeld
128 */
129
130class SYNDICATION_EXPORT RSS09Vocab
131{
132public:
133 /**
134 * destructor
135 */
136 ~RSS09Vocab();
137
138 /**
139 * returns the singleton instance
140 */
141 static RSS09Vocab *self();
142
143 /**
144 * namespace URI of the RSS 0.9 vocabulary,
145 * @c "http://web.resource.org/rss/0.9/"
146 */
147 const QString &namespaceURI() const;
148
149 /**
150 * RSS 0.9 title property, see Document::title() for
151 * more details
152 */
153 PropertyPtr title() const;
154
155 /**
156 * RSS 0.9 description property, see Document::description() for
157 * more details
158 */
159 PropertyPtr description() const;
160
161 /**
162 * RSS 0.9 link property, see Document::link() for
163 * more details
164 */
165 PropertyPtr link() const;
166
167 /**
168 * RSS 0.9 name property, see Document::name() for
169 * more details
170 */
171 PropertyPtr name() const;
172
173 /**
174 * RSS 0.9 url property, see Document::url() for
175 * more details
176 */
177 PropertyPtr url() const;
178
179 /**
180 * RSS 0.9 channel class, the instance is represented by
181 * Syndication::RDF::Document
182 */
183 ResourcePtr channel() const;
184
185 /**
186 * RSS 0.9 item class, see Document::items() for
187 * more details
188 */
189 ResourcePtr item() const;
190
191 /**
192 * RSS 0.9 image property, see Document::image() for
193 * more details
194 */
195 PropertyPtr image() const;
196
197 /**
198 * RSS 0.9 textinput property, see Document::textinput() for
199 * more details
200 */
201 PropertyPtr textinput() const;
202
203 /**
204 * returns a list containing all URIs representing properties in this vocabulary
205 */
206 QStringList properties() const;
207
208 /**
209 * returns a list containing all URIs representing classes in this vocabulary
210 */
211 QStringList classes() const;
212
213private:
214 RSS09Vocab();
215 Q_DISABLE_COPY(RSS09Vocab)
216 class RSS09VocabPrivate;
217 std::unique_ptr<RSS09VocabPrivate> const d;
218};
219
220} // namespace RDF
221} // namespace Syndication
222
223#endif // SYNDICATION_RDF_RSSVOCAB_H
KIOCORE_EXPORT CopyJob * link(const QList< QUrl > &src, const QUrl &destDir, JobFlags flags=DefaultFlags)
QString name(StandardAction id)
KGuiItem properties()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 21 2024 11:56:25 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.