A federated entity-relationship semantic data model.

A Data is a container of DataModels, DataObjects, Relationships, PropertySets and Properties.

See @xeokit/sdk/data for usage.

Hierarchy (View Summary)

Constructors

Properties

destroyed: boolean

True once this Component has been destroyed.

Don't use this Component if this is true.

dirty: boolean
id: string

Unique ID of this Component.

models: { [key: string]: DataModel }

The DataModels belonging to this Data, each keyed to its DataModel.id.

objects: { [key: string]: DataObject }

The DataObjects in this Data, mapped to DataObject.id.

objectsByType: { [key: string]: { [key: string]: DataObject } }

The DataObjects belonging to this Data, each map keyed to DataObject.type, containing DataObjects keyed to DataObject.id.

propertySets: { [key: string]: PropertySet }

ThePropertySets belonging to this Data, mapped toPropertySet.id.

rootObjects: { [key: string]: DataObject }

The root DataObjects belonging to this Data, each keyed to its DataObject.id.

  • This is the set of DataObjects in the DataModels within this Data that are not the related participant in any Relationships, where they have no incoming Relationships and their DataObject.relating property is empty.
typeCounts: { [key: string]: number }

Tracks number of DataObjects of each type in this Data.

Methods

  • Protected

    Logs an error for this component to the JavaScript console.

    The console message will have this format: [ERROR] [<component type> =<component id>: <message>

    Parameters

    • message: string

      The error message to log

    Returns void

  • Protected

    Logs a message for this component.

    The message will have this format: [LOG] [<component type> <component id>: <message>

    Parameters

    • message: string

      The message to log

    Returns void

  • Protected

    Logs a warning for this component to the JavaScript console.

    The console message will have this format: [WARN] [<component type> =<component id>: <message>

    Parameters

    • message: string

      The warning message to log

    Returns void

Events

onDestroyed: EventEmitter<Component, null>

Emits an event when the Component has been destroyed.

onModelCreated: EventEmitter<Data, DataModel>

Emits an event each time a DataModel has been created in this Data.

onModelDestroyed: EventEmitter<Data, DataModel>

Emits an event each time a DataModel has been destroyed within this Data.

onObjectCreated: EventEmitter<Data, DataObject>

Emits an event each time a DataObject is created within this Data.

onObjectDestroyed: EventEmitter<Data, DataObject>

Emits an event each time a DataObject is destroyed within this Data.