61 map<string, string> props ;
65 string err =
"The specified command " + name
66 +
" is not a get command" ;
72 string type = props[
"type"] ;
75 string err = name +
" command: Must specify data product type" ;
83 _sub_cmd = bldr(
_dhi ) ;
86 string err = (string)
"Failed to build command object for " 111 map<string,string> &props )
115 _definition = props[
"definition"] ;
116 if( _definition.empty() )
118 string err = name +
" command: Must specify definition" ;
123 string returnAs = props[
"returnAs"] ;
124 if( returnAs.empty() )
130 _str_cmd +=
" return as " + returnAs ;
134 BESDEBUG(
"besxml",
"Converted xml element name to command " 147 if( _sub_cmd )
return _sub_cmd->
get_dhi() ;
175 string s = (string)
"Unable to find definition " + _definition ;
201 << (
void *)
this <<
")" << endl ;
exception thrown if inernal error encountered
virtual void dump(ostream &strm) const
dumps information about this object
virtual BESDefine * look_for(const string &def_name)
look for the specified definition in the list of defintion stores.
BESXMLCommand *(* p_xmlcmd_builder)(const BESDataHandlerInterface &dhi)
list< BESContainer * > containers
static string lowercase(const string &s)
Convert a string to all lower case.
static void GetNodeInfo(xmlNode *node, string &name, string &value, map< string, string > &props)
get the name, value if any, and any properties for the specified node
BESDataHandlerInterface _dhi
virtual void parse_request(xmlNode *node)=0
Parse the XML request document begining at the given node.
virtual void parse_request(xmlNode *node)
parse a get command.
virtual BESDataHandlerInterface & get_dhi()
Return the current BESDataHandlerInterface.
const string & get_agg_cmd()
error thrown if there is a user syntax error in the request or any other user error ...
virtual void set_response()
The request has been parsed, use the command action name to set the response handler.
virtual void dump(ostream &strm) const
dumps information about this object
BESDefine::containers_citer end_container()
virtual void prep_request()
Prepare any information needed to execute the request of this command.
virtual void parse_basic_get(xmlNode *node, const string &name, const string &type, const string &value, map< string, string > &props)
static BESXMLCommand * CommandBuilder(const BESDataHandlerInterface &base_dhi)
static ostream & LMarg(ostream &strm)
virtual void prep_request()
Prepare any information needed to execute the request of this get command.
BESDefine::containers_citer first_container()
static BESDefinitionStorageList * TheList()
BESXMLGetCommand(const BESDataHandlerInterface &base_dhi)
list< BESContainer * >::const_iterator containers_citer
const string & get_agg_handler()
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.
#define BESDEBUG(x, y)
macro used to send debug information to the debug stream
string action
the response object requested, e.g.
virtual BESDataHandlerInterface & get_dhi()
returns the BESDataHandlerInterface of either a sub command, if one exists, or this command's ...
static p_xmlcmd_builder find_command(const string &cmd_str)
Find the BESXMLCommand creation function with the given name.