51 string key =
"BES.Data.RootDirectory" ;
56 string s = key +
" not defined in BES configuration file" ;
61 key = (string)
"BES.FollowSymLinks" ;
65 if( found && ( s_str ==
"yes" || s_str ==
"on" || s_str ==
"true" ) )
91 i = _container_list.find( sym_name ) ;
92 if( i != _container_list.end() )
98 return ret_container ;
118 const string &real_name,
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() )
134 string s = (string)
"A container with the name " 136 +
" already exists" ;
146 string new_r_name =
_root_dir +
"/" + real_name ;
152 _container_list[sym_name] = c ;
177 string s =
"Unable to add container, container passed is null" ;
182 string s =
"Unable to add container, type of data must be specified" ;
187 i = _container_list.find( sym_name ) ;
188 if( i != _container_list.end() )
190 string s = (string)
"A container with the name " 192 +
" already exists" ;
195 _container_list[sym_name] = c ;
209 i = _container_list.find( s_name ) ;
210 if( i != _container_list.end() )
213 _container_list.erase( i ) ;
233 while( _container_list.size() != 0 )
237 _container_list.erase( ci ) ;
264 string::size_type root_len =
_root_dir.length() ;
272 if( real.length() > root_len )
274 if( real.compare( 0, root_len,
_root_dir ) == 0 )
276 real = real.substr( root_len, real.length() - root_len ) ;
295 << (
void *)
this <<
")" << endl ;
298 if( _container_list.size() )
303 = _container_list.begin() ;
305 = _container_list.end() ;
306 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
static string lowercase(const string &s)
Convert a string to all lower case.
virtual void dump(ostream &strm) const
dumps information about this object
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.
virtual void dump(ostream &strm) const
dumps information about this object
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 ...
map< string, BESContainer *>::const_iterator Container_citer
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 ostream & LMarg(ostream &strm)
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.
string get_real_name() const
retreive the real name for this container, such as a file name.
string get_container_type() const
retrieve the type of data this container holds, such as cedar or netcdf.
map< string, BESContainer *>::iterator Container_iter
virtual bool del_containers()
removes all container
A container is something that holds data.
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 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
string get_symbolic_name() const
retrieve the symbolic name for this container