RAVE
Lib.rave_bdb.rave_bdb Class Reference
Inheritance diagram for Lib.rave_bdb.rave_bdb:

Public Member Functions

 __init__ (self, configfile=BDB_CONFIG_FILE, nodename=DEX_NODENAME)
 
 load_auth_provider (self)
 
 get_database (self)
 
 path_from_uuid (self, uuid)
 
 get_rave_object (self, fname, lazy_loading=False, preloadedQuantities=None)
 
 get_file (self, uuid)
 

Public Attributes

dict fs_path = None
 
int fs_layers = 0
 
list config = [s.strip() for s in self.config['baltrad.bdb.server.auth.providers'].split(',')]
 

Static Public Attributes

dict config = {}
 
 configfile = None
 
 nodename = None
 
 database = None
 
bool initialized = False
 

Protected Member Functions

 _load_configuration (self, configfile)
 

Member Function Documentation

◆ _load_configuration()

Lib.rave_bdb.rave_bdb._load_configuration ( self,
configfile )
protected
loads the java property configuration file as defined by BDB_CONFIG_FILE
If jprops not available in classpath or if the file isn't defined it will just
be ignored.
:return the properties as a dictionary

◆ get_database()

Lib.rave_bdb.rave_bdb.get_database ( self)
 returns the database that provides connection to the bdb server

◆ get_file()

Lib.rave_bdb.rave_bdb.get_file ( self,
uuid )
 returns a file name to a file that can be accessed. The uuid should be an
identifier in bdb. The returned filename will be a temporary file so it is 
recommended to remove the file after usage.
For example
  myname = None
  try:
    myname = bdb.get_file(uuid)
    ... process file ...
  finally:
    if myname != None and os.path.exists(myname):
      os.unlink(myname)
:param fname: The file name
:return a temporary file on success
:raises an Exception on failure or no file could be found

◆ get_rave_object()

Lib.rave_bdb.rave_bdb.get_rave_object ( self,
fname,
lazy_loading = False,
preloadedQuantities = None )
 returns the rave object as defined by the fname. If the fname is an existing file on the file system, then
the file will be opened and returned as a rave object. If no fname can be found, an atempt to fetch the file from
bdb is made. The fetched file will be returned as a rave object on success otherwise an exception will be raised.
:param fname: the full file path or an bdb uuid
:return a rave object on success
:raises an exception if the rave object not can be returned

◆ load_auth_provider()

Lib.rave_bdb.rave_bdb.load_auth_provider ( self)
 loads the authorization provider, default is NoAuth but if noauth isn't found
it will try with keyczar if it exists in the properties
:param config: the java properties in a dictionary 

The documentation for this class was generated from the following file: