Represents a relationship between two DataObjects.

This class defines the connection between two objects in a data model, which can be of any type that identifies the relationship. This relationship is stored within the related and relating attributes of the DataObject.

For detailed usage, refer to @xeokit/sdk/model/data.

Properties

relatedObject: DataObject

The DataObject that is the target of this Relationship.

This Relationship will be stored in the DataObject.relating attribute of the related DataObject.

relatingObject: DataObject

The DataObject that is the source of this Relationship.

This Relationship will be stored in the DataObject.related attribute of the relating DataObject.

schema?: string

The schema this Relationship belongs to.

Inherited from the owning DataModel.schema at creation time; a Relationship always has the same schema as the DataModel that created it. May be undefined if the parent DataModel was created without a schema.

type: string

The type of this Relationship.

This value uniquely identifies the relationship type within your DataModel.