BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Management/XercesBuilder.h
Go to the documentation of this file.
1// $Header: /bes/bes/BossCvs/Calibration/rdbModel/rdbModel/Management/XercesBuilder.h,v 1.1.1.1 2005/10/17 06:10:53 maqm Exp $
2#ifndef RDBMODEL_XERCESBUILDER_H
3#define RDBMODEL_XERCESBUILDER_H
4
5#include "rdbModel/Management/Builder.h"
6#include <xercesc/dom/DOMDocument.hpp>
7#include <xercesc/dom/DOMElement.hpp>
8#include "rdbModel/Tables/Column.h"
9#include "rdbModel/Tables/Assertion.h"
10namespace rdbModel{
11
12 class Table; // single rdbms table
13 class Index; // index/key (may be primary or not)
14 class Datatype;
15 class Supersede;
16 class InterRow;
17 class InsertNew;
18 class Query;
19 class Set;
20 /**
21 * This class is a concrete Builder that use the Xerces parser and the
22 * DOM functionalities to parse the xml file and build the generic model
23 * hierarchy
24 * @author D.Favretto & R.Giannitrapani
25 */
26 class XercesBuilder : public Builder {
27 public:
28
29 /**
30 * The constructor
31 */
33
34 virtual ~XercesBuilder() {};
35
36 /**
37 Invoke xml parser to produce DOM (in-memory) representation
38 Concrete implementation of Builder::parseInput
39 */
40 virtual unsigned int parseInput(const std::string& inputPath);
41
42 /** Concrete implementation of pure virtual Builder::buildRdb */
43 virtual int buildRdb();
44
45 private:
46 // A bunch of private methods to handle the details of creating an
47 // object from the corresponding xml description
48
49 /** Build an individual Table object from its xml description */
50 Table* buildTable(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* e);
51
52 /** build a Column from its xml description */
53 Column* buildColumn(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* e,Table* t);
54
55 /**
56 * build an Index object (corresponding to MySQL index or key) from its
57 * xml description
58 */
59 Index* buildIndex(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* e,
60 bool primary, Table* t);
61
62 Assertion* buildAssertion(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* e,
63 Table* t);
64
66 buildOperator(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* e, Table* t);
67
68 Datatype* buildDatatype(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* e);
69 Set* buildSet(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* e, Table* t);
70
71 InsertNew* buildInsertNew(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* e,
72 Table* t);
73
74 InterRow* buildInterRow(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* e,
75 Table* t);
76
77 Query* buildQuery(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* e,
78 Table* t);
79
80 // Set* buildSet(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* e, Table* t);
81
82 Supersede* buildSupersede(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* e,
83 Table* t);
84
85 XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* m_doc;
86 Rdb* m_rdb;
87
88 };
89}
90#endif //XERCESBUILDER_H
91
92
93
94
95
96
97
virtual unsigned int parseInput(const std::string &inputPath)
int t()
Definition: t.c:1