Syndication

dublincore.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_DUBLINCORE_H
9#define SYNDICATION_RDF_DUBLINCORE_H
10
11#include <syndication/rdf/resourcewrapper.h>
12
13#include <QStringList>
14
15#include <ctime>
16
17class QString;
18
19namespace Syndication
20{
21namespace RDF
22{
23class Resource;
24//@cond PRIVATE
25typedef QSharedPointer<Resource> ResourcePtr;
26//@endcond
27
28/**
29 * A resource wrapper providing convenient
30 * access to Dublin Core metadata.
31 *
32 * For more information on Dublin Core, see
33 * http://dublincore.org/
34 */
35class DublinCore : public ResourceWrapper
36{
37public:
38 /**
39 * creates a dublin core convenience wrapper for a resource
40 *
41 * @param resource the resource to wrap
42 */
43 explicit DublinCore(ResourcePtr resource);
44
45 /**
46 * virtual destructor
47 */
48 ~DublinCore() override;
49
50 /**
51 * A name given to the resource.
52 * Typically, a Title will be a name by which the resource is
53 * formally known.
54 */
55 QString title() const;
56
57 /**
58 * "An entity primarily responsible for making the content of
59 * the resource.
60 * Examples of a Creator include a person, an organisation,
61 * or a service.
62 * Typically, the name of a Creator should be used to
63 * indicate the entity."
64 */
65 QString creator() const;
66
67 /**
68 * like creator(), but returns all dc:creator properties,
69 * not only one.
70 */
71 QStringList creators() const;
72
73 /**
74 * "A date associated with an event in the life cycle of the resource.
75 * Typically, Date will be associated with the creation or
76 * availability of the resource. Recommended best practice
77 * for encoding the date value is defined in a profile of
78 * ISO 8601 [W3CDTF] and follows the YYYY-MM-DD format."
79 */
80 time_t date() const;
81
82 /**
83 * "An account of the content of the resource.
84 * Description may include but is not limited to: an abstract,
85 * table of contents, reference to a graphical representation
86 * of content or a free-text account of the content."
87 */
88 QString description() const;
89
90 /**
91 * "The topic of the content of the resource.
92 * Typically, a Subject will be expressed as keywords,
93 * key phrases or classification codes that describe a topic
94 * of the resource.
95 * Recommended best practice is to select a value from a
96 * controlled vocabulary or formal classification scheme."
97 */
98 QString subject() const;
99
100 /**
101 * like subject(), but returns all dc:subject properties,
102 * not only one.
103 */
104 QStringList subjects() const;
105
106 /**
107 * "An entity responsible for making contributions to the content of the
108 * resource.
109 * Examples of a Contributor include a person, an organisation, or a
110 * service. Typically, the name of a Contributor should be used to
111 * indicate the entity."
112 * */
113 QString contributor() const;
114
115 /**
116 * like contributor(), but returns all dc:contributor properties,
117 * not only one.
118 */
120
121 /**
122 * "Information about rights held in and over the resource.
123 * Typically, a Rights element will contain a rights
124 * management statement for the resource, or reference
125 * a service providing such information. Rights information
126 * often encompasses Intellectual Property Rights (IPR),
127 * Copyright, and various Property Rights.
128 * If the Rights element is absent, no assumptions can be made
129 * about the status of these and other rights with respect to
130 * the resource."
131 */
132 QString rights() const;
133
134 /**
135 * "A language of the intellectual content of the resource.
136 * Recommended best practice for the values of the Language
137 * element is defined by RFC 1766 [RFC1766] which includes
138 * a two-letter Language Code (taken from the ISO 639
139 * standard [ISO639]), followed optionally, by a two-letter
140 * Country Code (taken from the ISO 3166 standard [ISO3166]).
141 * For example, 'en' for English, 'fr' for French, or
142 * 'en-uk' for English used in the United Kingdom."
143 */
144 QString language() const;
145
146 /**
147 * "The extent or scope of the content of the resource.
148 * Coverage will typically include spatial location (a place name
149 * or geographic coordinates), temporal period (a period label,
150 * date, or date range) or jurisdiction (such as a named
151 * administrative entity).
152 * Recommended best practice is to select a value from a
153 * controlled vocabulary (for example, the Thesaurus of Geographic
154 * Names [TGN]) and that, where appropriate, named places or time
155 * periods be used in preference to numeric identifiers such as
156 * sets of coordinates or date ranges."
157 */
158 QString coverage() const;
159
160 /**
161 * "The physical or digital manifestation of the resource.
162 * Typically, Format may include the media-type or dimensions of
163 * the resource. Format may be used to determine the software,
164 * hardware or other equipment needed to display or operate the
165 * resource. Examples of dimensions include size and duration.
166 * Recommended best practice is to select a value from a
167 * controlled vocabulary (for example, the list of Internet Media
168 * Types [MIME] defining computer media formats).
169 */
170 QString format() const;
171
172 /**
173 * "An unambiguous reference to the resource within a given context.
174 * Recommended best practice is to identify the resource by means
175 * if a string or number conforming to a formal identification
176 * system.
177 * Example formal identification systems include the Uniform
178 * Resource Identifier (URI) (including the Uniform Resource
179 * Locator (URL)), the Digital Object Identifier (DOI) and the
180 * International Standard Book Number (ISBN).
181 */
182 QString identifier() const;
183
184 /**
185 * "An entity responsible for making the resource available.
186 * Examples of a Publisher include a person, an organisation, or a
187 * service. Typically, the name of a Publisher should be used to
188 * indicate the entity."
189 */
190 QString publisher() const;
191
192 /**
193 * "A reference to a related resource.
194 * Recommended best practice is to reference the resource by means
195 * of a string or number conforming to a formal identification
196 * system."
197 */
198 QString relation() const;
199
200 /**
201 * A Reference to a resource from which the present resource
202 * is derived.
203 * The present resource may be derived from the Source resource
204 * in whole or in part. Recommended best practice is to reference
205 * the resource by means of a string or number conforming to a
206 * formal identification system.
207 */
208 QString source() const;
209
210 /**
211 * "The nature or genre of the content of the resource.
212 * Type includes terms describing general categories, functions,
213 * genres, or aggregation levels for content. Recommended best
214 * practice is to select a value from a controlled vocabulary
215 * (for example, the working draft list of Dublin Core Types
216 * [DCT1]). To describe the physical or digital manifestation
217 * of the resource, use the FORMAT element."
218 */
219 QString type() const;
220
221 /**
222 * returns a debug string describing the available DC metadata
223 * for debugging purposes
224 *
225 * @return debug string
226 */
227 QString debugInfo() const;
228};
229
230} // namespace RDF
231} // namespace Syndication
232
233#endif // SYNDICATION_RDF_DUBLINCORE_H
A resource wrapper providing convenient access to Dublin Core metadata.
Definition dublincore.h:36
QString language() const
"A language of the intellectual content of the resource.
QString rights() const
"Information about rights held in and over the resource.
QString format() const
"The physical or digital manifestation of the resource.
QString relation() const
"A reference to a related resource.
QString subject() const
"The topic of the content of the resource.
QStringList contributors() const
like contributor(), but returns all dc:contributor properties, not only one.
QString publisher() const
"An entity responsible for making the resource available.
QString contributor() const
"An entity responsible for making contributions to the content of the resource.
QString debugInfo() const
returns a debug string describing the available DC metadata for debugging purposes
QString coverage() const
"The extent or scope of the content of the resource.
time_t date() const
"A date associated with an event in the life cycle of the resource.
QString description() const
"An account of the content of the resource.
QStringList creators() const
like creator(), but returns all dc:creator properties, not only one.
~DublinCore() override
virtual destructor
QString creator() const
"An entity primarily responsible for making the content of the resource.
QString source() const
A Reference to a resource from which the present resource is derived.
QString identifier() const
"An unambiguous reference to the resource within a given context.
QString type() const
"The nature or genre of the content of the resource.
QString title() const
A name given to the resource.
DublinCore(ResourcePtr resource)
creates a dublin core convenience wrapper for a resource
QStringList subjects() const
like subject(), but returns all dc:subject properties, not only one.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:15 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.