Data Integrator (Python API)
Public Member Functions | List of all members
common.Paths.CPaths Class Reference

Handling of versioned data files for all modules. More...

Public Member Functions

def __init__ (s, defDataVer=DEFAULT_DATA_VERSION, rootDir=DI_ROOT)
 Ctor. More...
 
def SetDataVersion (s, version)
 Set the version string for data. More...
 
def GetDataVersion (s)
 Get the currently set data version string. More...
 
def GetPath (s, pathName)
 Get the data version dependent path from the configuration. More...
 
def GetParam (s, paramName)
 Get the data version dependent parameter from the configuration. More...
 
def GetDBVersions (s)
 Get a list of of databases and their versions. More...
 

Detailed Description

Handling of versioned data files for all modules.

Constructor & Destructor Documentation

◆ __init__()

def common.Paths.CPaths.__init__ (   s,
  defDataVer = DEFAULT_DATA_VERSION,
  rootDir = DI_ROOT 
)

Ctor.

Parameters
defDataVerDefault data version string.
rootDirRoot directory of the repository, it must contain data directory if it is given as a relative path in the config file.

Member Function Documentation

◆ GetDataVersion()

def common.Paths.CPaths.GetDataVersion (   s)

Get the currently set data version string.

◆ GetDBVersions()

def common.Paths.CPaths.GetDBVersions (   s)

Get a list of of databases and their versions.

    Queries the config file for versions of databases used by the
    currently set data version.
    @return @c List of 2-@c Tuples with the data base name and its version.

◆ GetParam()

def common.Paths.CPaths.GetParam (   s,
  paramName 
)

Get the data version dependent parameter from the configuration.

    @param paramName  A constant PARAM_* defined above.

◆ GetPath()

def common.Paths.CPaths.GetPath (   s,
  pathName 
)

Get the data version dependent path from the configuration.

    @param pathName  A constant PTH_* defined above.

◆ SetDataVersion()

def common.Paths.CPaths.SetDataVersion (   s,
  version 
)

Set the version string for data.

    @param version  This must be a section in the config file.
    @return @c True  if the path version was set successfully, @c False if
     there was some error.

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