VOResource.h 4.42 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
167
/*************************************************************************
 *   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 VORESOURCE_H
#define VORESOURCE_H

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

#include "VOInfo.h"
#include "VOCooSys.h"
#include "VOParam.h"
#include "VOLink.h"
#include "VOTable.h"

using namespace Fidelity::Common;

namespace Fidelity {
	namespace Common {

/**
 * @author Oliver Bock <bock@tfh-berlin.de>
 * 
 * This class encapsulates the VOResource 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 VOResource
{

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

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


	/**
	 * 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_Type
	 * @param new_var the new value of m_Type
	 */
	void setType(QString new_var);

	/**
	 * Get the value of m_Type
	 * @return the value of m_Type
	 */
	QString Type();


	/**
	 * 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_InfoList
	 * @return the value of m_InfoList
	 */
	QList<VOInfo*>* InfoList();

	/**
	 * Get the value of m_CooSysList
	 * @return the value of m_CooSysList
	 */
	QList<VOCooSys*>* CooSysList();

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

	/**
	 * Get the value of m_LinkList
	 * @return the value of m_LinkList
	 */
	QList<VOLink*>* LinkList();

	/**
	 * Get the value of m_TableList
	 * @return the value of m_TableList
	 */
	QList<VOTable*>* TableList();

	/**
	 * Get the value of m_ResourceList
	 * @return the value of m_ResourceList
	 */
168
	QList<VOResource*>* ResourceList();
169
170
171
172
173
174
175
176
177
178
179
180

private:
	QString m_ID;
	QString m_Name;
	QString m_Type;
	QString m_UType;
	QString m_Description;
	QList<VOInfo*>* m_InfoList;
	QList<VOCooSys*>* m_CooSysList;
	QList<VOParam*>* m_ParamList;
	QList<VOLink*>* m_LinkList;
	QList<VOTable*>* m_TableList;
181
	QList<VOResource*>* m_ResourceList;
182
183
184
185
186

	void initAttributes();
};}}

#endif // VORESOURCE_H