The data module stores semantic model data separately from scene geometry.
It contains objects, property sets and typed relationships, grouped into one
or more DataModels. A DataModel will often share its id
with a SceneModel, but the two structures are
independent.
Use it for non-geometric model data: object names and types, classification
links, decomposition trees, property sets, and similar metadata.
A DataModel can declare a schema with DataModelParams.schema.
The schema is set when the model is created and is then read-only.
When schema is defined, objects, property sets and relationships added to
the model must either use the same schema or omit their schema. Omitted
schemas inherit the model schema. Creation fails when a component has a
different explicit schema, or when a relationship links objects with schemas
that differ from the model schema.
When schema is undefined, no schema checks are performed.
Semantic Data Graph
📄 Cheatsheet — model/data at a glance
The
datamodule stores semantic model data separately from scene geometry. It contains objects, property sets and typed relationships, grouped into one or more DataModels. A DataModel will often share its id with a SceneModel, but the two structures are independent.Use it for non-geometric model data: object names and types, classification links, decomposition trees, property sets, and similar metadata.
Structure
Main types:
Schemas
A DataModel can declare a schema with DataModelParams.schema. The schema is set when the model is created and is then read-only.
When
schemais defined, objects, property sets and relationships added to the model must either use the same schema or omit their schema. Omitted schemas inherit the model schema. Creation fails when a component has a different explicit schema, or when a relationship links objects with schemas that differ from the model schema.When
schemais undefined, no schema checks are performed.Creating a DataModel
Create a model from params:
Or build it incrementally:
Traversal and Queries
Objects and property sets are indexed on Data. Relationships are also stored on the objects they connect.
Use searchObjects for traversal with type and relationship filters:
Serialization
Format loaders can also populate a DataModel:
Events
Lifecycle