MLBookProc 1.3
Loading...
Searching...
No Matches
DublinCoreParser.h
1/*
2 * Copyright (C) 2025 Yury Bobylev <bobilev_yury@mail.ru>
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the Free
6 * Software Foundation, version 3.
7 *
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program. If not, see <https://www.gnu.org/licenses/>.
15 */
16#ifndef DUBLINCOREPARSER_H
17#define DUBLINCOREPARSER_H
18
19#include <XMLParserCPP.h>
20
29
31{
32public:
37
42
53 std::string
54 dcTitle(const std::vector<XMLElement> &elements);
55
66 std::string
67 dcAuthor(const std::vector<XMLElement> &elements);
68
79 std::string
80 dcGenre(const std::vector<XMLElement> &elements);
81
92 std::string
93 dcDate(const std::vector<XMLElement> &elements);
94
105 std::string
106 dcDescription(const std::vector<XMLElement> &elements);
107
118 std::string
119 dcLanguage(const std::vector<XMLElement> &elements);
120
131 std::string
132 dcTranslator(const std::vector<XMLElement> &elements);
133
144 std::string
145 dcPublisher(const std::vector<XMLElement> &elements);
146
157 std::string
158 dcIdentifier(const std::vector<XMLElement> &elements);
159
170 std::string
171 dcSource(const std::vector<XMLElement> &elements);
172
173private:
174 std::string
175 getAuthor1(const std::vector<XMLElement> &elements);
176
177 std::string
178 getAuthor2(const std::vector<XMLElement> &elements);
179
180 std::string
181 getTranslator1(const std::vector<XMLElement> &elements);
182
183 std::string
184 getTranslator2(const std::vector<XMLElement> &elements);
185
186 void
187 normalizeString(std::string &str);
188
189 XMLParserCPP *xml_parser;
190};
191
192#endif // DUBLINCOREPARSER_H
std::string dcSource(const std::vector< XMLElement > &elements)
Gets book source.
virtual ~DublinCoreParser()
DublinCoreParser destructor.
std::string dcTranslator(const std::vector< XMLElement > &elements)
Gets book translator.
std::string dcDate(const std::vector< XMLElement > &elements)
Gets book creation date.
std::string dcAuthor(const std::vector< XMLElement > &elements)
Gets book author.
std::string dcIdentifier(const std::vector< XMLElement > &elements)
Gets book identifier.
std::string dcPublisher(const std::vector< XMLElement > &elements)
Gets file publisher.
std::string dcGenre(const std::vector< XMLElement > &elements)
Gets book genre.
DublinCoreParser()
DublinCoreParser constructor.
std::string dcTitle(const std::vector< XMLElement > &elements)
Gets book title.
std::string dcDescription(const std::vector< XMLElement > &elements)
Gets book description.
std::string dcLanguage(const std::vector< XMLElement > &elements)
Gets book language.