InternalXMLReader.hh
2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* InternalXMLReader.hh
*
* Created on: 6 août 2013
* Author: CS
*/
#ifndef INTERNALXMLREADER_HH_
#define INTERNALXMLREADER_HH_
#include "XMLReader.hh"
namespace TimeTableCatalog {
/**
* Reads a TimeTable from an InternalXML formated file.
* Something like :
* <?xml version="1.0" encoding="UTF-8"?>
* <timetable>
* <name>FTE_c3</name>
* <created>2013-07-14T09:09:32</created>
* <description>Uploaded Time Table
* Time Table generated by AMDA @ CDPP;Description: FTE list from Cluster 3 data. From \"A new multivariate time series data analysis technique: Automated detection of flux transfer events using Cluster data\" by Karimabadi et al., JOURNAL OF GEOPHYSICAL RESEARCH, VOL. 114, A06216, doi:10.1029/2009JA014202, 2009 http://www.agu.org/journals/ja/ja0906/2009JA014202/The list is available as Auxiliary material \"Data Set S3\"Transformation into AMDA Time Table by V. Genot, CESR, Toulouse, France 29/06/2009 : - millisec have been omitted - the original event corresponds to the StartTime of the Time Table - if StopTime-StartTime = 1 sec then the event is a magnetosheath FTE - if StopTime-StartTime = 2 sec then the event is a magnetospheric FTE;Source: Upload Time Table;Creation Date : 2009-07-01 17:16:46 shared by Vincent Genot on 2009-11-24 18:52:50;</description>
* <history>created from another TT</history>
* <nbIntervals>738</nbIntervals>
* <intervals>
* <start>2001-02-02T16:27:12</start>
* <stop>2001-02-02T16:27:13</stop>
* </intervals>
* <!--[...]-->
* </timetable>
*
*/
class InternalXMLReader: public TimeTableCatalog::XMLReader {
public:
static const std::string FORMAT;
InternalXMLReader(const std::string& pPath);
virtual ~InternalXMLReader();
/**
* Creates an instance of this.
*/
std::unique_ptr<AbstractReader> createInstance(const std::string& pPath);
/**
* Gets the first xml node of the tt in this XML format.
*/
std::string getFirstNode();
ParameterDescription::ParameterType getTypeFromString(std::string type);
private:
/**
* Processes each interested node of an XMl file.
*/
void processNode(TimeTable& pTT, xmlTextReaderPtr reader, int &crtIndex);
};
} /* namespace TimeTableCatalog */
#endif /* INTERNALXMLREADER_HH_ */