ddc
ConcXml.h
Go to the documentation of this file.
1 // //-*- Mode: C++ -*-
2 //
3 // DDC originally by Alexey Sokirko
4 // Changes and modifications 2011-2018 by Bryan Jurish
5 //
6 // This file is part of DDC.
7 //
8 // DDC is free software: you can redistribute it and/or modify
9 // it under the terms of the GNU Lesser General Public License as published by
10 // the Free Software Foundation, either version 3 of the License, or
11 // (at your option) any later version.
12 //
13 // DDC is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public License
19 // along with DDC. If not, see <http://www.gnu.org/licenses/>.
20 //
21 #ifndef __ConcXml_H_
22 #define __ConcXml_H_
23 
24 #include "BiblIndex.h"
25 
26 #include "../CommonLib/util_classes.h"
27 #include "../CommonLib/ddcThread.h"
28 #include "../CommonLib/ddcMMap.h"
29 #include "../CommonLib/ddcStringEnum.h"
30 #include <list>
31 
32 
33 
39 class CConcXml : public CBiblIndex {
40 private:
41  // File of Bibliographical references
44 
45 public:
46 
47 
48 public:
49  CConcXml();
50 
51  ~CConcXml();
52 
53  void DeleteFiles();
54 
56  bool Start(string ProjectFileName);
57 
59  bool AddIndexItem(const CBibliography &Bibliography);
60 
62  void FinalSaveBibliography();
63 
65  void ExitWithoutSave();
66 
68  bool UnionBibliographies(const vector<const CConcXml *> &Bibls);
69 
71  bool SplitBibliography(vector<CConcXml *> &Bibls, const vector<DWORD> &EndFileNo) const;
72 
73 
74 
76  void LoadXmlAndReadBibliography(TiXmlDocument &doc, const char *pFileBuffer, CBibliography &Bibl);
77 
79  void ReadMorphXmlFileIntoGraTable(string FileName, const char *pFileBuffer, vector<CXmlToken> &GraTable,
80  CBibliography &Bibl);
81 
82 
84  void SetFreeBiblAttribsEmpty(CBibliography &Bibl) const;
85 
86 
87  void SetFreeBiblByName(const string &name, const string &value, CBibliography &result) const;
88 
89 
90 };
91 
92 #endif
93 
94 /*--- emacs style variables ---
95  * Local Variables:
96  * mode: C++
97  * c-file-style: "ellemtel"
98  * c-basic-offset: 4
99  * tab-width: 8
100  * indent-tabs-mode: nil
101  * End:
102  */
void LoadXmlAndReadBibliography(TiXmlDocument &doc, const char *pFileBuffer, CBibliography &Bibl)
load xml file into TiXmlDocument& doc and load bibliographical fileds to CBibliography& Bibl ...
Definition: ConcXml.cpp:405
bool SplitBibliography(vector< CConcXml *> &Bibls, const vector< DWORD > &EndFileNo) const
partition this object into multiple sub-objects (called by CConcIndexator::SplitProject()) ...
Definition: ConcXml.cpp:304
CConcXml()
Definition: ConcXml.cpp:103
bool Start(string ProjectFileName)
initialize building bibliography for corpus ProjectFileName
Definition: ConcXml.cpp:116
void SetFreeBiblAttribsEmpty(CBibliography &Bibl) const
set all free bibliographical attributes to ""
Definition: ConcXml.cpp:456
Definition: Bibliography.h:13
bool UnionBibliographies(const vector< const CConcXml *> &Bibls)
union of multiple (heterogeneous) bibliographies (new)
Definition: ConcXml.cpp:236
void ExitWithoutSave()
stop indexing bibliography an removes index files
Definition: ConcXml.cpp:188
void ReadMorphXmlFileIntoGraTable(string FileName, const char *pFileBuffer, vector< CXmlToken > &GraTable, CBibliography &Bibl)
load xml file under MorphXML_Index into vector<CXmlToken>& GraTable
Definition: ConcXml.cpp:465
Definition: tinyxml.h:1097
size_t m_BodyFileToBuildSize
Definition: ConcXml.h:43
~CConcXml()
Definition: ConcXml.cpp:107
void DeleteFiles()
Definition: ConcXml.cpp:169
FILE * m_BodyFileToBuild
Definition: ConcXml.h:42
void SetFreeBiblByName(const string &name, const string &value, CBibliography &result) const
Definition: ConcXml.cpp:180
bool AddIndexItem(const CBibliography &Bibliography)
add one record Bibliography
Definition: ConcXml.cpp:139
Definition: BiblIndex.h:20
void FinalSaveBibliography()
save all indices and stop indexing bibliography
Definition: ConcXml.cpp:196
Definition: ConcXml.h:39