m_mapInputData.clear();
if (!attributeName.compare("weight"))
- m_mapInputData.insert(std::make_pair("weight", values.back().toString()));
+ m_mapInputData.insert(std::make_pair("weight", values.back().get< std::string >()));
if (!attributeName.compare("height"))
- m_mapInputData.insert(std::make_pair("height", values.back().toString()));
+ m_mapInputData.insert(std::make_pair("height", values.back().get< std::string >()));
executeLogic();
}
}
}
- void Configuration::getResourceConfiguration(std::string bundleId, std::string resourceName,
+ void Configuration::getResourceConfiguration(std::string bundleId, std::string resourceUri,
resourceInfo *resourceInfoOut){
rapidxml::xml_node< char > *bundle;
rapidxml::xml_node< char > *resource;
string strBundleId;
string strKey, strValue;
OIC_LOG_V(INFO, CONTAINER_TAG, "Loading resource configuration for %s %s!",
- bundleId.c_str(), resourceName.c_str());
+ bundleId.c_str(), resourceUri.c_str());
if (m_loaded)
{
// <bundle>
if (m_xmlDoc.first_node())
{
- for (bundle = m_xmlDoc.first_node()->first_node(BUNDLE_TAG); bundle; bundle =
- bundle->next_sibling())
+ for (bundle = m_xmlDoc.first_node()->first_node(BUNDLE_TAG); bundle;
+ bundle = bundle->next_sibling())
{
// <id>
strBundleId = bundle->first_node(BUNDLE_ID)->value();
if (!strKey.compare(OUTPUT_RESOURCE_NAME))
{
- if (trim_both(strValue).compare(resourceName) != 0) break;
+
resourceInfoOut->name = trim_both(strValue);
}
else if (!strKey.compare(OUTPUT_RESOURCE_URI))
+ {
+ if (trim_both(strValue).compare(resourceUri) != 0)
+ {
+ break;
+ }
resourceInfoOut->uri = trim_both(strValue);
+ }
else if (!strKey.compare(OUTPUT_RESOURCE_ADDR))
resourceInfoOut->address = trim_both(strValue);
{
OIC_LOG_V(DEBUG, CONTAINER_TAG, "Discover input resource %s", outputResourceUri.c_str());
auto foundOutputResource = m_mapResources.find(outputResourceUri);
- // auto resourceProperty = foundOutputResource->second->m_mapResourceProperty;
resourceInfo info;
m_config->getResourceConfiguration(foundOutputResource->second->m_bundleId,
- foundOutputResource->second->m_name, &info);
+ outputResourceUri, &info);
map< string, vector< map< string, string > > > resourceProperty = info.resourceProperty;
try