00001 #ifndef _ots_ConfigurationInfoReader_h_ 00002 #define _ots_ConfigurationInfoReader_h_ 00003 00004 #include <string> 00005 #include <xercesc/util/XMLChar.hpp> 00006 #include <xercesc/dom/DOMDocument.hpp> 00007 00008 namespace ots 00009 { 00010 00011 class ConfigurationBase; 00012 00013 class ConfigurationInfoReader 00014 { 00015 public: 00016 ConfigurationInfoReader(bool allowIllegalColumns=false); 00017 ~ConfigurationInfoReader(void); 00018 std::string read (ConfigurationBase& configuration); 00019 std::string read (ConfigurationBase* configuration); 00020 00021 void setAllowColumnErrors(bool setValue); 00022 const bool& getAllowColumnErrors(void); 00023 00024 private: 00025 void initPlatform (void); 00026 void terminatePlatform(void); 00027 bool checkViewType (std::string type); 00028 00029 xercesc::DOMNode* getNode (XMLCh* tagName, xercesc::DOMNode* parent, unsigned int itemNumber); 00030 xercesc::DOMNode* getNode (XMLCh* tagName, xercesc::DOMElement* parent, unsigned int itemNumber); 00031 xercesc::DOMElement* getElement(XMLCh* tagName, xercesc::DOMNode* parent, unsigned int itemNumber); 00032 xercesc::DOMElement* getElement(XMLCh* tagName, xercesc::DOMElement* parent, unsigned int itemNumber); 00033 XMLCh* rootTag_; 00034 XMLCh* configurationTag_; 00035 XMLCh* configurationNameAttributeTag_; 00036 XMLCh* viewTag_; 00037 XMLCh* viewNameAttributeTag_; 00038 XMLCh* viewTypeAttributeTag_; 00039 XMLCh* viewDescriptionAttributeTag_; 00040 XMLCh* columnTag_; 00041 XMLCh* columnTypeAttributeTag_; 00042 XMLCh* columnNameAttributeTag_; 00043 XMLCh* columnStorageNameAttributeTag_; 00044 XMLCh* columnDataTypeAttributeTag_; 00045 XMLCh* columnDataChoicesAttributeTag_; 00046 00047 bool allowIllegalColumns_; 00048 }; 00049 00050 } 00051 00052 #endif