12#include <Poco/AutoPtr.h>
13#include <Poco/DOM/Element.h>
14#include <Poco/DOM/Node.h>
15#include <Poco/DOM/NodeList.h>
16#include <Poco/XML/XMLString.h>
34 : m_catalogName(other.m_catalogName), m_soapEndPoint(other.m_soapEndPoint),
35 m_externalDownloadURL(other.m_externalDownloadURL), m_catalogPrefix(other.m_catalogPrefix),
36 m_windowsPrefix(other.m_windowsPrefix), m_macPrefix(other.m_macPrefix), m_linuxPrefix(other.m_linuxPrefix) {}
87 const std::string &attributeName) {
88 Poco::AutoPtr<Poco::XML::NodeList> elementTag = element->getElementsByTagName(tagName);
91 if (elementTag->length() == 1) {
92 auto *item =
dynamic_cast<Poco::XML::Element *
>(elementTag->item(0));
95 if (!item->getAttribute(attributeName).empty()) {
96 return (item->getAttribute(attributeName));
A class that holds information about catalogs.
const std::string windowsPrefix() const override
Obtain Windows prefix from the facility file.
std::string getAttribute(const Poco::XML::Element *element, const std::string &tagName, const std::string &attributeName)
Obtain the attribute from a given element tag and attribute name.
const std::string linuxPrefix() const override
Obtain Linux prefix from facility file.
CatalogInfo * clone() const override
Clone.
std::string m_catalogName
std::string m_externalDownloadURL
const std::string macPrefix() const override
Obtain Macintosh prefix from facility file.
const std::string soapEndPoint() const override
Obtain soap end point from the facility file.
const std::string catalogName() const override
Obtain catalog name from the facility file.
std::string m_linuxPrefix
CatalogInfo(const Poco::XML::Element *element)
Constructor.
std::string m_soapEndPoint
std::string m_catalogPrefix
const std::string catalogPrefix() const override
Obtain the regex prefix from the facility file.
const std::string externalDownloadURL() const override
Obtain the external download URL.
std::string m_windowsPrefix