Commit 3d4da960 authored by Oliver Bock's avatar Oliver Bock
Browse files

Added support for nested VOResource objects (in compliance with VOTable 1.1 standard)

git-svn-id: https://svn.origo.ethz.ch/fidelity@10 53d1999f-d1a8-4366-aa61-588fded17473
parent 738cf80b
......@@ -32,8 +32,7 @@ Fidelity::Common::VOResource::~VOResource()
delete m_ParamList;
delete m_LinkList;
delete m_TableList;
// TODO: VOResource needs to include itself!
// delete m_ResourceList;
delete m_ResourceList;
}
void Fidelity::Common::VOResource::initAttributes()
......@@ -43,8 +42,7 @@ void Fidelity::Common::VOResource::initAttributes()
m_ParamList = new QList<VOParam*>();
m_LinkList = new QList<VOLink*>();
m_TableList = new QList<VOTable*>();
// TODO: VOResource needs to include itself!
// m_ResourceList = new QList<VOResource*>();
m_ResourceList = new QList<VOResource*>();
}
......@@ -116,16 +114,16 @@ bool Fidelity::Common::VOResource::buildXml(QDomElement* parent)
parent->appendChild(tag);
}
}
// TODO: VOResource needs to include itself!
// if (!m_ResourceList->isEmpty()) {
// for (int i = 0;i < m_ResourceList->size();i++) {
// QDomElement tag = doc.createElement("RESOURCE");
// if(m_ResourceList->at(i)->buildXml(&tag) == false) {
// return(false);
// }
// parent->appendChild(tag);
// }
// }
if (!m_ResourceList->isEmpty()) {
for (int i = 0;i < m_ResourceList->size();i++) {
QDomElement tag = doc.createElement("RESOURCE");
if(m_ResourceList->at(i)->buildXml(&tag) == false) {
return(false);
}
parent->appendChild(tag);
}
}
return(true);
}
......@@ -205,8 +203,8 @@ QList<VOTable*>* Fidelity::Common::VOResource::TableList()
{
return m_TableList;
}
// TODO: VOResource needs to include itself!
// QList<VOResource*>* Fidelity::Common::VOResource::ResourceList()
// {
// return m_ResourceList;
// }
QList<VOResource*>* Fidelity::Common::VOResource::ResourceList()
{
return m_ResourceList;
}
......@@ -165,7 +165,7 @@ public:
* Get the value of m_ResourceList
* @return the value of m_ResourceList
*/
// QList<VOResource*>* ResourceList();
QList<VOResource*>* ResourceList();
private:
QString m_ID;
......@@ -178,8 +178,7 @@ private:
QList<VOParam*>* m_ParamList;
QList<VOLink*>* m_LinkList;
QList<VOTable*>* m_TableList;
// TODO: VOResource needs to include itself!
// QList<VOResource*>* m_ResourceList;
QList<VOResource*>* m_ResourceList;
void initAttributes();
};}}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment