60 map<string, string> props;
63 string err =
"The specified command " + name +
" is not a get command";
69 string type = props[
"type"];
71 string err = name +
" command: Must specify data product type";
78 _sub_cmd = bldr(
_dhi);
80 string err = (string)
"Failed to build command object for " + new_cmd;
100 const string &, map<string, string> &props)
103 _definition = props[
"definition"];
104 if (_definition.empty()) {
105 string err = name +
" command: Must specify definition";
110 _space = props[
"space"];
111 if (!_space.empty())
_str_cmd +=
" in " + _space;
113 string returnAs = props[
"returnAs"];
114 if (returnAs.empty()) {
122 _str_cmd +=
" return as " + returnAs;
138 if (_sub_cmd)
return _sub_cmd->
get_dhi();
160 if (!_space.empty()) {
171 string s = (string)
"Unable to find definition " + _definition;
194 strm <<
BESIndent::LMarg <<
"BESXMLGetCommand::dump - (" << (
void *)
this <<
")" << endl;
provides persistent storage for a specific view of different containers including contraints and aggr...
exception thrown if inernal error encountered
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 BESDefinitionStorage * find_persistence(const string &persist_name)
find the persistence store with the given name
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.
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)
virtual void dump(ostream &strm) const
dumps information about this object
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
virtual BESDefine * look_for(const string &def_name)=0
looks for a definition in this persistent store with the given name
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 ...
virtual void dump(ostream &strm) const
dumps information about this object
static p_xmlcmd_builder find_command(const string &cmd_str)
Find the BESXMLCommand creation function with the given name.