85 BESDEBUG(W10N_DEBUG_KEY,
"W10NShowPathInfoResponseHandler::execute() - BEGIN" << endl );
87 BESInfo *info = BESInfoList::TheList()->build_info();
88 d_response_object = info;
90 string container = dhi.
data[CONTAINER];
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);
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,
"W10NShowPathInfoResponseHandler::execute() - w10n_id: " << container << endl );
141 map<string, string> pathInfoAttrs;
142 pathInfoAttrs[PATH] = container;
144 info->begin_tag(W10N_PATH_INFO_RESPONSE, &pathInfoAttrs);
146 string validPath, remainder;
150 w10n::eval_resource_path(container, utils->
get_root_dir(), utils->follow_sym_links(), validPath, isFile, isDir,
158 if (validPath.length() != 0) {
165 string err = (string)
"Failed to find the validPath node " + validPath
166 +
" this should not be possible. Some thing BAD is happening.";
171 list<string> services = entry->get_service_list();
174 if (services.size()) {
175 list<string>::const_iterator si = services.begin();
176 list<string>::const_iterator se = services.end();
177 for (; si != se; si++) {
178 if ((*si) == OPENDAP_SERVICE) isData =
true;
183 map<string, string> validPathAttrs;
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,
"W10nShowPathInfoResponseHandler::execute() - END" << endl );