gem/openquake — pull request #631 by al-maisan (2012-01-07 18:55:17+00:00)
Title: Fix NRML output

Hello there!

This branch fixes https://bugs.launchpad.net/openquake/+bug/910985
"Interleaved calculation/serialization breaks NRML output"

The "solution" chosen is a temporary one and an attempt to repair NRML
output generation while changing as little code as possible (please note
that we plan to convert the current XML serialization to an XML export
mechanism in the near future).

The approach taken is to convert the serialization classes in question
(HazardCurveXMLWriter, HazardMapXMLWriter) to singletons so that the
NRML context/data is preserved across multiple invocations.

All the remaining changes more or less massage the code base to fall in
line with the above modifications.