83 BES_STOPWATCH_START_DHI(W10N_DEBUG_KEY, prolog +
"Timing", &dhi);
85 BESDEBUG(W10N_DEBUG_KEY, prolog <<
"BEGIN" << endl );
87 BESInfo *info = BESInfoList::TheList()->build_info();
88 d_response_object = info;
90 string container = dhi.
data[CONTAINER];
93 string defcatname = BESCatalogList::TheCatalogList()->default_catalog_name();
96 BESCatalog *defcat = BESCatalogList::TheCatalogList()->default_catalog();
98 throw BESInternalError(
"Not able to find the default catalog.", __FILE__, __LINE__);
101 string::size_type notslash = container.find_first_not_of(
"/", 0);
102 if (notslash != string::npos) {
103 container = container.substr(notslash);
108 string::size_type slash = container.find_first_of(
"/", 0);
109 if (slash != string::npos) {
110 catname = container.substr(0, slash);
118 BESCatalog *catobj = BESCatalogList::TheCatalogList()->find_catalog(catname);
120 if (slash != string::npos) {
121 container = container.substr(slash + 1);
124 notslash = container.find_first_not_of(
"/", 0);
125 if (notslash != string::npos) {
126 container = container.substr(notslash);
134 if (container.empty()) container =
"/";
136 BESDEBUG(W10N_DEBUG_KEY, prolog <<
"w10n_id: " << container << endl );
142 pathInfoAttrs[PATH] = container;
144 info->begin_tag(W10N_PATH_INFO_RESPONSE, &pathInfoAttrs);
146 string validPath, remainder;
149 BESCatalogUtils *utils = BESCatalogList::TheCatalogList()->default_catalog()->get_catalog_utils();
150 w10n::eval_resource_path(container, utils->
get_root_dir(), utils->follow_sym_links(), validPath, isFile, isDir,
158 if (validPath.size() != 0) {
165 string err = (string)
"Failed to find the validPath node " + validPath
166 +
" this should not be possible. Some thing BAD is happening.";
174 if (services.size()) {
177 for (; si != se; si++) {
178 if ((*si) == OPENDAP_SERVICE) isData =
true;
184 validPathAttrs[IS_DATA] = isData ?
"true" :
"false";
185 validPathAttrs[IS_FILE] = isFile ?
"true" :
"false";
186 validPathAttrs[IS_DIR] = isDir ?
"true" :
"false";
188 info->add_tag(VALID_PATH, validPath, &validPathAttrs);
189 info->add_tag(REMAINDER, remainder);
191 info->end_tag(W10N_PATH_INFO_RESPONSE);
194 info->end_response();
196 BESDEBUG(W10N_DEBUG_KEY, prolog <<
"END" << endl );