gem/openquake — pull request #695 by al-maisan (2012-02-27 19:21:49+00:00)
Title: Nrml exposure updates

Hello there!

This completes 99.9% of the risk exposure model changes required
(https://bugs.launchpad.net/bugs/941933, "Add taxonomy_source
to the exposure model" will be dealt with in separate branches)

The corresponding branch weighs in with approx. 3250 lines of diff if
one ignores the xml changes. I apologise for its size, most changes are
trivial in nature however.

It implements a number of changes:
- the risk exposure NRML parser is revised,
https://bugs.launchpad.net/openquake/+bug/931962
- the risk exposure database writer is revised,
- the risk calculators
- store the exposure model in the database,
https://bugs.launchpad.net/openquake/+bug/932742
- use the exposure data from the database,
https://bugs.launchpad.net/openquake/+bug/932743
- the obsolete RISK_CELL_SIZE parameter is removed,
https://bugs.launchpad.net/openquake/+bug/941775
- the 'coco_' prefix is removed from the 'limit' and 'deductible'
asset properties, https://bugs.launchpad.net/openquake/+bug/938525
- Calculator.analyze() is renamed to initialize() since the latter
name is more general
- the former preload() decorator is removed and the functionality
is now in appropriate methods i.e. pre_execute()
- the loss curve unit is now set,
https://bugs.launchpad.net/openquake/+bug/936888

You will need to perform a 'git submodule update' command on this branch
in order to pull in the required NRML changes.