Data Warehouse GUI Model ---------------------------------------------- This Model is basically a wrapper of the CWAM functions provided by the Data Warehouse with some modifications to make it easier / more efficient for the controller. The GUI model requires that the Data Warehouse and psycopg is available prior to the installation of the GUI. If this is not the case, the unit tests will fail. The anatom is divided into three files; DWReader, DWError. -DWError.py- This is a collection of exceptions which can be raised from the DWReader. -DWReader.py- This is the main part of the Model and can be instantiated from a Zope/Plone python script like the following; >>> dwr = DWReader2(cached=True) The main functionality of this module is to provide an interface for the CWAM functions in the DW to the controller. Note that this class has an internal cache. The main reason for implementing the caching is to avoid that two equal, possibly large, requests from the view/controller are calculated twice in the DW. As far as I can see, this may be redundant once the materialised views are implemented. However, currently this internal cache speeds up the requests from a controller object quite a lot. Static information such as current month, current year, all nace, all nuts, etc. is also cached in simple python dictionaries. The reason for this is the following; - These lists are needed for the view/controller. - The dictionaries reduce the number of calls to the DW.