ModelIO

sans.models.ModelIO

Model IO Class that saves and loads composite models from files The parameters of the models are not set. The loaded model object will have the default parameters for all sub-models.

@author: Mathieu Doucet / UTK @contact: mathieu.doucet@nist.gov

class sans.models.ModelIO.ModelIO

Class to create composite models from file or save a model

__init__()

Initizalization @param factory: ModelFactory object

__module__ = 'sans.models.ModelIO'
load()

Load a model from a file @param file: file to load @return: a new BaseComponent

lookupComponentNodes()

Look up a component node among the children of a node @param node: the minidom node to investigate @return: the model object described by the component node, None otherwise

modelToXML()

Saves XML representation of the component @param model: model to save @param file: name of file to write to (if None, a string is returned)

processComponentNode()

Process an XML ‘Component’ node in a model file @param node: XML minidom node to process @param model: model object to build from

save()

Save the XML representation of a model to a file @param model: XML representation of the model @param filename: the path of the file to write to @return: True if everything went well

Table Of Contents

Previous topic

ModelFactory

Next topic

MulComponent

This Page