Wizzi Model instances

A Wizzi Model instance is an in memory javascript object that acts as a context object in a Wizzi Production.

It is an instance of a Wizzi Model DOM and is created by a Wizzi Model factory during a Wizzi Model loading operation, after an mTree has been loaded from an ITTF Document.

To be loaded in a Wizzi Model instance an mTree must be conformant to the Wizzi Schema of the model.

Wizzi Model factory

The javascript module {schema-name}-factory.g.js exports the method 'createLoadModel', that is an HOF that returns the 'loadModel' function. It must be called passing the 'wizzi' object.

The {schema-name}-factory.g.js API

                                
1 {
2 func createLoadModel
3 # HOF : returns the loadModel function for the given factory
4 { wizziObject
5 func loadMTree
6 api-ref wizzi-mtree.loader.loadMTree
7 # This function is prepared by the wizzi.WizziFactory instance class
8 # and has repository access functions and load options in its closure.
9 { file
10 api-ref wizzi.util.file
11 { errors
12 api-ref wizzi.errors
13 ...
14 return
15 func loadModel
16 # This returned function require a complex 'loadContext'
17 # parameter with a lot of interfaces passed.
18 # It will be called by the wizzi.WizziFactory instance and
19 # not directly from client code.
20 string ittfDocumentUri
21 # The path to the primary ITTF Document from which
22 # the mTree will be loaded
23 { loadContext
24 { __productionManager
25 api-ref wizzi.production.productionManager
26 { productionContext
27 api-ref wizzi.production.productionContext
28 { aclstat
29 api-ref wizzi.production.aclstat
30 { __ittfDocumentStore
31 api-ref wizzi-repo.ittfDocumentStore
32 { mTreeBuildUpContext
33 optional
34 | api-ref wizzi-plugin.wizziModel
35 | POJO
36 callback