RHESSysWorkflows
1.33
|
Handles metadata persistance for RHESSys workflows. More...
Static Public Member Functions | |
def | checkWorkflowVersion (projectDir) |
Check if metadata store is compatible with current version of RHESSysWorkflows. More... | |
def | writeRHESSysEntry (context, key, value) |
Write a RHESSys entry to the metadata store for a given project. More... | |
def | deleteRHESSysEntry (context, key) |
Delete a RHESSys entry from the metadata store for a given project. More... | |
def | readRHESSysEntries (context) |
Read all RHESSys entries from the metadata store for a given project. More... | |
def | checkWorkflowVersion (projectDir) |
Check if metadata store is compatible with current version of RHESSysWorkflows. More... | |
def | writeRHESSysEntry (context, key, value) |
Write a RHESSys entry to the metadata store for a given project. More... | |
def | deleteRHESSysEntry (context, key) |
Delete a RHESSys entry from the metadata store for a given project. More... | |
def | readRHESSysEntries (context) |
Read all RHESSys entries from the metadata store for a given project. More... | |
Static Public Attributes | |
string | VERSION_KEY = 'rhessysworkflows_version' |
string | MODEL_NAME = 'rhessys' |
RHESSYS_SECTION = MODEL_NAME | |
string | RULES_DIR = 'rules' |
KNOWN_LC_TYPES = ecohydrolib.command.landcover.KNOWN_LC_TYPES | |
string | LC_RULE_ROAD = 'road.rule' |
string | LC_RULE_IMPERVIOUS = 'impervious.rule' |
string | LC_RULE_LANDUSE = 'landuse.rule' |
string | LC_RULE_STRATUM = 'stratum.rule' |
string | LC_RULE_LAI_COMPAT = 'lai.rule' |
string | LC_RULE_LAI = 'lai-recode.rule' |
list | LC_RULES = [LC_RULE_ROAD, LC_RULE_IMPERVIOUS, LC_RULE_LANDUSE, LC_RULE_STRATUM, LC_RULE_LAI] |
string | SOILS_RULE = 'soils.rule' |
list | SOILS_RULES = [SOILS_RULE] |
Handles metadata persistance for RHESSys workflows.
Extends ecohydrolib.GenericMetadata class.
@note All keys are stored in lower case. @note This object is stateless, all methods are static, writes to metadata store are written immediately.
|
static |
Check if metadata store is compatible with current version of RHESSysWorkflows.
Accepts project directory as this method is used in the constructor to the Context class.
projectDir,the | path of the project whose metadata store is to be written to WorkflowVersionError if a version already exists in the metadata store and is different than RHESSysMetadata._workflowVersion |
|
static |
Check if metadata store is compatible with current version of RHESSysWorkflows.
Accepts project directory as this method is used in the constructor to the Context class.
projectDir,the | path of the project whose metadata store is to be written to WorkflowVersionError if a version already exists in the metadata store and is different than RHESSysMetadata._workflowVersion |
|
static |
Delete a RHESSys entry from the metadata store for a given project.
context | Context object containing projectDir, the path of the project whose metadata store is to be deleted from |
key | The key to be deleted from the RHESSys section of the project metadata |
IOError(errno.EACCES) | if the metadata store for the project is not writable |
|
static |
Delete a RHESSys entry from the metadata store for a given project.
context | Context object containing projectDir, the path of the project whose metadata store is to be deleted from |
key | The key to be deleted from the RHESSys section of the project metadata |
IOError(errno.EACCES) | if the metadata store for the project is not writable |
|
static |
Read all RHESSys entries from the metadata store for a given project.
context | Context object containing projectDir, the path of the project whose metadata store is to be read from |
A | dictionary of key/value pairs from the RHESSys section of the project metadata |
|
static |
Read all RHESSys entries from the metadata store for a given project.
context | Context object containing projectDir, the path of the project whose metadata store is to be read from |
A | dictionary of key/value pairs from the RHESSys section of the project metadata |
|
static |
Write a RHESSys entry to the metadata store for a given project.
context | Context object containing projectDir, the path of the project whose metadata store is to be written to |
key | The key to be written to the RHESSys section of the project metadata |
value | The value to be written for key stored in the RHESSys section of the project metadata |
IOError(errno.EACCES) | if the metadata store for the project is not writable |
|
static |
Write a RHESSys entry to the metadata store for a given project.
context | Context object containing projectDir, the path of the project whose metadata store is to be written to |
key | The key to be written to the RHESSys section of the project metadata |
value | The value to be written for key stored in the RHESSys section of the project metadata |
IOError(errno.EACCES) | if the metadata store for the project is not writable |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |