Handles metadata persistance.
More...
Handles metadata persistance.
- Note
- All keys are stored in lower case.
-
This object is stateless, all methods are static, writes to metadata store are written immediately.
- Todo:
- Implement lock file semantics as decorators
- Note
- All keys are stored in lower case.
-
This object is stateless, all methods are static, writes to metadata store are written immediately.
- Todo:
- Implement lock file semantics as decorators
def ecohydroworkflowlib.metadata.GenericMetadata.appendProcessingHistoryItem |
( |
|
projectDir, |
|
|
|
item |
|
) |
| |
|
static |
def ecohydroworkflowlib.metadata.GenericMetadata.getCommandLine |
( |
| ) |
|
|
static |
Return string representing original command line, as close as possible, used to run the command.
Will convert all paths in the command line to absolute path, if a non-path element has spaces in it, they will be quoted.
- Returns
- String with each element of sys.argv separated by a space
def ecohydroworkflowlib.metadata.GenericMetadata.getProcessingHistoryList |
( |
|
projectDir | ) |
|
|
static |
def ecohydroworkflowlib.metadata.GenericMetadata.readAssetProvenanceObjects |
( |
|
projectDir | ) |
|
|
static |
Read all asset provenance objects from metadata and store in AssetProvenance instances.
- Parameters
-
projectDir | Absolute path of the project whose metadata are to be read |
- Returns
- A list of AssetProvenance objects
def ecohydroworkflowlib.metadata.GenericMetadata.readClimateGridEntries |
( |
|
projectDir | ) |
|
|
static |
Read all grid climate entries from the metadata store for a given project.
- Parameters
-
projectDir | Absolute path of the project whose metadata are to be read |
- Returns
- A dictionary of key/value pairs from the grid climate section of the project metadata
def ecohydroworkflowlib.metadata.GenericMetadata.readClimateGridEntries |
( |
|
projectDir | ) |
|
|
static |
Read all grid climate entries from the metadata store for a given project.
- Parameters
-
projectDir | Absolute path of the project whose metadata are to be read |
- Returns
- A dictionary of key/value pairs from the grid climate section of the project metadata
def ecohydroworkflowlib.metadata.GenericMetadata.readClimatePointEntries |
( |
|
projectDir | ) |
|
|
static |
Read all point climate entries from the metadata store for a given project.
- Parameters
-
projectDir | Absolute path of the project whose metadata are to be read |
- Returns
- A dictionary of key/value pairs from the point climate section of the project metadata
def ecohydroworkflowlib.metadata.GenericMetadata.readClimatePointEntries |
( |
|
projectDir | ) |
|
|
static |
Read all point climate entries from the metadata store for a given project.
- Parameters
-
projectDir | Absolute path of the project whose metadata are to be read |
- Returns
- A dictionary of key/value pairs from the point climate section of the project metadata
def ecohydroworkflowlib.metadata.GenericMetadata.readClimatePointStations |
( |
|
projectDir | ) |
|
|
static |
Read all climate point stations from metadata and store in ClimatePointStation instances.
- Parameters
-
projectDir | Absolute path of the project whose metadata are to be read |
- Returns
- A list of ClimatePointStation objects
def ecohydroworkflowlib.metadata.GenericMetadata.readClimatePointStations |
( |
|
projectDir | ) |
|
|
static |
Read all climate point stations from metadata and store in ClimatePointStation instances.
- Parameters
-
projectDir | Absolute path of the project whose metadata are to be read |
- Returns
- A list of ClimatePointStation objects
def ecohydroworkflowlib.metadata.GenericMetadata.readManifestEntries |
( |
|
projectDir | ) |
|
|
static |
Read all manifest entries from the metadata store for a given project.
- Parameters
-
projectDir | Absolute path of the project whose metadata are to be read |
- Returns
- A dictionary of key/value pairs from the manifest section of the project metadata
def ecohydroworkflowlib.metadata.GenericMetadata.readManifestEntries |
( |
|
projectDir | ) |
|
|
static |
Read all manifest entries from the metadata store for a given project.
- Parameters
-
projectDir | Absolute path of the project whose metadata are to be read |
- Returns
- A dictionary of key/value pairs from the manifest section of the project metadata
def ecohydroworkflowlib.metadata.GenericMetadata.readProvenanceEntries |
( |
|
projectDir | ) |
|
|
static |
Read all provenance entries from the metadata store for a given project.
- Parameters
-
projectDir | Absolute path of the project whose metadata are to be read |
- Returns
- A dictionary of key/value pairs from the provenance section of the project metadata
def ecohydroworkflowlib.metadata.GenericMetadata.readStudyAreaEntries |
( |
|
projectDir | ) |
|
|
static |
Read all study area entries from the metadata store for a given project.
- Parameters
-
projectDir | Absolute path of the project whose metadata are to be read |
- Returns
- A dictionary of key/value pairs from the study area section of the project metadata
def ecohydroworkflowlib.metadata.GenericMetadata.readStudyAreaEntries |
( |
|
projectDir | ) |
|
|
static |
Read all study area entries from the metadata store for a given project.
- Parameters
-
projectDir | Absolute path of the project whose metadata are to be read |
- Returns
- A dictionary of key/value pairs from the study area section of the project metadata
def ecohydroworkflowlib.metadata.GenericMetadata.writeClimateGridEntries |
( |
|
projectDir, |
|
|
|
keys, |
|
|
|
values |
|
) |
| |
|
static |
Write grid climate entries to the metadata store for a given project.
- Note
- Will overwrite the value for keys that already exist
- Parameters
-
projectDir | Path of the project whose metadata store is to be written to |
key | List of keys to be written to the grid climate section of the project metadata |
value | List of values to be written for keys stored in the grid climate section of the project metadata @exception IOError(errno.EACCES) if the metadata store for the project is not writable
@exception Exception if len(keys) != len(values) |
def ecohydroworkflowlib.metadata.GenericMetadata.writeClimateGridEntry |
( |
|
projectDir, |
|
|
|
key, |
|
|
|
value |
|
) |
| |
|
static |
Write a grid climate entry to the metadata store for a given project.
- Note
- Will overwrite a the value for a key that already exists
- Parameters
-
projectDir | Path of the project whose metadata store is to be written to |
key | The key to be written to the grid climate section of the project metadata |
value | The value to be written for key stored in the grid climate section of the project metadata @exception IOError(errno.EACCES) if the metadata store for the project is not writable |
def ecohydroworkflowlib.metadata.GenericMetadata.writeClimateGridEntry |
( |
|
projectDir, |
|
|
|
key, |
|
|
|
value |
|
) |
| |
|
static |
Write a grid climate entry to the metadata store for a given project.
- Note
- Will overwrite the value for a key that already exists
- Parameters
-
projectDir | Path of the project whose metadata store is to be written to |
key | The key to be written to the grid climate section of the project metadata |
value | The value to be written for key stored in the grid climate section of the project metadata @exception IOError(errno.EACCES) if the metadata store for the project is not writable |
def ecohydroworkflowlib.metadata.GenericMetadata.writeClimatePointEntries |
( |
|
projectDir, |
|
|
|
keys, |
|
|
|
values |
|
) |
| |
|
static |
Write a point climate entries to the metadata store for a given project.
- Note
- Will overwrite the value for keys that already exist
- Parameters
-
projectDir | Path of the project whose metadata store is to be written to |
keys | List of keys to be written to the point climate section of the project metadata |
values | List of values to be written for keys stored in the point climate section of the project metadata @exception IOError(errno.EACCES) if the metadata store for the project is not writable
@exception Exception if len(keys) != len(values) |
def ecohydroworkflowlib.metadata.GenericMetadata.writeClimatePointEntry |
( |
|
projectDir, |
|
|
|
key, |
|
|
|
value |
|
) |
| |
|
static |
Write a point climate entry to the metadata store for a given project.
- Note
- Will overwrite a the value for a key that already exists
- Parameters
-
projectDir | Path of the project whose metadata store is to be written to |
key | The key to be written to the point climate section of the project metadata |
value | The value to be written for key stored in the point climate section of the project metadata @exception IOError(errno.EACCES) if the metadata store for the project is not writable |
def ecohydroworkflowlib.metadata.GenericMetadata.writeClimatePointEntry |
( |
|
projectDir, |
|
|
|
key, |
|
|
|
value |
|
) |
| |
|
static |
Write a point climate entry to the metadata store for a given project.
- Note
- Will overwrite the value for a key that already exists
- Parameters
-
projectDir | Path of the project whose metadata store is to be written to |
key | The key to be written to the point climate section of the project metadata |
value | The value to be written for key stored in the point climate section of the project metadata @exception IOError(errno.EACCES) if the metadata store for the project is not writable |
def ecohydroworkflowlib.metadata.GenericMetadata.writeEntryToSection |
( |
|
projectDir, |
|
|
|
section, |
|
|
|
key, |
|
|
|
value |
|
) |
| |
|
static |
Write an entry in the given section to the metadata store for a given project.
- Note
- Will overwrite the value for a key that already exists
- Parameters
-
projectDir | Path of the project whose metadata store is to be written to |
section | The section the key is to be written to |
key | The key to be written to the given section of the project metadata |
value | The value to be written for key stored in the given section of the project metadata @exception IOError(errno.EACCES) if the metadata store for the project is not writable
@exception Exception if section is not a valid GenericMetadata section |
def ecohydroworkflowlib.metadata.GenericMetadata.writeManifestEntry |
( |
|
projectDir, |
|
|
|
key, |
|
|
|
value |
|
) |
| |
|
static |
Write a manifest entry to the metadata store for a given project.
- Note
- Will overwrite a the value for a key that already exists
- Parameters
-
projectDir | Path of the project whose metadata store is to be written to |
key | The key to be written to the manifest section of the project metadata |
value | The value to be written for key stored in the manifest section of the project metadata @exception IOError(errno.EACCES) if the metadata store for the project is not writable |
def ecohydroworkflowlib.metadata.GenericMetadata.writeManifestEntry |
( |
|
projectDir, |
|
|
|
key, |
|
|
|
value |
|
) |
| |
|
static |
Write a manifest entry to the metadata store for a given project.
- Note
- Will overwrite the value for a key that already exists
- Parameters
-
projectDir | Path of the project whose metadata store is to be written to |
key | The key to be written to the manifest section of the project metadata |
value | The value to be written for key stored in the manifest section of the project metadata @exception IOError(errno.EACCES) if the metadata store for the project is not writable |
def ecohydroworkflowlib.metadata.GenericMetadata.writeProvenanceEntries |
( |
|
projectDir, |
|
|
|
keys, |
|
|
|
values |
|
) |
| |
|
static |
Write provenance entries to the metadata store for a given project.
- Note
- Will overwrite the values of keys that already exist
- Parameters
-
projectDir | Path of the project whose metadata store is to be written to |
keys | The keys to be written to the provenance section of the project metadata |
values | The values to be written for keys stored in the provenance section of the project metadata @exception IOError(errno.EACCES) if the metadata store for the project is not writable
@exception Exception if len(keys) != len(values) |
def ecohydroworkflowlib.metadata.GenericMetadata.writeProvenanceEntry |
( |
|
projectDir, |
|
|
|
key, |
|
|
|
value |
|
) |
| |
|
static |
Write a provenance entry to the metadata store for a given project.
- Note
- Will overwrite a the value for a key that already exists
- Parameters
-
projectDir | Path of the project whose metadata store is to be written to |
key | The key to be written to the provenance section of the project metadata |
value | The value to be written for key stored in the provenance section of the project metadata @exception IOError(errno.EACCES) if the metadata store for the project is not writable |
def ecohydroworkflowlib.metadata.GenericMetadata.writeStudyAreaEntry |
( |
|
projectDir, |
|
|
|
key, |
|
|
|
value |
|
) |
| |
|
static |
Write a study area entry to the metadata store for a given project.
- Note
- Will overwrite a the value for a key that already exists
- Parameters
-
projectDir | Path of the project whose metadata store is to be written to |
key | The key to be written to the study area section of the project metadata |
value | The value to be written for key stored in the study area section of the project metadata @exception IOError(errno.EACCES) if the metadata store for the project is not writable |
def ecohydroworkflowlib.metadata.GenericMetadata.writeStudyAreaEntry |
( |
|
projectDir, |
|
|
|
key, |
|
|
|
value |
|
) |
| |
|
static |
Write a study area entry to the metadata store for a given project.
- Note
- Will overwrite the value for a key that already exists
- Parameters
-
projectDir | Path of the project whose metadata store is to be written to |
key | The key to be written to the study area section of the project metadata |
value | The value to be written for key stored in the study area section of the project metadata @exception IOError(errno.EACCES) if the metadata store for the project is not writable |
string ecohydroworkflowlib.metadata.GenericMetadata.CLIMATE_GRID_SECTION 'climate_grid' |
|
static |
string ecohydroworkflowlib.metadata.GenericMetadata.CLIMATE_POINT_SECTION 'climate_point' |
|
static |
string ecohydroworkflowlib.metadata.GenericMetadata.COMPOUND_KEY_SEP '/' |
|
static |
string ecohydroworkflowlib.metadata.GenericMetadata.HISTORY_PROTO "processing%sstep%s" |
|
static |
string ecohydroworkflowlib.metadata.GenericMetadata.HISTORY_SECTION 'history' |
|
static |
string ecohydroworkflowlib.metadata.GenericMetadata.KEY_SEP '_' |
|
static |
string ecohydroworkflowlib.metadata.GenericMetadata.MANIFEST_SECTION 'manifest' |
|
static |
string ecohydroworkflowlib.metadata.GenericMetadata.METADATA_FILENAME 'metadata.txt' |
|
static |
string ecohydroworkflowlib.metadata.GenericMetadata.METADATA_LOCKFILE 'metadata.txt.lock' |
|
static |
string ecohydroworkflowlib.metadata.GenericMetadata.PROVENANCE_SECTION 'provenance' |
|
static |
list ecohydroworkflowlib.metadata.GenericMetadata.SECTIONS |
|
static |
Initial value: 1 [MANIFEST_SECTION, PROVENANCE_SECTION, HISTORY_SECTION,\
2 STUDY_AREA_SECTION, CLIMATE_POINT_SECTION, CLIMATE_GRID_SECTION]
string ecohydroworkflowlib.metadata.GenericMetadata.STUDY_AREA_SECTION 'study_area' |
|
static |
string ecohydroworkflowlib.metadata.GenericMetadata.VALUE_DELIM ',' |
|
static |
The documentation for this class was generated from the following files: