#include <XMLHandler.h>
Public Member Functions | |
XMLHandler (const char *path) | |
virtual | ~XMLHandler () |
DOMNode * | getElementByTagName (const XMLCh *) |
DOMNodeList * | getElementListByTagName (const XMLCh *) |
string | getValueOfNode (DOMNode *) |
string | getValueOfNode (DOMNode *, const XMLCh *) |
virtual void | init ()=0 |
Protected Member Functions | |
list< string > | getNodesChildDataList (XMLCh *parent, XMLCh *child) |
string | getChildData (DOMNode *parent, const XMLCh *childname) |
void | readXML () throw ( std::runtime_error ) |
void | writeXML (bool pretty=false) throw ( std::runtime_error ) |
int | getActualID () |
Protected Attributes | |
string | xmlFile |
string | xmlPath |
DOMDocument * | doc |
const StrXML | core |
const StrXML | TAG_authors |
const StrXML | TAG_category |
const StrXML | TAG_crustaldecay |
const StrXML | TAG_dateAdded |
const StrXML | TAG_dependency |
const StrXML | TAG_description |
const StrXML | TAG_experiment |
const StrXML | TAG_file |
const StrXML | TAG_filename |
const StrXML | TAG_green |
const StrXML | TAG_job |
const StrXML | TAG_kernel |
const StrXML | TAG_load |
const StrXML | TAG_loadfunction |
const StrXML | TAG_loadhistory |
const StrXML | TAG_name |
const StrXML | TAG_output |
const StrXML | TAG_parameter |
const StrXML | TAG_plugin |
const StrXML | TAG_postprocessor |
const StrXML | TAG_region |
const StrXML | TAG_version |
const StrXML | ATTR_date |
const StrXML | ATTR_gmtime |
const StrXML | ATTR_id |
const StrXML | ATTR_job |
const StrXML | ATTR_localtime |
const StrXML | ATTR_name |
const StrXML | ATTR_user |
const StrXML | ATTR_value |
Private Member Functions | |
XMLHandler (const XMLHandler &x) | |
void | fillNodesChildDataList (DOMNode *n, XMLCh *child, list< string > &datalist) |
Private Attributes | |
XercesDOMParser | parser |
DOMTreeErrorReporter | errReporter |
DOMElement * | rootElem |
XMLHandler::XMLHandler | ( | const XMLHandler & | x | ) | [private] |
hidden and empty copy constructor - we do not want to accidentially copy objects
XMLHandler::XMLHandler | ( | const char * | path | ) |
References crusde_debug(), errReporter, parser, and xmlFile.
XMLHandler::~XMLHandler | ( | ) | [virtual] |
References crusde_debug(), crusde_warning(), and parser.
void XMLHandler::fillNodesChildDataList | ( | DOMNode * | n, | |
XMLCh * | child, | |||
list< string > & | datalist | |||
) | [private] |
References t.
Referenced by getNodesChildDataList().
int XMLHandler::getActualID | ( | ) | [protected] |
get New ID
the actual
References ATTR_id, StrXML::cStr(), doc, and StrXML::xmlStr().
Referenced by ExperimentManager::addEntry(), ExperimentManager::addMetaData(), and PluginManager::addToDB().
string XMLHandler::getChildData | ( | DOMNode * | parent, | |
const XMLCh * | childname | |||
) | [protected] |
References getValueOfNode().
Referenced by PluginManager::getDependents(), PluginManager::getEntryDetails(), PluginManager::getEntryMap(), and PluginManager::isInDB().
DOMNode * XMLHandler::getElementByTagName | ( | const XMLCh * | tagname | ) |
References doc.
Referenced by InputHandler::getGreenJobMap(), and InputHandler::getPostProcessorNameList().
DOMNodeList * XMLHandler::getElementListByTagName | ( | const XMLCh * | tagname | ) |
References doc.
Referenced by InputHandler::getLoadFunctionList(), and InputHandler::jobExists().
list< string > XMLHandler::getNodesChildDataList | ( | XMLCh * | parent, | |
XMLCh * | child | |||
) | [protected] |
References doc, fillNodesChildDataList(), and l.
string XMLHandler::getValueOfNode | ( | DOMNode * | n, | |
const XMLCh * | name | |||
) |
References ATTR_name, ATTR_value, TAG_parameter, and StrXML::xmlStr().
string XMLHandler::getValueOfNode | ( | DOMNode * | n | ) |
References t.
Referenced by getChildData(), PluginManager::getDependencies(), PluginManager::getDependents(), and PluginManager::getParameters().
virtual void XMLHandler::init | ( | ) | [pure virtual] |
Implemented in DatabaseManager, and InputHandler.
void XMLHandler::readXML | ( | ) | throw ( std::runtime_error ) [protected] |
References crusde_debug(), crusde_error(), crusde_warning(), doc, errReporter, parser, and xmlFile.
Referenced by InputHandler::init(), and DatabaseManager::init().
void XMLHandler::writeXML | ( | bool | pretty = false |
) | throw ( std::runtime_error ) [protected] |
References crusde_debug().
Referenced by ExperimentManager::addEntry(), and ExperimentManager::deleteEntry().
const StrXML XMLHandler::ATTR_date [protected] |
Referenced by ExperimentManager::addMetaData(), and ExperimentManager::getEntryMap().
const StrXML XMLHandler::ATTR_gmtime [protected] |
Referenced by ExperimentManager::addMetaData(), and ExperimentManager::getEntryMap().
const StrXML XMLHandler::ATTR_id [protected] |
const StrXML XMLHandler::ATTR_job [protected] |
Referenced by InputHandler::getLoadFunctionList().
const StrXML XMLHandler::ATTR_localtime [protected] |
Referenced by ExperimentManager::addMetaData().
const StrXML XMLHandler::ATTR_name [protected] |
Referenced by ExperimentManager::addMetaData(), ExperimentManager::childrenToString(), InputHandler::getAttributeValueByName(), ExperimentManager::getEntryMap(), InputHandler::getGreenJobMap(), InputHandler::getKernelPlugin(), InputHandler::getLoadFunctionList(), InputHandler::getLoadPlugin(), InputHandler::getOutputPlugin(), InputHandler::getPostProcessorNameList(), getValueOfNode(), InputHandler::initParamsFromDOM(), and InputHandler::jobExists().
const StrXML XMLHandler::ATTR_user [protected] |
Referenced by ExperimentManager::addMetaData(), and ExperimentManager::getEntryMap().
const StrXML XMLHandler::ATTR_value [protected] |
Referenced by ExperimentManager::addMetaData(), ExperimentManager::childrenToString(), InputHandler::getFileName(), InputHandler::getGridSize(), InputHandler::getRegion(), InputHandler::getResultFileName(), InputHandler::getTimeIncrement(), InputHandler::getTimeSteps(), getValueOfNode(), and InputHandler::initParamsFromDOM().
const StrXML XMLHandler::core [protected] |
DOMDocument* XMLHandler::doc [protected] |
Referenced by ExperimentManager::addEntry(), ExperimentManager::addMetaData(), PluginManager::addToDB(), ExperimentManager::deleteEntry(), getActualID(), InputHandler::getAttributeValue(), InputHandler::getAttributeValueByName(), PluginManager::getDependents(), getElementByTagName(), getElementListByTagName(), PluginManager::getEntryById(), ExperimentManager::getEntryById(), PluginManager::getEntryMap(), ExperimentManager::getEntryMap(), InputHandler::getExperiment(), getNodesChildDataList(), InputHandler::initParamsFromDOM(), PluginManager::isInDB(), and readXML().
DOMTreeErrorReporter XMLHandler::errReporter [private] |
Referenced by readXML(), and XMLHandler().
XercesDOMParser XMLHandler::parser [private] |
Referenced by readXML(), XMLHandler(), and ~XMLHandler().
DOMElement* XMLHandler::rootElem [private] |
Reimplemented in InputHandler.
const StrXML XMLHandler::TAG_authors [protected] |
Referenced by PluginManager::addToDB(), and PluginManager::getEntryDetails().
const StrXML XMLHandler::TAG_category [protected] |
const StrXML XMLHandler::TAG_crustaldecay [protected] |
Referenced by InputHandler::getLoadFunctionList(), and InputHandler::initParamsFromDOM().
const StrXML XMLHandler::TAG_dateAdded [protected] |
Referenced by PluginManager::addToDB(), and PluginManager::getEntryDetails().
const StrXML XMLHandler::TAG_dependency [protected] |
Referenced by PluginManager::addToDB(), PluginManager::getDependencies(), and PluginManager::getDependents().
const StrXML XMLHandler::TAG_description [protected] |
Referenced by PluginManager::addToDB(), and PluginManager::getEntryDetails().
const StrXML XMLHandler::TAG_experiment [protected] |
Referenced by ExperimentManager::getEntryById(), and ExperimentManager::getEntryMap().
const StrXML XMLHandler::TAG_file [protected] |
const StrXML XMLHandler::TAG_filename [protected] |
Referenced by PluginManager::addToDB(), and PluginManager::getEntryDetails().
const StrXML XMLHandler::TAG_green [protected] |
Referenced by InputHandler::getGreenJobMap(), and InputHandler::initParamsFromDOM().
const StrXML XMLHandler::TAG_job [protected] |
Referenced by InputHandler::getGreenJobMap(), and InputHandler::jobExists().
const StrXML XMLHandler::TAG_kernel [protected] |
Referenced by InputHandler::getKernelPlugin(), and InputHandler::initParamsFromDOM().
const StrXML XMLHandler::TAG_load [protected] |
const StrXML XMLHandler::TAG_loadfunction [protected] |
Referenced by InputHandler::getLoadFunctionList().
const StrXML XMLHandler::TAG_loadhistory [protected] |
Referenced by InputHandler::getLoadFunctionList(), and InputHandler::initParamsFromDOM().
const StrXML XMLHandler::TAG_name [protected] |
const StrXML XMLHandler::TAG_output [protected] |
Referenced by InputHandler::getOutputPlugin().
const StrXML XMLHandler::TAG_parameter [protected] |
const StrXML XMLHandler::TAG_plugin [protected] |
Referenced by PluginManager::addToDB(), ExperimentManager::childrenToString(), PluginManager::getEntryById(), PluginManager::getEntryMap(), InputHandler::getGreenJobMap(), InputHandler::getKernelPlugin(), InputHandler::getLoadFunctionList(), InputHandler::getLoadPlugin(), InputHandler::getOutputPlugin(), InputHandler::getPostProcessorNameList(), and PluginManager::isInDB().
const StrXML XMLHandler::TAG_postprocessor [protected] |
Referenced by InputHandler::getPostProcessorNameList(), and InputHandler::initParamsFromDOM().
const StrXML XMLHandler::TAG_region [protected] |
Referenced by ExperimentManager::childrenToString(), and InputHandler::getRegion().
const StrXML XMLHandler::TAG_version [protected] |
Referenced by PluginManager::addToDB(), and PluginManager::getEntryDetails().
string XMLHandler::xmlFile [protected] |
Referenced by DatabaseManager::getDBName(), InputHandler::init(), readXML(), and XMLHandler().
string XMLHandler::xmlPath [protected] |