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_MODELMAKER_H
9#define SYNDICATION_RDF_MODELMAKER_H
10
11#include <QSharedPointer>
12
13#include "../syndication_export.h"
14
15class QDomDocument;
16class QDomElement;
17
18namespace Syndication
19{
20namespace RDF
21{
22class Model;
23class Resource;
24//@cond PRIVATE
25typedef QSharedPointer<Resource> ResourcePtr;
26//@endcond
27
28/**
29 * An RDF parser, used to parse an RDF model from RDF/XML. It doesn't support
30 * the complete RDF specification, but suffices for our purposes.
31 *
32 * @author Frank Osterfeld
33 */
34class ModelMaker
35{
36public:
37 /**
38 * parses an RDF model from RDF/XML
39 * @param doc an DOM document, must contain RDF/XML
40 * @return the parsed model, or an empty model if parsing failed
41 */
42 Model createFromXML(const QDomDocument &doc);
43
44private:
45 ResourcePtr readResource(Model &model, const QDomElement &el);
46};
47
48} // namespace RDF
49} // namespace Syndication
50
51#endif // SYNDICATION_RDF_MODELMAKER_H
52

source code of syndication/src/rdf/modelmaker.h