Utilities for importing and migrating semantic data from xeokit's legacy MetaModel format.
This module helps you move from xeokit's older MetaModel format to the newer
DataModel, which represents semantic information as an entity–relationship
graph with property sets.
You can either:
Load legacy MetaModel data directly into a DataModel, or
Convert MetaModel data into DataModelParams first, then load it explicitly
Overview
xeokit's legacy MetaModel format represents a simple hierarchy of entities
with attached property sets. While still supported for compatibility, it has
been superseded by the DataModel, which offers a richer and more flexible
semantic representation.
This module provides utilities to bridge the two formats.
Key components
convertMetaModel
Converts a MetaModelParams object into a DataModelParams object.
MetaModelLoader
Loads a MetaModelParams object directly into an existing DataModel.
DataModel
The modern semantic data model used by xeokit, based on entity–relationship graphs.
DataModelParams
The JSON format used to populate a DataModel.
MetaModelParams
The legacy JSON format describing a hierarchy of entities with property sets.
Installation
Install the xeokit SDK using npm:
npminstall@xeokit/sdk
Usage
The following examples show two common migration workflows.
Option 1: Load MetaModel data directly into a DataModel
Use MetaModelLoader when you want to load legacy MetaModel data
straight into a DataModel without creating intermediate parameters.
Step 1: Create a DataModel
import { Data } from"@xeokit/sdk/data"; import { MetaModelLoader } from"@xeokit/sdk/formats/metamodel";
xeokit Legacy MetaModel Utilities
Utilities for importing and migrating semantic data from xeokit's legacy MetaModel format.
This module helps you move from xeokit's older
MetaModelformat to the newerDataModel, which represents semantic information as an entity–relationship graph with property sets.You can either:
DataModel, orDataModelParamsfirst, then load it explicitlyOverview
xeokit's legacy
MetaModelformat represents a simple hierarchy of entities with attached property sets. While still supported for compatibility, it has been superseded by theDataModel, which offers a richer and more flexible semantic representation.This module provides utilities to bridge the two formats.
Key components
MetaModelParamsobject into aDataModelParamsobject.MetaModelParamsobject directly into an existingDataModel.DataModel.Installation
Install the xeokit SDK using npm:
Usage
The following examples show two common migration workflows.
Option 1: Load MetaModel data directly into a DataModel
Use MetaModelLoader when you want to load legacy MetaModel data straight into a
DataModelwithout creating intermediate parameters.Step 1: Create a DataModel
Step 2: Load the MetaModelParams
Option 2: Convert MetaModel data before loading
Use convertMetaModel when you want access to
DataModelParams—for example, to inspect, modify, or store the converted data before loading it.Step 1: Create a DataModel
Step 2: Convert MetaModelParams to DataModelParams