63 BES_STOPWATCH_START_DHI(MODULE, prolog +
"Timing", &dhi);
67 string container = dhi.
data[CONTAINER];
69 BESDEBUG(MODULE, prolog <<
"Requested container: " << container << endl);
77 vector<string> path_tokens;
79 if (!path_tokens.empty()) {
81 catalog = BESCatalogList::TheCatalogList()->find_catalog(path_tokens[0]);
87 container = container.substr(container.find(catalog_name) + catalog_name.size());
89 BESDEBUG(MODULE, prolog <<
"Modified container/path value to: " << container << endl);
96 catalog = BESCatalogList::TheCatalogList()->default_catalog();
97 if (!catalog)
throw BESInternalError(
string(
"Could not find the default catalog."), __FILE__, __LINE__);
100 BESDEBUG(MODULE, prolog <<
"Using the '" << catalog->
get_catalog_name() <<
"' catalog."<< endl);
101 BESDEBUG(MODULE, prolog <<
"use_container: " << container << endl);
104 unique_ptr<CatalogNode> node(catalog->get_node(container));
110 if (dhi.
data[CONTAINER] ==
"/") {
112 BESDEBUG(MODULE, prolog <<
"Adding additional catalog nodes to top level node." << endl);
114 auto i = BESCatalogList::TheCatalogList()->first_catalog();
115 auto e = BESCatalogList::TheCatalogList()->end_catalog();
116 for (; i != e; i++) {
117 string catalog_name = i->first;
120 BESDEBUG(MODULE, prolog <<
"Checking catalog '" << catalog_name <<
"' ptr: " << (
void *) cat << endl);
122 if (cat != BESCatalogList::TheCatalogList()->default_catalog()) {
124 node->add_node(collection);
126 BESDEBUG(MODULE, prolog <<
"Added catalog node " << catalog_name <<
" to top level node." << endl);
131 BESInfo *info = BESInfoList::TheList()->build_info();
137 node->encode_node(info);
139 info->end_response();
142 dhi.action_name = NODE_RESPONSE_STR;
143 d_response_object = info;