VOGroup.h 4.33 KB
Newer Older
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
/*************************************************************************
 *   Copyright (C) 2007 by Oliver Bock                                   *
 *   bock@tfh-berlin.de                                                  *
 *                                                                       *
 *   This file is part of Fidelity.                                      *
 *                                                                       *
 *   Fidelity is free software: you can redistribute it and/or modify    *
 *   it under the terms of the GNU General Public License as published   *
 *   by the Free Software Foundation, version 3 of the License.          *
 *                                                                       *
 *   Fidelity is distributed in the hope that it will be useful,         *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of      *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the        *
 *   GNU General Public License for more details.                        *
 *                                                                       *
 *   You should have received a copy of the GNU General Public License   *
 *   along with Fidelity. If not, see <http://www.gnu.org/licenses/>.    *
 *                                                                       *
 *************************************************************************/

#ifndef VOGROUP_H
#define VOGROUP_H

#include <QString>
#include <QList>
#include <QDomDocument>
#include <QDomElement>

#include "VOFieldRef.h"
#include "VOParam.h"
#include "VOParamRef.h"

using namespace Fidelity::Common;

namespace Fidelity {
	namespace Common {

/**
 * @author Oliver Bock <bock@tfh-berlin.de>
 * 
 * This class encapsulates the VOGroup XML tag of the VOTable definition version 1.1.
 * See this URL for the latest definition: http://www.ivoa.net/Documents/latest/VOT.html
 * For the time being only XML and binary based output is supported...
 */
class VOGroup
{

public:
	/**
	 * Constructor
	 */
	VOGroup();

	/**
	 * Destructor
	 */
	virtual ~VOGroup();


	/**
	 * This method contructs the complete XML fragment (including child elements) of this class
	 * @param parent the parent container tag for this XML fragment
	 * @return bool TRUE if the XML creation was successfull. FALSE if mandatory attributes are empty.
	 */
	bool buildXml(QDomElement* parent);


	/**
	 * Set the value of m_ID
	 * @param new_var the new value of m_ID
	 */
	void setID(QString new_var);

	/**
	 * Get the value of m_ID
	 * @return the value of m_ID
	 */
	QString ID();


	/**
	 * Set the value of m_Name
	 * @param new_var the new value of m_Name
	 */
	void setName(QString new_var);

	/**
	 * Get the value of m_Name
	 * @return the value of m_Name
	 */
	QString Name();


	/**
	 * Set the value of m_Ref
	 * @param new_var the new value of m_Ref
	 */
	void setRef(QString new_var);

	/**
	 * Get the value of m_Ref
	 * @return the value of m_Ref
	 */
	QString Ref();


	/**
	 * Set the value of m_UCD
	 * @param new_var the new value of m_UCD
	 */
	void setUCD(QString new_var);

	/**
	 * Get the value of m_UCD
	 * @return the value of m_UCD
	 */
	QString UCD();


	/**
	 * Set the value of m_UType
	 * @param new_var the new value of m_UType
	 */
	void setUType(QString new_var);

	/**
	 * Get the value of m_UType
	 * @return the value of m_UType
	 */
	QString UType();


	/**
	 * Set the value of m_Description
	 * @param new_var the new value of m_Description
	 */
	void setDescription(QString new_var);

	/**
	 * Get the value of m_Description
	 * @return the value of m_Description
	 */
	QString Description();

	/**
	 * Get the value of m_FieldRefList
	 * @return the value of m_FieldRefList
	 */
	QList<VOFieldRef*>* FieldRefList();

	/**
	 * Get the value of m_ParamList
	 * @return the value of m_ParamList
	 */
	QList<VOParam*>* ParamList();

	/**
	 * Get the value of m_ParamRefList
	 * @return the value of m_ParamRefList
	 */
	QList<VOParamRef*>* ParamRefList();
	
	/**
	 * Get the value of m_GroupList
	 * @return the value of m_GroupList
	 */
167
	QList<VOGroup*>* GroupList();
168
169
170
171
172
173
174
175
176
177
178

private:
	QString m_ID;
	QString m_Name;
	QString m_Ref;
	QString m_UCD;
	QString m_UType;
	QString m_Description;
	QList<VOFieldRef*>* m_FieldRefList;
	QList<VOParam*>* m_ParamList;
	QList<VOParamRef*>* m_ParamRefList;
179
	QList<VOGroup*>* m_GroupList;
180
181
182
183
184

	void initAttributes();
};}}

#endif // VOGROUP_H