Curation Use Case Design
Each curation use case script follows the same design template.
1. An instance of the command-line interface tool class, wsatools.CLI, is
created, containing the particular details -- name, documentation, etc. -- of
that CU.
2. The message logger, wsatools.Logger, is turned on, and reports on the
name and version of the CU being run.
3. An instance of this particular curation use case class is created, and its
run() method is invoked.
This curation use case class is derived from curation session class,
wsatools.DbConnect.CuSession, which manages all of the start-up and shutdown
procedures that all CUs must perform, such as the database connection. Please
see the API of this class for further information.
- Additional command-line interface arguments and options are provided in the
definition of the derived curation session class.
- All CUs must define an __init__() method of this class that passes the
correct curation use-case ID number to CuSession.
- The code that actually performs the curation task should be defined in
the _onRun() method. This method is automatically invoked by the run()
method, which provides all the necessary exception handling.