OPeNDAP Hyrax Back End Server (BES)
Updated for version 3.8.3
|
implementation of BESContainerStorage that represents a way to read container information from a file. More...
#include <BESContainerStorageFile.h>
Public Member Functions | |
virtual void | add_container (const string &sym_name, const string &real_name, const string &type) |
adds a container with the provided information More... | |
BESContainerStorageFile (const string &n) | |
pull container information from the specified file More... | |
virtual bool | del_container (const string &s_name) |
removes a container with the given symbolic name More... | |
virtual bool | del_containers () |
removes all containers More... | |
virtual void | dump (ostream &strm) const |
dumps information about this object More... | |
virtual const string & | get_name () const |
retrieve the name of this persistent store More... | |
virtual bool | isData (const string &inQuestion, list< string > &provides) |
determine if the given container is data and what servies are available for it More... | |
virtual BESContainer * | look_for (const string &sym_name) |
looks for the specified container in the list of containers loaded from the file. More... | |
virtual void | show_containers (BESInfo &info) |
show information for each container in this persistent store More... | |
virtual | ~BESContainerStorageFile () |
Protected Member Functions | |
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 More... | |
Protected Attributes | |
string | _my_name |
implementation of BESContainerStorage that represents a way to read container information from a file.
This impelementation of BESContainerStorage loads container information from a file. The name of the file is determined from the bes configuration file. The key is:
BES.Container.Persistence.File.<name>
where <name> is the name of this persistent store.
The format of the file is:
<symbolic_name> <real_name> <data type>
where the <symbolic_name> is the symbolic name of the container, the <real_name> represents the physical location of the data, such as a file, and the <data type> is the type of data being represented, such as netcdf, cedar, etc...
One container per line, cannot span multiple lines
Definition at line 70 of file BESContainerStorageFile.h.
BESContainerStorageFile::BESContainerStorageFile | ( | const string & | n) |
pull container information from the specified file
Constructs a BESContainerStorageFile from a file specified by a key in the bes configuration file. The key is constructed using the name of this persistent store.
BES.Container.Persistence.File.<name>
where <name> is the name of this persistent store.
The containers are then read into memory. The format of the file is as follows.
<symbolic_name> <real_name> <data type>
where the symbolic name is the symbolic name of the container, the <real_name> represents the physical location of the data, such as a file, and the <data type> is the type of data being represented, such as netcdf, cedar, etc...
One container per line, cannot span multiple lines
n | name of this persistent store |
BESInternalError | if the file cannot be opened or if there is an error in reading in the container information. |
Definition at line 79 of file BESContainerStorageFile.cc.
References BESKeys::get_value(), and TheBESKeys::TheKeys().
|
virtual |
Definition at line 149 of file BESContainerStorageFile.cc.
|
virtual |
adds a container with the provided information
This method adds a container to the persistence store with the specified information. This functionality is not currently supported for file persistence.
sym_name | symbolic name for the container |
real_name | real name for the container |
type | type of data represented by this container |
Implements BESContainerStorage.
Definition at line 199 of file BESContainerStorageFile.cc.
|
virtual |
removes a container with the given symbolic name
This method removes a container to the persistence store with the given symbolic name. It deletes the container. The container is NOT removed from the file from which it was loaded, however.
s_name | symbolic name for the container |
Implements BESContainerStorage.
Definition at line 217 of file BESContainerStorageFile.cc.
|
virtual |
removes all containers
This method removes all containers from the persistent store. The container is NOT removed from the file from which it was loaded, however.
Implements BESContainerStorage.
Definition at line 243 of file BESContainerStorageFile.cc.
|
virtual |
dumps information about this object
Displays the pointer value of this instance along with information about the containers in this storage
strm | C++ i/o stream to dump the information to |
Implements BESContainerStorage.
Definition at line 321 of file BESContainerStorageFile.cc.
References BESContainerStorage::get_name(), BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().
|
inlinevirtualinherited |
retrieve the name of this persistent store
Definition at line 93 of file BESContainerStorage.h.
References BESContainerStorage::_my_name.
Referenced by BESContainerStorageList::add_persistence(), BESContainerStorageVolatile::dump(), BESContainerStorageCatalog::dump(), dump(), and BESContainerStorageVolatile::show_containers().
|
virtual |
determine if the given container is data and what servies are available for it
inQuestion | the container in question |
provides | an output parameter for storing the list of services provided for this container |
Implements BESContainerStorage.
Definition at line 266 of file BESContainerStorageFile.cc.
References BESContainer::get_container_type(), look_for(), BESServiceRegistry::services_handled(), and BESServiceRegistry::TheRegistry().
|
virtual |
looks for the specified container in the list of containers loaded from the file.
If a match is made with the specified symbolic name then a BESFileContainer instance is created using the the information found (real name and container type). If not found then NULL is returned.
sym_name | name of the container to look for |
Implements BESContainerStorage.
Definition at line 172 of file BESContainerStorageFile.cc.
Referenced by isData().
|
protectedvirtualinherited |
add information for a container to the informational response object
sym_name | symbolic name of the container to add |
real_name | real name, e.g. file name, of the container to add |
type | data type of the container |
info | The BES information object to add container information to |
Definition at line 45 of file BESContainerStorage.cc.
References BESInfo::add_tag().
Referenced by BESContainerStorageVolatile::show_containers(), and show_containers().
|
virtual |
show information for each container in this persistent store
For each container in this persistent store, add infomation about each of those containers. The information added to the information object includes a line for each container within this persistent store which includes the symbolic name, the real name, and the data type, separated by commas.
In the case of this persistent store all of the containers loaded from the file specified by the key BES.Container.Persistence.File.<store_name> is added to the information object.
info | object to store the container and persistent store information into |
Implements BESContainerStorage.
Definition at line 299 of file BESContainerStorageFile.cc.
References BESContainerStorage::show_container().
|
protectedinherited |
Definition at line 72 of file BESContainerStorage.h.
Referenced by BESContainerStorage::get_name().