53 string key =
"BES.Data.RootDirectory";
57 string s = key +
" not defined in BES configuration file";
62 key = (string)
"BES.FollowSymLinks";
66 if (found && (s_str ==
"yes" || s_str ==
"on" || s_str ==
"true")) {
91 i = _container_list.find(sym_name);
92 if (i != _container_list.end()) {
117 BESDEBUG(
"bes",
"BESContainerStorageVolatile::add_container: "
118 <<
"adding container with name \"" << sym_name
119 <<
"\", real name \"" << real_name
120 <<
"\", type \"" << type <<
"\"" << endl );
125 string s =
"Unable to add container, type of data must be specified";
131 i = _container_list.find(sym_name);
132 if (i != _container_list.end()) {
133 string s = (string)
"A container with the name " + sym_name +
" already exists";
147 string new_r_name =
_root_dir +
"/" + real_name;
153 _container_list[sym_name] = c;
176 string s =
"Unable to add container, container passed is null";
180 string s =
"Unable to add container, type of data must be specified";
185 i = _container_list.find(sym_name);
186 if (i != _container_list.end()) {
187 string s = (string)
"A container with the name " + sym_name +
" already exists";
190 _container_list[sym_name] = c;
203 i = _container_list.find(s_name);
204 if (i != _container_list.end()) {
206 _container_list.erase(i);
224 while (_container_list.size() != 0) {
227 _container_list.erase(ci);
271 string::size_type root_len =
_root_dir.length();
274 for (; i != e; i++) {
278 if (real.length() > root_len) {
279 if (real.compare(0, root_len,
_root_dir) == 0) {
280 real = real.substr(root_len, real.length() - root_len);
297 strm <<
BESIndent::LMarg <<
"BESContainerStorageVolatile::dump - (" << (
void *)
this <<
")" << endl;
300 if (_container_list.size()) {
305 for (; i != ie; i++) {
provides persistent storage for data storage information represented by a container.
virtual void show_container(const string &sym_name, const string &real_name, const string &type, BESInfo &info)
add information for a container to the informational response object
virtual BESContainer * look_for(const string &sym_name)
looks for the specified container using the symbolic name passed
exception thrown if inernal error encountered
string get_symbolic_name() const
retrieve the symbolic name for this container
static string lowercase(const string &s)
Convert a string to all lower case.
virtual void add_tag(const string &tag_name, const string &tag_data, map< string, string > *attrs=0)=0
Holds real data, container type and constraint for symbolic name read from persistence.
map< string, BESContainer * >::iterator Container_iter
string get_container_type() const
retrieve the type of data this container holds, such as cedar or netcdf.
virtual void add_container(BESContainer *c)
add the passed container to the list of containers in volatile storage
error thrown if there is a user syntax error in the request or any other user error ...
virtual void show_containers(BESInfo &info)
show information for each container in this persistent store
informational response object
virtual bool del_container(const string &s_name)
removes a container with the given symbolic name from the list and deletes it.
static BESServiceRegistry * TheRegistry()
static ostream & LMarg(ostream &strm)
string get_real_name() const
retrieve the real name for this container, such as a file name.
virtual ~BESContainerStorageVolatile()
void get_value(const string &s, string &val, bool &found)
Retrieve the value of a given key, if set.
BESContainerStorageVolatile(const string &n)
create an instance of this persistent store with the given name.
virtual void dump(ostream &strm) const
dumps information about this object
#define BESDEBUG(x, y)
macro used to send debug information to the debug stream
virtual bool del_containers()
removes all container
A container is something that holds data.
map< string, BESContainer * >::const_iterator Container_citer
virtual void dump(ostream &strm) const
dumps information about this object
static void check_path(const string &path, const string &root, bool follow_sym_links)
Check if the specified path is valid.
static BESKeys * TheKeys()
virtual bool isData(const string &inQuestion, list< string > &provides)
determine if the given container is data and what servies are available for it
virtual const string & get_name() const
retrieve the name of this persistent store
virtual BESContainer * ptr_duplicate()=0
pure abstract method to duplicate this instances of BESContainer
virtual void services_handled(const string &handler, list< string > &services)
returns the list of servies provided by the handler in question