53 string key =
"BES.Data.RootDirectory" ;
58 string s = key +
" not defined in BES configuration file" ;
63 key = (string)
"BES.FollowSymLinks" ;
67 if( found && ( s_str ==
"yes" || s_str ==
"on" || s_str ==
"true" ) )
93 i = _container_list.find( sym_name ) ;
94 if( i != _container_list.end() )
100 return ret_container ;
120 const string &real_name,
123 BESDEBUG(
"bes",
"BESContainerStorageCatalog::add_container: "
124 <<
"adding container with name \"" << sym_name
125 <<
"\", real name \"" << real_name
126 <<
"\", type \"" << type <<
"\"" << endl ) ;
132 string s =
"Unable to add container, type of data must be specified" ;
138 i = _container_list.find( sym_name ) ;
139 if( i != _container_list.end() )
141 string s = (string)
"A container with the name "
143 +
" already exists" ;
153 string new_r_name =
_root_dir +
"/" + real_name ;
159 _container_list[sym_name] = c ;
184 string s =
"Unable to add container, container passed is null" ;
189 string s =
"Unable to add container, type of data must be specified" ;
194 i = _container_list.find( sym_name ) ;
195 if( i != _container_list.end() )
197 string s = (string)
"A container with the name "
199 +
" already exists" ;
202 _container_list[sym_name] = c ;
216 i = _container_list.find( s_name ) ;
217 if( i != _container_list.end() )
220 _container_list.erase( i ) ;
240 while( _container_list.size() != 0 )
244 _container_list.erase( ci ) ;
262 list<string> &provides )
294 string::size_type root_len =
_root_dir.length() ;
302 if( real.length() > root_len )
304 if( real.compare( 0, root_len,
_root_dir ) == 0 )
306 real = real.substr( root_len, real.length() - root_len ) ;
325 << (
void *)
this <<
")" << endl ;
328 if( _container_list.size() )
333 = _container_list.begin() ;
335 = _container_list.end() ;
336 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.
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 ...
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 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
map< string, BESContainer * >::iterator Container_iter
#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.
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