Blame view

server/kernel/src/File/FileLoaderVOTable.h 1.93 KB
346b85c6   Benjamin Renard   First commit with...
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#ifndef FILELOADERVOTABLE_H
#define FILELOADERVOTABLE_H

#include "FileLoaderAbstract.h"
#include "../XMLManager/XMLManager.h"

using namespace TREPS::XMLManager;

namespace TREPS
{
	namespace File
	{
		class FileLoaderVOTableClass : public FileLoaderAbstractClass
		{
			public :
				FileLoaderVOTableClass(void);
			
				~FileLoaderVOTableClass(void);

				//open a VOTable file
				bool open(const char *file_path);

				//close a VOTable file
				bool close(void);

				//test if a file is opened
				bool isOpened(void);

				//get file format
				t_FileFormat getFormat(void);
			
				//detect frames
				t_StringList getFrames(const t_FieldList *fields);

				//detect fields
				t_FieldList getFields(long int nbRecords);

				//get number of records in VOTable file
				long int getNbRecords(void);

				//add VOTable specific vectors
				void addSpecificFormatVectors(const t_FieldList *fields, t_VectorList &vectors);

				//get global attributes
				map<string,string> getAttributes(void);

				//get data
				bool getData(int start, int limit, DataRecordListClass *data, int &total);

			private :
				//xml loader
				XMLManagerClass *loader;

				//get field type
				void getFieldType(const char *value, const char *dataType, const char *xType, t_FieldType &fieldType,
						t_TimeFormat &timeformat, string &timepattern);

				//get VOTable resource node
				Node *getResourceNode(void);

				//get VOTable table node
				Node *getTableNode(void);

				//get VOTable field nodes list
				NodeList getFieldNodes(void);

				//get VOTable group nodes list
				NodeList getGroupNodes(void);

				//get VOTable data node
				Node *getDataNode(void);

				//get VOTable table data node
				Node *getTableDataNode(void);

				//get VOTable records
				NodeList getTRNodes(void);

				//get VOTable values for a record
				NodeList getTDNodesFromTRNode(Node *trNode);
		};
	}
}

#endif