MetaModel
Metadata corresponding to an Entity that represents a model.
An Entity represents a model when Entity#isModel is true
A MetaModel corresponds to an Entity by having the same MetaModel#id as the Entity#id.
A MetaModel is created by MetaScene#createMetaModel and belongs to a MetaScene.
Each MetaModel is registered by MetaModel#id in MetaScene#metaModels.
A MetaModel represents its object structure with a tree of MetaObjects, with MetaModel#rootMetaObject referencing the root MetaObject.
Constructor Summary
Public Constructor | ||
public |
Creates a new, unfinalized MetaModel. |
Member Summary
Public Members | ||
public |
The model author, if available. |
|
public |
The date the model was created, if available. |
|
public |
The application that created the model, if available. |
|
public |
True when this MetaModel has been finalized. |
|
public |
graph: {} Connectivity graph. |
|
public |
Globally-unique ID. |
|
public |
metaObjects: {String: MetaObject} The MetaObjects in this MetaModel, each mapped to its ID. |
|
public |
Metadata on the Scene. |
|
public |
The project ID |
|
public |
The PropertySets in this MetaModel. |
|
public |
The revision ID, if available. |
|
public get |
Backwards compatibility with the model having a single root MetaObject. |
|
public |
The root MetaObjects in this MetaModel's composition structure hierarchy. |
|
public |
The model schema version, if available. |
Method Summary
Public Methods | ||
public |
finalize() |
|
public |
getJSON(): {schema: String|string|*, createdAt: String|string|*, metaObjects: *[], author: String|string|*, id: String|Number|string|number|*, creatingApplication: String|string|*, projectId: String|Number|string|number|*, propertySets: *[]} Gets this MetaModel as JSON. |
|
public |
loadData(metaModelData: *) Load metamodel data into this MetaModel. |
Public Constructors
public constructor() source
Creates a new, unfinalized MetaModel.
- The MetaModel is immediately registered by MetaModel#id in MetaScene#metaModels, even though it's not yet populated.
- The MetaModel then needs to be populated with one or more calls to metaModel#loadData.
- As we populate it, the MetaModel will create MetaObjects and PropertySets in itself, and in the MetaScene.
- When populated, call MetaModel#finalize to finish it off, which causes MetaScene to fire a "metaModelCreated" event.
Public Members
public author: String source
The model author, if available.
Will be undefined if not available.
Properties:
Name | Type | Attribute | Description |
author | * |
public createdAt: String source
The date the model was created, if available.
Will be undefined if not available.
Properties:
Name | Type | Attribute | Description |
createdAt | * |
public creatingApplication: String source
The application that created the model, if available.
Will be undefined if not available.
Properties:
Name | Type | Attribute | Description |
creatingApplication | * |
public id: String | Number source
Globally-unique ID.
MetaModels are registered by ID in MetaScene#metaModels.
When this MetaModel corresponds to an Entity then this ID will match the Entity#id.
Properties:
Name | Type | Attribute | Description |
id | * |
public metaObjects: {String: MetaObject} source
The MetaObjects in this MetaModel, each mapped to its ID.
Properties:
Name | Type | Attribute | Description |
metaObjects | * |
public metaScene: MetaScene source
Metadata on the Scene.
Properties:
Name | Type | Attribute | Description |
metaScene | * |
public projectId: String | Number source
The project ID
Properties:
Name | Type | Attribute | Description |
projectId | * |
public propertySets: PropertySet[] source
The PropertySets in this MetaModel.
Properties:
Name | Type | Attribute | Description |
propertySets | * |
public revisionId: String | Number source
The revision ID, if available.
Will be undefined if not available.
Properties:
Name | Type | Attribute | Description |
revisionId | * |
public get rootMetaObject: MetaObject | null source
Backwards compatibility with the model having a single root MetaObject.
Properties:
Name | Type | Attribute | Description |
rootMetaObject | * |
public rootMetaObjects: MetaObject[] source
The root MetaObjects in this MetaModel's composition structure hierarchy.
Properties:
Name | Type | Attribute | Description |
rootMetaObject | * |
Public Methods
public finalize() source
public getJSON(): {schema: String|string|*, createdAt: String|string|*, metaObjects: *[], author: String|string|*, id: String|Number|string|number|*, creatingApplication: String|string|*, projectId: String|Number|string|number|*, propertySets: *[]} source
Gets this MetaModel as JSON.
public loadData(metaModelData: *) source
Load metamodel data into this MetaModel.
Params:
Name | Type | Attribute | Description |
metaModelData | * |