Home Reference Source
public class | source

Tree

Extends:

ResourceGroupTemplate → Tree

Tree model

Static Method Summary

Static Public Methods
public static

createInstances(parentGroup: *, tree: *)

Generate instances of a given omega tree

public static

embedToHousingLyphs(parentGroup: *, lyphs: *, levels: *)

Align tree levels along housing lyphs

public static

expandTemplate(parentGroup: *, tree: *)

Generate a group from tree template

Inherited Summary

From class Resource
public static get

Model: *

public static

fromJSON(json: Object, modelClasses: Object, entitiesByID: Map<string, Resource>): Resource

Creates a Resource object from its JSON specification

public

id: *

public

assignPathProperties(modelClasses: Object)

Assign properties to the objects specified with the help of JSON path expressions in the resource 'assign' statements

public

assignPathRelationships(modelClasses: Object, entitiesByID: Map<string, Resource>)

Create relationships defined with the help of JSON path expressions in the resource 'assign' statements

public

containsMaterial(materialID: *): * | void | T

Checks if the current resource carries a material.

public

Assign properties to resources specified with the help of JSON path expressions in the resource 'interpolate' statements

public

isSubtypeOf(supertypeID: *): boolean

Checks if the current resource is derived from The method makes more sense for lyphs, but it is useful to be able to test any resource, this simplifies filtering

public

replaceIDs(modelClasses: Object, entitiesByID: Map<string, Resource>)

Replace IDs with object references

public

Waiting list keeps objects that refer to unresolved model resources.

public

syncRelationship(key: string, spec: Object, modelClasses: Object)

Synchronize a relationship field of the resource with its counterpart (auto-fill a field that is involved into a bi-directional relationship based on its partial definition, i.e., A.child = B yields B.parent = A).

public

syncRelationships(modelClasses: Object, entitiesByID: Map<string, Resource>)

Synchronize all relationship properties of the resource

public

toJSON(depth: *, initDepth: *): *

Prepare a circular resource object to be serialized in JSON.

From class GroupTemplate
public static

createTemplateGroup(template: *, parentGroup: *): *

Create empty group to accumulate resources generated from a template

Static Public Methods

public static createInstances(parentGroup: *, tree: *) source

Generate instances of a given omega tree

Params:

NameTypeAttributeDescription
parentGroup *

model resources that may be referred from the template

tree *

omega tree object

public static embedToHousingLyphs(parentGroup: *, lyphs: *, levels: *) source

Align tree levels along housing lyphs

Params:

NameTypeAttributeDescription
parentGroup *
lyphs *
levels *

public static expandTemplate(parentGroup: *, tree: *) source

Generate a group from tree template

Params:

NameTypeAttributeDescription
parentGroup *

model resources that may be referred from the template

tree *

omega tree template in JSON