coldp.NameBundle¶
Class¶
- class coldp.NameBundle(coldp, accepted, incertae_sedis=False, sic=False)
Wrapper class to manage set of associated names, normally an accepted name and one or more synonyms. The bundle handles the logic of associated name variations.
- Parameters:
coldp¶ –
COLDP
object to handle logging of any issues and normalise name recordsaccepted¶ – Dictionary mapping COLDP name elements to values for the accepted name - a name record and a taxon record will be added to the COLDP package for the accepted name
incertae_sedis¶ – Flag to indicate if the resulting taxon record should be marked “incertae sedis”
sic¶ – Flag to indicate if the accepted name should be processed without reporting issues for invalid format
The minimal usage is to create a new bundle with an accepted name. One or more synonyms can also be supplied using the
add_synonym()
method. The bundle is then submitted to thecoldp.COLDP.add_names()
method for processing.NameBundle objects should not be created directly. Use the :py:punc`coldp.COLDP.start_name_bundle` method instead.
accepted should contain a dictionary with keys that match property names from the COLDP Name class
Methods¶
- NameBundle.add_synonym(synonym, sic=False)¶
Register an additional name as a synonym for the accepted name
synonym should contain a dictionary with keys that match property names from the COLDP Name class
- Parameters:
synonym¶ – Dictionary mapping COLDP name elements to values for the synonymous name - a name record and a synonym record will be added to the COLDP package for the synonym
sic¶ – Flag to indicate that the name does not follow expected formatting rules for a code-compliant name and that no issues should be logged for this
- NameBundle.normalise_name(name, sic=False)¶
Ensure that a name record dictionary contains all necessary/appropriate elements
- NameBundle.derive_name(name, values, sic=False)¶
Use supplied values to create new name dictionary with missing elements copied from an existing name dictionary