geonature.core.gn_meta.mtd.mtd_utils
Module Contents
Functions
|
Will create or update a given DS according to UUID. |
|
Will update a given AF (Acquisition Framework) if already exists in database according to UUID, else update the AF. |
|
Create or update organism if UUID not exists in DB. |
|
Associate actor and DS or AF according to CorActor value. |
|
Associate a dataset to modules specified in [MTD][JDD_MODULE_CODE_ASSOCIATION] parameter (geonature config) |
Attributes
- geonature.core.gn_meta.mtd.mtd_utils.sync_ds(ds, cd_nomenclatures)[source]
Will create or update a given DS according to UUID. Only process DS if dataset’s cd_nomenclatures exists in ref_normenclatures.t_nomenclatures.
- Paramètres:
ds – <dict> DS infos
cd_nomenclatures – <array> cd_nomenclature from ref_normenclatures.t_nomenclatures
- geonature.core.gn_meta.mtd.mtd_utils.sync_af(af)[source]
Will update a given AF (Acquisition Framework) if already exists in database according to UUID, else update the AF.
Parameters
- afdict
AF infos.
Returns
- TAcquisitionFramework
The updated or inserted acquisition framework.
- geonature.core.gn_meta.mtd.mtd_utils.add_or_update_organism(uuid, nom, email)[source]
Create or update organism if UUID not exists in DB.
- Paramètres:
uuid – uniq organism uuid
nom – org name
email – org email