| 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 |
| 10 | |
| 11 | #include <QSharedPointer> |
| 12 | #include <QStringList> |
| 13 | |
| 14 | #include "../syndication_export.h" |
| 15 | |
| 16 | #include <memory> |
| 17 | |
| 18 | class QString; |
| 19 | |
| 20 | namespace Syndication |
| 21 | { |
| 22 | namespace RDF |
| 23 | { |
| 24 | //@cond PRIVATE |
| 25 | class Property; |
| 26 | typedef QSharedPointer<Property> PropertyPtr; |
| 27 | class Resource; |
| 28 | typedef 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 | */ |
| 37 | class |
| 38 | { |
| 39 | public: |
| 40 | /*! |
| 41 | * destructor |
| 42 | */ |
| 43 | (); |
| 44 | |
| 45 | /*! |
| 46 | * returns the singleton instance |
| 47 | */ |
| 48 | static RSSVocab *(); |
| 49 | |
| 50 | /*! |
| 51 | * namespace URI of the RSS 1.0 vocabulary, |
| 52 | * @c "http://web.resource.org/rss/1.0/" |
| 53 | */ |
| 54 | const QString &() const; |
| 55 | |
| 56 | /*! |
| 57 | * RSS 1.0 title property, see Document::title() for |
| 58 | * more details |
| 59 | */ |
| 60 | PropertyPtr () const; |
| 61 | |
| 62 | /*! |
| 63 | * RSS 1.0 description property, see Document::description() for |
| 64 | * more details |
| 65 | */ |
| 66 | PropertyPtr () const; |
| 67 | |
| 68 | /*! |
| 69 | * RSS 1.0 link property, see Document::link() for |
| 70 | * more details |
| 71 | */ |
| 72 | PropertyPtr () const; |
| 73 | |
| 74 | /*! |
| 75 | * RSS 1.0 name property, see Document::name() for |
| 76 | * more details |
| 77 | */ |
| 78 | PropertyPtr () const; |
| 79 | |
| 80 | /*! |
| 81 | * RSS 1.0 url property, see Document::url() for |
| 82 | * more details |
| 83 | */ |
| 84 | PropertyPtr () const; |
| 85 | |
| 86 | /*! |
| 87 | * RSS 1.0 channel class, the instance is represented by |
| 88 | * Syndication::RDF::Document |
| 89 | */ |
| 90 | ResourcePtr () const; |
| 91 | |
| 92 | /*! |
| 93 | * RSS 1.0 item class, the instance is represented by |
| 94 | * Syndication::RDF::Item |
| 95 | */ |
| 96 | ResourcePtr () const; |
| 97 | |
| 98 | /*! |
| 99 | * RSS 1.0 items property, see Document::items() for |
| 100 | * more details |
| 101 | */ |
| 102 | PropertyPtr () const; |
| 103 | |
| 104 | /*! |
| 105 | * RSS 1.0 image property, see Document::image() for |
| 106 | * more details |
| 107 | */ |
| 108 | PropertyPtr () const; |
| 109 | |
| 110 | /*! |
| 111 | * RSS 1.0 textinput property, see Document::textinput() for |
| 112 | * more details |
| 113 | */ |
| 114 | PropertyPtr () const; |
| 115 | |
| 116 | private: |
| 117 | SYNDICATION_NO_EXPORT (); |
| 118 | Q_DISABLE_COPY() |
| 119 | class ; |
| 120 | std::unique_ptr<RSSVocabPrivate> const ; |
| 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 | |
| 130 | class SYNDICATION_EXPORT |
| 131 | { |
| 132 | public: |
| 133 | /*! |
| 134 | * destructor |
| 135 | */ |
| 136 | (); |
| 137 | |
| 138 | /*! |
| 139 | * returns the singleton instance |
| 140 | */ |
| 141 | static RSS09Vocab *(); |
| 142 | |
| 143 | /*! |
| 144 | * namespace URI of the RSS 0.9 vocabulary, |
| 145 | * @c "http://web.resource.org/rss/0.9/" |
| 146 | */ |
| 147 | const QString &() const; |
| 148 | |
| 149 | /*! |
| 150 | * RSS 0.9 title property, see Document::title() for |
| 151 | * more details |
| 152 | */ |
| 153 | PropertyPtr () const; |
| 154 | |
| 155 | /*! |
| 156 | * RSS 0.9 description property, see Document::description() for |
| 157 | * more details |
| 158 | */ |
| 159 | PropertyPtr () const; |
| 160 | |
| 161 | /*! |
| 162 | * RSS 0.9 link property, see Document::link() for |
| 163 | * more details |
| 164 | */ |
| 165 | PropertyPtr () const; |
| 166 | |
| 167 | /*! |
| 168 | * RSS 0.9 name property, see Document::name() for |
| 169 | * more details |
| 170 | */ |
| 171 | PropertyPtr () const; |
| 172 | |
| 173 | /*! |
| 174 | * RSS 0.9 url property, see Document::url() for |
| 175 | * more details |
| 176 | */ |
| 177 | PropertyPtr () const; |
| 178 | |
| 179 | /*! |
| 180 | * RSS 0.9 channel class, the instance is represented by |
| 181 | * Syndication::RDF::Document |
| 182 | */ |
| 183 | ResourcePtr () const; |
| 184 | |
| 185 | /*! |
| 186 | * RSS 0.9 item class, see Document::items() for |
| 187 | * more details |
| 188 | */ |
| 189 | ResourcePtr () const; |
| 190 | |
| 191 | /*! |
| 192 | * RSS 0.9 image property, see Document::image() for |
| 193 | * more details |
| 194 | */ |
| 195 | PropertyPtr () const; |
| 196 | |
| 197 | /*! |
| 198 | * RSS 0.9 textinput property, see Document::textinput() for |
| 199 | * more details |
| 200 | */ |
| 201 | PropertyPtr () const; |
| 202 | |
| 203 | /*! |
| 204 | * returns a list containing all URIs representing properties in this vocabulary |
| 205 | */ |
| 206 | QStringList () const; |
| 207 | |
| 208 | /*! |
| 209 | * returns a list containing all URIs representing classes in this vocabulary |
| 210 | */ |
| 211 | QStringList () const; |
| 212 | |
| 213 | private: |
| 214 | (); |
| 215 | Q_DISABLE_COPY() |
| 216 | class ; |
| 217 | std::unique_ptr<RSS09VocabPrivate> const ; |
| 218 | }; |
| 219 | |
| 220 | } // namespace RDF |
| 221 | } // namespace Syndication |
| 222 | |
| 223 | #endif // SYNDICATION_RDF_RSSVOCAB_H |
| 224 | |