Table Of Contents

Previous topic

Next topic

This Page

class ModelbaseDef(XmlObject):

Central repository for model definitions and implementations.

Four central properties:

  • typedef_schema: the basic XML type definitions common for all SIMO XML documents
  • schema: a dictionary of text representations of schema documents. Keyed by the model type: ‘aggregation’, ‘cash_flow’, ‘geo_table’, ‘management’, ‘operation’, ‘parameter_table’, ‘prediction’
  • xml: a dictionary of dictionaries; first one keyed by the model type, second one by the XML document name and containing the text representations of the XML documents.
  • ok: a dictionary of booleans, keyed by the model type. Indicates whether both the schema and all the XML documents have been parsed successfully.

def __init__(self, typedef):

Initializes the modelbase by processing the type definition schema.

def xml_to_obj(self, root, lexicon):

Responsible for creating the model object instances after the schema property has been set. This is called when the xml property is and each model class provides its own implementation of this method.