21 #ifndef otbXMLMetadataSupplier_h
22 #define otbXMLMetadataSupplier_h
24 #include "cpl_minixml.h"
25 #include "cpl_string.h"
27 #include "OTBMetadataExport.h"
57 std::string GetMetadataValue(std::string
const& path,
bool& hasValue,
int band=1)
const override;
66 std::string GetFirstMetadataValue(std::string
const& paths,
bool& hasValue)
const;
83 template <
typename T> T
GetFirstAs(std::string
const& path)
const
86 std::string ret = GetFirstMetadataValue(path, hasValue);
93 return boost::lexical_cast<T>(ret);
95 catch (boost::bad_lexical_cast&)
102 std::string GetResourceFile(std::string
const& s=
"")
const override;
104 int GetNbBands()
const override;
107 unsigned int GetNumberOf(std::string
const& path)
const override;
110 unsigned int GetAttributId(std::string
const& path, std::string
const& value)
const override;
117 std::string PrintSelf()
const;
132 virtual char** ReadXMLToList(CPLXMLNode* psNode,
char** papszList,
133 const char* pszName =
"");
144 std::vector<std::string> FetchPartialNameValueMultiple(
char** papszStrList,
const char *pszName)
const;
155 std::vector<std::string> FetchPartialNameValueMultiple(
const std::vector<std::string> &StringVector,
156 const std::string &Name)
const;
165 std::vector<std::string> GetAllStartWith(
char** papszStrList,
const char *pszName)
const;
172 char** m_MetadataDic =
nullptr;