VOTD.h 2.93 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
/*************************************************************************
 *   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 VOTD_H
#define VOTD_H

24
#include <QObject>
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <QString>
#include <QDomElement>

namespace Fidelity {
	namespace Common {

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

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

	/**
	 * Constructor
	 * @param content Initial content.
	 */
	VOTD(QString content);

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


	/**
	 * 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_Encoding
	 * @param new_var the new value of m_Encoding
	 */
	void setEncoding(QString new_var);

	/**
	 * Get the value of m_Encoding
	 * @return the value of m_Encoding
	 */
	QString Encoding();

	
	/**
	 * Set the value of m_Content
	 * @param new_var the new value of m_Content
	 */
	void setContent(QString new_var);

	/**
	 * Get the value of m_Content
	 * @return the value of m_Content
	 */
	QString Content();
	
private:
	//! The econding used for content representation
	QString m_Encoding;

	//! The stored contents
	QString m_Content;

	void initAttributes();
};}}

#endif // VOTD_H