Home Reference Source
public class | source

Graph

Extends:

ResourceGroup → Graph

The main model graph (the group with configuration options for the model viewer)

Static Method Summary

Static Public Methods
public static

excelToJSON(inputModel: *, modelClasses: *): *

Generate the JSON input model from an Excel file (.xlsx)

public static

fromJSON(json: *, modelClasses: *): Graph

Create expanded Graph model from the given JSON input model

Method Summary

Public Methods
public

createAxesForInternalLyphs(modelClasses: *, entitiesByID: *)

Auto-generates links for internal lyphs

public

Serialize the map of all resources in JSON

public

scale(scaleFactor: *)

Scale dimensions of visual resources (length, height and width, coordinates of border points)

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 Group
public static

createTemplateInstances(json: *, modelClasses: *)

Generate group template instances

public static

expandGroupTemplates(json: *, modelClasses: *)

Generate groups from group templates, i.e.

public static

Create lyphs that inherit properties from templates

public static

fromJSON(json: *, modelClasses: *, entitiesByID: *): *

Create a graph model from the JSON specification

public static

Replicate border nodes and create collapsible links The effect of this procedure depends on the order in which lyphs that share border nodes are selected If the added dashed links create an overlap, one has to change the order of lyphs in the input file!

public static

replaceReferencesToTemplates(json: *, modelClasses: *)

Replace references to lyph templates with references to auto-generated lyphs that inherit properties from templates

public get

activeGroups: T[]: *

Groups that can be toggled on or off in the global graph

public get
public get

resources: *[]: *

Entities that belong to the group (resources excluding subgroups)

public get

visibleLinks: *[]: *

Visible links

public get
public get

visibleNodes: T[]: *

Visible nodes

public get

visibleRegions: *[]: *

Visible regions

public
public

тзь: *

public

hide()

Hide current group (=hide all its entities)

public

Add entities from subgroups to the current group

public

show()

Show current group (=show all its entities)

public

showGroups(groups: *)

Show subgroups of the current group.

public

Validate process edges

Static Public Methods

public static excelToJSON(inputModel: *, modelClasses: *): * source

Generate the JSON input model from an Excel file (.xlsx)

Params:

NameTypeAttributeDescription
inputModel *

Excel ApiNATOMY model

modelClasses *

model resource classes

Return:

*

public static fromJSON(json: *, modelClasses: *): Graph source

Create expanded Graph model from the given JSON input model

Override:

Group#fromJSON

Params:

NameTypeAttributeDescription
json *

input model

modelClasses *

classes to represent model resources

Return:

Graph

Public Methods

public createAxesForInternalLyphs(modelClasses: *, entitiesByID: *) source

Auto-generates links for internal lyphs

Params:

NameTypeAttributeDescription
modelClasses *

model resource classes

entitiesByID *

a global resource map to include the generated resources

public entitiesToJSON(): * source

Serialize the map of all resources in JSON

Return:

*

public scale(scaleFactor: *) source

Scale dimensions of visual resources (length, height and width, coordinates of border points)

Params:

NameTypeAttributeDescription
scaleFactor *

{number} - scaling factor