68 BESDEBUG(
W10N_DEBUG_KEY,
"ShowPathInfoResponseHandler::execute() - BEGIN ############################################################## BEGIN" << endl ) ;
78 string err = (string)
"Not able to find the default catalog "
85 string::size_type notslash = container.find_first_not_of(
"/", 0);
86 if (notslash != string::npos) {
87 container = container.substr(notslash);
92 string::size_type slash = container.find_first_of(
"/", 0);
93 if (slash != string::npos) {
94 catname = container.substr(0, slash);
104 if (slash != string::npos) {
105 container = container.substr(slash + 1);
108 notslash = container.find_first_not_of(
"/", 0);
109 if (notslash != string::npos) {
110 container = container.substr(notslash);
117 if (container.empty())
126 map<string,string> pathInfoAttrs;
127 pathInfoAttrs[
PATH] = container;
131 string validPath, remainder;
149 if(validPath.length()!=0){
156 string err = (string)
"Failed to find the validPath node " + validPath +
157 " this should not be possible. Some thing BAD is happening.";
165 if (services.size()) {
166 list<string>::const_iterator si = services.begin();
167 list<string>::const_iterator se = services.end();
168 for (; si != se; si++) {
177 map<string,string> validPathAttrs;
178 validPathAttrs[
IS_DATA] = isData?
"true":
"false";
179 validPathAttrs[
IS_FILE] = isFile?
"true":
"false";
180 validPathAttrs[
IS_DIR] = isDir?
"true":
"false";
192 BESDEBUG(
W10N_DEBUG_KEY,
"ShowPathInfoResponseHandler::execute() - END ################################################################## END" << endl ) ;
217 info->
transmit( transmitter, dhi ) ;
231 << (
void *)
this <<
")" << std::endl ;
virtual list< string > get_service_list()
virtual BESInfo * build_info()
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the response object built by the execute command using the specified transmitter object ...
#define PATH_INFO_RESPONSE
virtual void end_response()
exception thrown if inernal error encountered
virtual void execute(BESDataHandlerInterface &dhi)
executes the command 'show catalog|leaves [for ];' by returning nodes or leaves at the top leve...
virtual BESCatalog * find_catalog(const string &catalog_name)
find the catalog in the list with the specified name
virtual ~ShowPathInfoResponseHandler(void)
static BESInfoList * TheList()
#define OPENDAP_SERVICE
macros representing the default response objects handled
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)=0
transmit the informational object
virtual BESCatalogEntry * show_catalog(const string &container, const string &coi, BESCatalogEntry *entry)=0
virtual void add_tag(const string &tag_name, const string &tag_data, map< string, string > *attrs=0)=0
BESResponseObject * _response
handler object that knows how to create a specific response object
informational response object
virtual string default_catalog()
virtual void begin_tag(const string &tag_name, map< string, string > *attrs=0)
static ostream & LMarg(ostream &strm)
bool follow_sym_links() const
void eval_resource_path(const string &w10nResourceId, const string &catalogRoot, const bool follow_sym_links, string &validPath, bool &isFile, bool &isDir, string &remainder)
Check if the specified path is valid.
virtual void dump(ostream &strm) const
dumps information about this object
#define SHOW_PATH_INFO_RESPONSE_STR
ShowPathInfoResponseHandler(const string &name)
abstract base class catalog object.
Structure storing information used by the BES to handle the request.
map< string, string > data
the map of string data that will be required for the current request.
static BESResponseHandler * ShowPathInfoResponseBuilder(const string &name)
virtual void begin_response(const string &response_name, BESDataHandlerInterface &dhi)
begin the informational response
virtual string get_catalog_name()
#define BESDEBUG(x, y)
macro used to send debug information to the debug stream
static BESCatalogUtils * Utils(const string &name)
static BESCatalogList * TheCatalogList()
returns the singleton BESCatalogList instance.
virtual void end_tag(const string &tag_name)
virtual void dump(ostream &strm) const
dumps information about this object
const string & get_root_dir() const